how to decide the parameter value of root in grub.conf
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to decide the parameter value of root in grub.conf
After I installed Linux OS(for example:SuSE10,redhat5),the [root] parmeter of [kernel] in created grub.conf seems that sometimes it's defined to device name.sometimes it's defined to Label or sometimes UUID.
So ,I want to know what is that relative to? Hard disk type or OS version or both?
After I installed Linux OS(for example:SuSE10,redhat5),the [root] parmeter of [kernel] in created grub.conf seems that sometimes it's defined to device name.sometimes it's defined to Label or sometimes UUID.
So ,I want to know what is that relative to? Hard disk type or OS version or both?
Thanks.
root argument tells the kernel what device to be used as a root file system.
you can define value as a partition, LABEL or UUID. This value is related root file system.
mostly in redhat system it configured as partition or LABEL
in ubuntu 10.04 it configured as UUID number
in debian lenny it configured as partition
you can use different parameter for root file system. for example if your file system on /dev/sda1 and label is "/"
you can use
Code:
kernel /vmlinuz-2.4.18-0.12-jul2001 ro root=/dev/sda1 ro quite
OR
kernel /vmlinuz-2.4.18-0.12-jul2001 ro root=LABEL=/ ro quite
OR
kernel /vmlinuz-2.4.18-0.12-jul2001 ro root=UUID=uuid number ro quite
whatever option you use it will always point root file system. if your parameter is incorrect then linux wan't boot.
Note, however, that using a drive/partition specification requires that you change your GRUB boot configuration file if you change your partitioning, and that using a partition label requires that your boot drive label(s) be unique for your whole drive farm.
thanks for your detailed explanation.
Now, what I want to know is what root argument is when installed OS.
on other words,what is initial kernel's options?
the following is rule or experience?Is there offical document that specifes these rules?
thanks.
-----------------------------
mostly in redhat system it configured as partition or LABEL
in ubuntu 10.04 it configured as UUID number
in debian lenny it configured as partition
-----------------------------
Quote:
Originally Posted by sem007
Hi redhatz_zhao,
root argument tells the kernel what device to be used as a root file system.
you can define value as a partition, LABEL or UUID. This value is related root file system.
mostly in redhat system it configured as partition or LABEL
in ubuntu 10.04 it configured as UUID number
in debian lenny it configured as partition
you can use different parameter for root file system. for example if your file system on /dev/sda1 and label is "/"
you can use
Code:
kernel /vmlinuz-2.4.18-0.12-jul2001 ro root=/dev/sda1 ro quite
OR
kernel /vmlinuz-2.4.18-0.12-jul2001 ro root=LABEL=/ ro quite
OR
kernel /vmlinuz-2.4.18-0.12-jul2001 ro root=UUID=uuid number ro quite
whatever option you use it will always point root file system. if your parameter is incorrect then linux wan't boot.
HTH
Last edited by redhatz_zhao; 07-22-2010 at 01:42 AM.
Note, however, that using a drive/partition specification requires that you change your GRUB boot configuration file if you change your partitioning, and that using a partition label requires that your boot drive label(s) be unique for your whole drive farm.
thanks for your detailed explanation.
Now, what I want to know is what root argument is when installed OS.
on other words,what is initial kernel's options?
the following is rule or experience?Is there offical document that specifes these rules?
thanks.
-----------------------------
mostly in redhat system it configured as partition or LABEL
in ubuntu 10.04 it configured as UUID number
in debian lenny it configured as partition
-----------------------------
It is based on my experience.You can search their sites for the same.
Quote:
[supplementation]
Today,I tried to install SUSE 10.I fount that it seems root argument is decide by editing fstab when creating / partition.
Is the guess right?
but not all the OS's fstab can be customized in installing
Yes you are right. You can change fstab option (in expert mode)during suse 10 installation.In redhat,ubuntu there is no such option available.
I am new member to this forum.I am searching about grub problem and i found this useful information.
one question about UUID.
How can i find UUID?
Thanks,
If your distribution uses udev (most distributions do so), lots of useful information can be found in the subdirectories of /dev/disk. For example, a ls -l /dev/disk/by-uuid will usually show you the UUIDs of all the disk devices attached you your system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.