LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-24-2011, 06:53 AM   #1
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Rep: Reputation: 20
Question 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
 
Old 08-24-2011, 08:04 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
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
 
Old 08-24-2011, 10:36 AM   #3
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
[solved]

many thanks,

clear and concise.

fantastic..
 
Old 08-24-2011, 02:46 PM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
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

Last edited by andrewthomas; 08-24-2011 at 03:42 PM.
 
  


Reply

Tags
boot, uuid


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cameras, pendrive: how to have severail UUID into the /etc/fstab ? Xeratul Linux - General 3 12-29-2010 06:34 AM
Having issues with the changes to fstab (UUID's) Cage47 Linux - Hardware 4 01-15-2010 12:54 PM
fstab sdxx or uuid or ... jesses93 Linux - General 1 01-05-2010 03:02 PM
UUID, grub, and fstab radiodee1 Debian 4 09-16-2008 05:56 AM
How to clone HD when using UUID in fstab? Frank64 Linux - General 5 03-09-2008 02:17 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration