LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-02-2008, 05:20 PM   #1
sandaili
LQ Newbie
 
Registered: Jun 2007
Posts: 25

Rep: Reputation: 15
Can I assign a UUID to a disk added without deleting data? How?


I have a disk that is not automounted by Fedora 9. I would like it to be, and I'd like preferably for it to have it's own UUID. But, just by adding a unique UUID to the fstab, obviously won't work.

But I am afraid I can't find any information about how to add a UUID to an existing disk that is full of data. Anywhere. I've searched and searched....

L

Nevermind, I'm a moron. I assumed there wasn't a UUID because I was getting an error. However, I needed the right command, and I was using the wrong one. This is the command to find a UUID for a device in Fedora: udevinfo -q env -n /dev/sdb1

Hope that helps someone.

Last edited by sandaili; 07-02-2008 at 05:27 PM. Reason: found solution
 
Old 07-02-2008, 08:00 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,656
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Thank you.
I had a bit of trouble with 2 of my fat32 partitions having the same uuid number,

This might help me sort it out.

Regards, Glenn
 
Old 07-02-2008, 08:33 PM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
# uuidgen
# tune2fs /dev/hdaX -U numbergeneratedbyuuidgen
# vol_id /dev/hdaX
 
Old 07-02-2008, 08:57 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Not all filesystems support UUID - notably VFAT (and NTFS) last I looked. UUIDs can be generated for them, but labels are probably a better option for them.
 
Old 07-02-2008, 09:22 PM   #5
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,656
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Hey, Thanks for the info,

Mr.C., Can you give me a short description of what you posted, please?


syg00, fstab has these entries for...sdb8 and sdb9 both had UUID=4807-901A and while it was only one partition would show up, and it was difficult to navigate, let alone read and write files. So I edited it back to the old way... Possibly not supported as you mention.

excerpt from fstab,

# Entry for /dev/sda1 :
UUID=4C54BBD554BBBFCE /mnt/win_c ntfs-3g defaults 0 0
# Entry for /dev/sdb8 :UUID=4807-901A
/dev/sdb8 /mnt/win_c2 vfat defaults,umask=0,quiet 0 0
# Entry for /dev/sda10 :UUID=4807-8FD4
/dev/sda10 /mnt/win_d vfat defaults,umask=0,quiet 0 0
# Entry for /dev/sdb9 /mnt/win_d2:
/dev/sdb9 /mnt/win_d2 vfat defaults,umask=0,quiet 0 0

(wip)
cheers,
Regards, Glenn
 
Old 07-02-2008, 09:39 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Originally Posted by syg00 View Post
Not all filesystems support UUID - notably VFAT (and NTFS) last I looked. UUIDs can be generated for them, but labels are probably a better option for them.
Yes, you are correct.

Quote:
Originally Posted by GlennsPref View Post
Mr.C., Can you give me a short description of what you posted, please?
[/QUOTE]


1) generate a UUID for the device
2) push that UUID onto the meta-data for the ext[23] file system
3) verify the value placed there

$ man uuidgen tune2fs vol_id

for the complete details.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/disk/by-uuid on install disk? randomsel Slackware 6 06-29-2008 08:54 AM
initial ram disk image support for UUID query aus9 Linux - Kernel 9 02-03-2008 10:31 PM
How to assign disk quota(disk space limited) to user and group. hocheetiong Linux - Newbie 1 08-24-2007 04:20 AM
added hdb - want to access old data joel b Fedora 1 02-21-2005 02:02 AM
assign new data partition to specific users wycolorado Linux - Newbie 2 01-01-2005 09:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration