Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mounting a Sandisk Thumb Drive in Linux (Knoppix, Linux)

0 views
Skip to first unread message

W. eWatson

unread,
Jan 28, 2009, 7:58:37 PM1/28/09
to
It's been so long since I've used linux that small usb drives have come into
being. I decided to use Knoppix to do some simple things with a program
someone wrote in C for Linux. To get it off the drive, I need to know how to
mount it. I may even need how to modify fstab. Comments?
--
W. eWatson

(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

Web Page: <www.speckledwithstars.net/>

Grant Edwards

unread,
Jan 28, 2009, 8:17:27 PM1/28/09
to
On 2009-01-29, W. eWatson <notv...@sbcglobal.net> wrote:

> It's been so long since I've used linux that small usb drives
> have come into being. I decided to use Knoppix to do some
> simple things with a program someone wrote in C for Linux. To
> get it off the drive, I need to know how to mount it. I may
> even need how to modify fstab. Comments?

It'll show up as a SCSI device (e.g. sda sdb sdc). After you
plug it in, do a "dmesg" command and you should see messages
from the USB storage driver identifying it. Then use a mount
command:

mount /dev/sdb1 /mnt/whatever

[substitute whatever dmesg reports for "sdb" in the above]

You'll need support in your kernel for SCSI disks and USB
storage devices.

--
Grant

W. eWatson

unread,
Jan 28, 2009, 10:46:54 PM1/28/09
to
I actually found fstab! It had no entry for the thumb drive. I mounted a
couple of HDDs to mnt for practice. I entered dmesg sdb and got a lot of
output. None of it meant much to me.

Michael Black

unread,
Jan 28, 2009, 11:25:55 PM1/28/09
to
On Wed, 28 Jan 2009, W. eWatson wrote:

> Grant Edwards wrote:
>> On 2009-01-29, W. eWatson <notv...@sbcglobal.net> wrote:
>>
>>> It's been so long since I've used linux that small usb drives
>>> have come into being. I decided to use Knoppix to do some
>>> simple things with a program someone wrote in C for Linux. To
>>> get it off the drive, I need to know how to mount it. I may
>>> even need how to modify fstab. Comments?
>>
>> It'll show up as a SCSI device (e.g. sda sdb sdc). After you
>> plug it in, do a "dmesg" command and you should see messages
>> from the USB storage driver identifying it. Then use a mount
>> command:
>>
>> mount /dev/sdb1 /mnt/whatever
>>
>> [substitute whatever dmesg reports for "sdb" in the above]
>>
>> You'll need support in your kernel for SCSI disks and USB
>> storage devices.
>>
> I actually found fstab! It had no entry for the thumb drive. I mounted a
> couple of HDDs to mnt for practice. I entered dmesg sdb and got a lot of
> output. None of it meant much to me.
>

fstab has nothing to do with mount.

It's there to define which partitions get mounted on boot.

And it's there to allow users to mount things, particularly removeable
media.

It also allows for simplified use of the mount command.

But there does not have to be an entry in fstab in order to mount
something.

Michael

Maxwell Lol

unread,
Jan 29, 2009, 6:08:44 AM1/29/09
to
Michael Black <et...@ncf.ca> writes:

> On Wed, 28 Jan 2009, W. eWatson wrote:
>
>> I actually found fstab! It had no entry for the thumb drive. I
>> mounted a couple of HDDs to mnt for practice. I entered dmesg sdb
>> and got a lot of output. None of it meant much to me.
>>
> fstab has nothing to do with mount.

Uh...... That's incorrect.

Check the manual page for the meanings of
mount -a

and
mount /cd

W. eWatson

unread,
Jan 29, 2009, 12:50:04 PM1/29/09
to
The question remains. How do I mount the Sandisk thumb drive? fstab had no
entry for it. Floppy, CD, HDD, but not of the thumb drive (usb).

Michael Black

unread,
Jan 29, 2009, 12:54:17 PM1/29/09
to
On Thu, 29 Jan 2009, Maxwell Lol wrote:

> Michael Black <et...@ncf.ca> writes:
>
>> On Wed, 28 Jan 2009, W. eWatson wrote:
>>
>>> I actually found fstab! It had no entry for the thumb drive. I
>>> mounted a couple of HDDs to mnt for practice. I entered dmesg sdb
>>> and got a lot of output. None of it meant much to me.
>>>
>> fstab has nothing to do with mount.
>
> Uh...... That's incorrect.
>

For the purposes of his question, it is correct.

This is not the first time someone has posted here where they
clearly believe they have to put an entry into fstab in order
to use the mount command.

I use mount all the time, and never fuss with fstab.

I don't have to, because as I pointed out in the part you deleted,
I'm doing things that don't require it.

Having an fstab entry for a device may make the mounting simpler, or
doable (if you're only a user rather than root), but that's mostly
a convenience. I'm certainly not going to put in an fstab entry
for any possible devices I might want to mount, especially not if
each gets mounted on rare occasions.

It would be a different case if an fstab entry was required in order
to mount something.

Michael


Michael Black

unread,
Jan 29, 2009, 1:00:39 PM1/29/09
to
On Thu, 29 Jan 2009, W. eWatson wrote:

> Maxwell Lol wrote:
>> Michael Black <et...@ncf.ca> writes:
>>
>>> On Wed, 28 Jan 2009, W. eWatson wrote:
>>>
>>>> I actually found fstab! It had no entry for the thumb drive. I
>>>> mounted a couple of HDDs to mnt for practice. I entered dmesg sdb
>>>> and got a lot of output. None of it meant much to me.
>>>>
>>> fstab has nothing to do with mount.
>>
>> Uh...... That's incorrect.
>> Check the manual page for the meanings of
>> mount -a
>>
>> and
>> mount /cd
>>
> The question remains. How do I mount the Sandisk thumb drive? fstab had no
> entry for it. Floppy, CD, HDD, but not of the thumb drive (usb).
>

Because you don't need an fstab entry.

Find out what /dev the drive appears as, someone pointed out one way
to find that out. The reality is that that may change, so you need
to check it rather than rely on someone telling you what it might
be.

Then you need a place to mount it. Usually, a distribution has
some places set aside under /mnt If it's not there, you need to
create a directory using mkdir

Then you
mount -t auto /dev/whatever /mnt/point
If you're lucky, it will be able to figure out automatically what
the filesystem is, and you won't get an error message. If you
get an error message about the filesystem, then you likely need
to specify the filesystem of the usb flash drive, using that instead
of "auto".

That's from root.

As a user, permissions get in the way.

Michael

notbob

unread,
Jan 29, 2009, 1:17:06 PM1/29/09
to
On 2009-01-29, W. eWatson <notv...@sbcglobal.net> wrote:

> The question remains. How do I mount the Sandisk thumb drive? fstab had no
> entry for it. Floppy, CD, HDD, but not of the thumb drive (usb).

Mount it manually. First, figure out what your system sees it as. Plug in
thumb drive (key) and as root, run lsusb. This should tell you what /dev/?
it is. Then:

mount -t vfat /dev/? /mnt/mountpoint

..../mnt/mountpoint being whatever dir name you have created. Most keys
(thumb/flash drives) are detected as a scsi device, seen as sda, sdb, etc,
depending on whether you have other scsi or sata drives. You would then use
/dev/sda, etc, in the mount command. Also, most keys are vfat formatted.
You could also try -t auto.

Invoke df to see if it has mounted, then change to that dir/mntpnt. You may
have to include umount=0 in the mount command to read it.

nb


Steve Wampler

unread,
Jan 29, 2009, 1:10:13 PM1/29/09
to
W. eWatson wrote:
> It's been so long since I've used linux that small usb drives have come
> into being. I decided to use Knoppix to do some simple things with a
> program someone wrote in C for Linux. To get it off the drive, I need to
> know how to mount it. I may even need how to modify fstab. Comments?

Have you tried just plugging it in? Do so, and see if it has magically
appeared when you do a 'mount' (probably under /media - you can do a
'mount' before and after to see if anything changed). Many modern
Linuxes (Linii?) are set up to automount USB drives.

--
Steve Wampler -- swam...@noao.edu
The gods that smiled on your birth are now laughing out loud.

Steve Wampler

unread,
Jan 29, 2009, 1:30:04 PM1/29/09
to
notbob wrote:
> Mount it manually. First, figure out what your system sees it as. Plug in
> thumb drive (key) and as root, run lsusb. This should tell you what /dev/?
> it is.

I'm not sure if 'lsusb' is the best choice here (maybe newer versions are
more novice-friendly, but the version I have wouldn't help the OP much!).
Grant's approach of using dmesg seems more straightforward.

Note to OP:

run 'dmesg' (no args) after plugging in the thumbdrive and look
near the end of the output for a line that starts:

Attached scsi removable disk

the next word after this prefix will be the scsi device name,
let's assume it's 'sdb'.

Look around that line ( a few lines up) and you should see a line:

sdb: sdb1

That tells you there is a single partition on the thumb drive, named
(in this case 'sdb1').

Try the mount command that several people have suggested. For this example,
it would be:

mkdir -f /mnt/thumbdrive # create directory if not already there
mount /dev/sdc1 /mnt/thumbdrive

If mount doesn't complete, you've got it right, and your thumbdrive is
ready to read.

Grant Edwards

unread,
Jan 29, 2009, 2:34:53 PM1/29/09
to
On 2009-01-29, W. eWatson <notv...@sbcglobal.net> wrote:
> Maxwell Lol wrote:
>> Michael Black <et...@ncf.ca> writes:
>>
>>> On Wed, 28 Jan 2009, W. eWatson wrote:
>>>
>>>> I actually found fstab! It had no entry for the thumb drive. I
>>>> mounted a couple of HDDs to mnt for practice. I entered dmesg sdb
>>>> and got a lot of output. None of it meant much to me.
>>>>
>>> fstab has nothing to do with mount.
>>
>> Uh...... That's incorrect.
>>
>> Check the manual page for the meanings of
>> mount -a
>>
>> and
>> mount /cd
>>
> The question remains. How do I mount the Sandisk thumb drive? fstab had no
> entry for it. Floppy, CD, HDD, but not of the thumb drive (usb).

Troll.

--
Grant Edwards grante Yow! They collapsed
at ... like nuns in the
visi.com street ... they had no
teen appeal!

notbob

unread,
Jan 29, 2009, 4:39:22 PM1/29/09
to
On 2009-01-29, Steve Wampler <swam...@noao.edu> wrote:

> run 'dmesg' (no args) after plugging in the thumbdrive and look
> near the end of the output for a line that starts:

Agreed. You can also run tail -f dmesg, which will give you a running
output of dmesg.

nb

Grant Edwards

unread,
Jan 30, 2009, 12:25:45 AM1/30/09
to

Eh? Do you mean something like 'tail -f /var/log/messages'?

--
Grant

Darren Salt

unread,
Jan 30, 2009, 8:57:48 AM1/30/09
to
I demand that notbob may or may not have written...

> On 2009-01-29, W. eWatson <notv...@sbcglobal.net> wrote:
>> The question remains. How do I mount the Sandisk thumb drive? fstab had no

>> entry for it. Floppy, CD, HDD, but not of the thumb drive (usb).

> Mount it manually. First, figure out what your system sees it as. Plug in
> thumb drive (key) and as root, run lsusb.

Not lsusb.

$ dmesg | tail

> This should tell you what /dev/?
> it is. Then:

> mount -t vfat /dev/? /mnt/mountpoint

$ pmount /dev/sdXN foo
$ ls /media/foo
...
$ pumount foo

(This assumes that the file system type is automatically detected.)

[snip]
--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Output less CO2 => avoid boiling weather. TIME IS RUNNING OUT *FAST*.

Praise the sea; on shore remain.

Maxwell Lol

unread,
Jan 30, 2009, 10:05:05 AM1/30/09
to
Michael Black <et...@ncf.ca> writes:

> On Thu, 29 Jan 2009, Maxwell Lol wrote:
>
>> Michael Black <et...@ncf.ca> writes:
>>
>>> On Wed, 28 Jan 2009, W. eWatson wrote:
>>>
>>>> I actually found fstab! It had no entry for the thumb drive. I
>>>> mounted a couple of HDDs to mnt for practice. I entered dmesg sdb
>>>> and got a lot of output. None of it meant much to me.
>>>>
>>> fstab has nothing to do with mount.
>>
>> Uh...... That's incorrect.
>>
> For the purposes of his question, it is correct.

True. Perhaps I was too literal......

notbob

unread,
Jan 30, 2009, 10:10:51 AM1/30/09
to

ummm... er... oh yeah! :)

Thanks for the correction.


nb

Michael Black

unread,
Jan 30, 2009, 11:44:27 AM1/30/09
to

I was trying to be bold, to get the specific point across.

Michael

W. eWatson

unread,
Feb 7, 2009, 2:27:41 PM2/7/09
to
I've been away for 5 days, and am now back. I see a number of posts have
appeared. The unfortunate aspect of this for me, is that the Knoppix machine
is 100' away from where I normally work. I might benefit from printing out
the posts. There seems to be a small debate on some matters. So noted.

Troll, someone mentioned. Hardly.

Recall my opening statement, "It's been so long since I've used linux that
small usb drives have come into being." I barely managed to fire up vi. I
would say my memory of mount, fstab, etc. are not exactly first rate, but
I'm sure they will become more maleable as I get back to it this weekend. My
wife is back too, and she uses Linux all the time, so there is hope.

Consider the post a place holder until I can actually get back into action,
very soon I hope.

W. eWatson

unread,
Feb 20, 2009, 1:36:22 PM2/20/09
to
Steve Wampler wrote:
> W. eWatson wrote:
>> It's been so long since I've used linux that small usb drives have
>> come into being. I decided to use Knoppix to do some simple things
>> with a program someone wrote in C for Linux. To get it off the drive,
>> I need to know how to mount it. I may even need how to modify fstab.
>> Comments?
>
> Have you tried just plugging it in? Do so, and see if it has magically
> appeared when you do a 'mount' (probably under /media - you can do a
> 'mount' before and after to see if anything changed). Many modern
> Linuxes (Linii?) are set up to automount USB drives.
>
Finally, I'm back to this with the some assistance of my wife who is Linux
knowledgeable. I'm booting from my Win laptop with a Knoppix CD.

Yep, I started with the device plugged in when I booted. There's an auto
under /mnt but nothing in it. We didn't really have any luck the other day
finding anything useful.

Today I fired up the laptop, and it had trouble with the CD. As it struggled
along, I noted a few things. It had trouble with ramdisk and burmped out usb
hotplug found. I gave up and went to a desktop. It came up properly but I
found nothing that would tell me if I had the Sandisk device.

W. eWatson

unread,
Feb 23, 2009, 12:07:03 AM2/23/09
to
It works.
Finished.
0 new messages