Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User twoHats's Avatar
    Join Date
    Jan 2005
    Location
    NH, USA
    Posts
    280

    UUID


    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
    - Clouds don't crash - Bertrand Meyer

    registered Linux user 393557

    finally - hw to brag about - but next year it will look pitifully quaint:
    Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
    circa 2006

  2. #2
    Linux User zeeone's Avatar
    Join Date
    Oct 2003
    Location
    Third Stone From The Sun
    Posts
    287
    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

  3. #3
    Linux User twoHats's Avatar
    Join Date
    Jan 2005
    Location
    NH, USA
    Posts
    280
    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.
    - Clouds don't crash - Bertrand Meyer

    registered Linux user 393557

    finally - hw to brag about - but next year it will look pitifully quaint:
    Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
    circa 2006

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jan 2005
    Location
    Arizona
    Posts
    288
    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.
    Michael Salivar

    Man knows himself insofar as he knows the world, becoming aware of it only in himself, and of himself only within it.
    --Goethe

  6. #5
    Linux User zeeone's Avatar
    Join Date
    Oct 2003
    Location
    Third Stone From The Sun
    Posts
    287
    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?
    Research, research, research before you walk the plank.
    Registered Linux User #398829

  7. #6
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    lsusb -v gives a lot of information about your USB connected equipment.
    I\'m so tired .....
    #200472

  8. #7
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    To actually get the UUID of an object, you have to have udev and sysfs running (you can't have one without the other ). Then you can use this command:

    Code:
    udevinfo -a -p /sys/class/rest_of_path_here
    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/.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  9. #8
    Just Joined!
    Join Date
    Jan 2005
    Posts
    4
    Udev or devfs has got nothing to do with this.

  10. #9
    Linux User benjamin20's Avatar
    Join Date
    Oct 2004
    Location
    jacksonville beach FL
    Posts
    317
    visa versa
    nVidia G-Force 6600GT (bfg) pci-e: amd 64 2000+ (939): 1024 corsair ram: 2X 80gb seagate harddisk SATA: plextor cd/dvd-read/write cdrom SATA

  11. #10
    Linux User twoHats's Avatar
    Join Date
    Jan 2005
    Location
    NH, USA
    Posts
    280

    UUID

    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:
    Code:
           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&#40;8&#41; or  xfs_admin&#40;8&#41;&#41;,  writing  LABEL=<label>  or  UUID=<uuid>,
           e.g.,   ‘LABEL=Boot’   or  ‘UUID=3e6be9de-8139-11d1-9106-a43f08d823a6’.
           This will make the system more robust&#58; adding or removing a  SCSI  disk
           changes the disk device name but not the filesystem volume label.
    , but how to get the UUID of the various devices is my problem.
    - Clouds don't crash - Bertrand Meyer

    registered Linux user 393557

    finally - hw to brag about - but next year it will look pitifully quaint:
    Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
    circa 2006

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •