Hi All - I'm new to Linux Forums, and posting my first question - so be gentle with me ;-)
I want to mount my usb devices (pen drive, sd card drive, and USB HD) by using fstab entries.
The problem is of course, that if i mount the pendrive first it uses sda1 and the net one get sdb1and vis a versa.
I see in the fstab man pages that i can mount by UUID instead. Problem is - how do i get that info. Either UUID or LABEL will do.
TIA - Tom
Well welcome to the forum... and no I will not be gentle with you! I see you have Knoppix installed, but you also have RH9 loaded, so here are my questions to you:
1. Did you use the live Knoppix CD to check if the devices could be found and used by the distro?
2. Now that you have Knoppix loaded, did you plug in the USB devices in before booting the OS up the first time, so it could find them and make record of them as plug and play devices?
As I do not use RH, so I can not help you there, and I do not see a problem with the mounting of the USB devices, first come, first served.
To get the info you want, try www.google/linux :wink:
I guess i didn't phrase my question correctly - must be the pain killers ...
U have no problem with either of my distros - this is a Linux question concerning fstab.
I read in the doc that i can use the UUID from the drive or the label instead of hard coding a device (/dev/sda1). The reason i want to do this is because i have several usb devices, and i would like the to be mounted as fstab elements in any order (or perhaps not at all) I have everything working with the devices hard coded.
Now for the question:
How can i find the UUID (or Label) for a drive. I am willing to bet that there is a Linux tool that will do that for me. I have looked long and hard. any ideas?
Thanks - Tom
PS - It's really ok to be gentle with people - it doesn't really denigrate your geek cred.
I hate to say it, but get a distribution which uses udev (as opposed to devfs) for the device filesystem. I believe the latest versions of Fedora Core, Mandrake, and Suse all use udev now and *should* have better mount behavior.
Your installed Knoppix distro should already perform the function already. All you have to do is have the USB devices plugged in at boot up and the fstab is updated and then you will have plug and play USB......OR......Are you wanting to learn the deep dark secrets of how is this done? Yes I am sure there is a tool that will read the device signatures out there, however I can not help you with that. Have you tried www.google/linux search yet? :wink:
lsusb -v gives a lot of information about your USB connected equipment.
To actually get the UUID of an object, you have to have udev and sysfs running (you can't have one without the other :wink:). Then you can use this command:
to get the info for the device. From there, write a custom udev rule. I have this setup for my spamPod. Whenever I plug it in, it get's the normal devicename, but also the device and 2 partitions get their own nodes in /dev/spampod/. 8)
udevinfo -a -p /sys/class/rest_of_path_here
Udev or devfs has got nothing to do with this.
Hi - It's been interesting reading all the replies ... Here is my take so far -
1. This should have absolutely nothing to do with distros. When the topic is in man pages for both Knoppix and Red Hat 9.0 - I don't think it's distro related.
2. I don't believe there are any "Deep Dark Secrets" in Linux - That is why i like it so much - learn fundamental stuff once - use it everywhere.
3. I am not interested in mounting a single device - I can easily set fstab to mount a USB pendrive or USB external drive - Dos partition or whatever.
The problem arises when i have several devices that i mount in no particular order. The obvious solution would seem to be to use the UUID=XXXXX option of the fstab entry:
, but how to get the UUID of the various devices is my problem.
Instead of giving the device explicitly, one may indicate the (ext2 or
xfs) filesystem that is to be mounted by its UUID or volume label (cf.
e2label(8) or xfs_admin(8)), writing LABEL=<label> or UUID=<uuid>,
e.g., ‘LABEL=Boot’ or ‘UUID=3e6be9de-8139-11d1-9106-a43f08d823a6’.
This will make the system more robust: adding or removing a SCSI disk
changes the disk device name but not the filesystem volume label.