[Techtalk] Mounting USB devices
Peter Samuelson
peter at p12n.org
Fri Jan 7 02:07:58 EST 2005
[Marleen Garcia]
> Before, I could only mount a few devices, and this seemed random
> (first the compact flash card & the mp3 player, then the memory stick
> & the compact flash card, and so on).
I'm guessing this has to do with the order these devices were detected
by the kernel. This in turn will normally depend on where things are
plugged in to your USB ports and hubs. Alternatively, some of your
devices might be acting flaky because, for example, your hub isn't
providing enough power for all the devices that don't have external
power supplies. Who knows.
> I looked into /dev, and found sda-sdn, and only sda1 and sdb1, which
> explained why it only mounted two devices. I then created devices
> sdc1-sdn1 by copying sdc to sdc1 and so on.
>
> #cp -R sdc sdc1
> #cp -R sdd sdd1
> ...
That's not right - sdc and sdc1 are two different things. Here's
what's happening: first of all, some of your USB "disk-like" devices
have partition tables and some do not. Nobody ever puts a partition
table on a floppy disk, for example - it's too small, nobody would ever
want multiple partitions on it. Larger things like flash drives are
usually shipped with partition tables, but not always.
It appears that Mandrake has some scheme (probably based on the udev
package) to create device nodes to match the partition tables of
disk-like devices. Your sda and sdb devices have partition tables with
one full-size partition each - hence, sda1 and sdb1. Your other USB
devices, it seems, do not have partition tables at all. You can see
what partitions (and what full disks) are known to your kernel by
reading /proc/partitions.
For the devices that don't have partition tables, the right solution is
just to refer to /dev/sdc and so forth in your /etc/fstab file. No
need to create extra device nodes.
> The only problem that's left now is, and the reason I'm posting is,
> by rebooting the machine, the /dev files I created disappear, the
> file /etc/fstab is overwritten, and I can start anew!
As I mentioned above, there should be no need to create extra /dev
devices - that part is already working. As for /etc/fstab, I'm afraid
I can't help, as I'm not a Mandrake user any more than the other people
who tried to answer.
Peter
More information about the Techtalk
mailing list