View previous topic :: View next topic |
Author |
Message |
Kasumi_Ninja Veteran
Joined: 18 Feb 2006 Posts: 1825 Location: The Netherlands
|
Posted: Sun Jul 20, 2008 8:48 pm Post subject: [HOWTO] UUID with Gentoo |
|
|
UUID can come in handy for those of us who want a fixed entry in fstab for their hard drives and/or removable media. And best off all, it's very easy! Here's how to do it:
1) Make sure you are using an initrd image to boot Gentoo (UUID requires this). if you haven't a initrd image you can create one easily with genkernel:
Code: | genkernel --install --bootloader=grub --menuconfig --disklabel all |
2) Find out your devices unique volume id (substitute /dev/sda with your drive):
3) Replace the /dev/sd* entries in your fstab with UUID= entries. Example fstab entry:
Code: | UUID=f28284cc-e994-4b3c-be52-cb45c427f88f none swap sw 0 0 |
4)Reboot _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
Last edited by Kasumi_Ninja on Mon Jul 21, 2008 7:31 am; edited 2 times in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54212 Location: 56N 3W
|
Posted: Sun Jul 20, 2008 8:57 pm Post subject: |
|
|
Moved from Kernel & Hardware to Documentation, Tips & Tricks.
Looks like it belongs here _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Sun Jul 20, 2008 8:59 pm Post subject: |
|
|
When running genkernel (the latest stable version) you have to include the "--disklabel" option, or the blkid command will not be included in the initramfs image. (and mounting by label/uuid will fail)
Edit: Also, it is not necessary to use genkernel to build your kernel for this, as long as you include loopback, ramdisk, and initrd support in your kernel, you can use genkernel to only build an initrd. "genkernel --disklabel initrd" will only build an initrd image. You can then use this image with uuid/label mounting. (this is what I did with my manually configured kernel) |
|
Back to top |
|
|
|