LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   how to use UUID on fstab and grub (http://www.linuxquestions.org/questions/debian-26/how-to-use-uuid-on-fstab-and-grub-899157/)

nicolasdiogo 08-24-2011 07:53 AM

how to use UUID on fstab and grub
 
hello


i would like to find out how to change my system so that it would use UUID/labels instead of the BUS locations (eg: /dev/sda1).

i did find a lot of bits - but not a proper article on how to do this.

could someone post a link or an explanation on how to do this?

thanks,


Nicolas

andrewthomas 08-24-2011 09:04 AM

Code:

blkid
as root will provide you with the corresponding UUID's for each device.

Then edit your /etc/fstab

changing the

Code:

/dev/sdXY
entries to
Code:

UUID=
and the uuid that was listed in the blkid command.

Then, if you are using grub2, you just have do
Code:

update-grub
If you are using legacy grub, then edit your /boot/grub/menu.lst:

changing
Code:

root=/dev/sdXY
to
Code:

root=/dev/disk/by-uuid/whatever-blkid-outputs-here
on your kernel line

nicolasdiogo 08-24-2011 11:36 AM

[solved]
 
many thanks,

clear and concise.

fantastic..

andrewthomas 08-24-2011 03:46 PM

You're welcome.

Glad to be of help.

EDIT: You may also have to update your initramfs after you make the changes.

Code:

update-initramfs -u -k all


All times are GMT -5. The time now is 01:37 PM.