Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Misc > UUID

Forgot Password?
 Misc   Any questions or Linux discussion that does not fit in any of the other technical areas.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 01-18-2005   #1 (permalink)
Linux Newbie
 
twoHats's Avatar
 
Join Date: Jan 2005
Location: NH, USA
Posts: 194
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
twoHats is offline  


Old 01-18-2005   #2 (permalink)
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
zeeone is offline  
Old 01-19-2005   #3 (permalink)
Linux Newbie
 
twoHats's Avatar
 
Join Date: Jan 2005
Location: NH, USA
Posts: 194
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
twoHats is offline  
Old 01-19-2005   #4 (permalink)
Linux User
 
Join Date: Jan 2005
Location: Arizona
Posts: 288
Send a message via AIM to Ethyriel
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
Ethyriel is offline  
Old 01-20-2005   #5 (permalink)
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
zeeone is offline  
Old 01-20-2005   #6 (permalink)
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
puntmuts is offline  
Old 01-20-2005   #7 (permalink)
Content Team
 
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
sarumont is offline  
Old 01-26-2005   #8 (permalink)
Just Joined!
 
Join Date: Jan 2005
Posts: 4
Udev or devfs has got nothing to do with this.
cthompson is offline  
Old 01-26-2005   #9 (permalink)
Linux User
 
benjamin20's Avatar
 
Join Date: Oct 2004
Location: jacksonville beach FL
Posts: 299
Send a message via AIM to benjamin20
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
benjamin20 is offline  
Old 01-31-2005   #10 (permalink)
Linux Newbie
 
twoHats's Avatar
 
Join Date: Jan 2005
Location: NH, USA
Posts: 194
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(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.
, 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
twoHats is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 03:47 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2