Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1L1bre-0002VL-Bd for mharc-grub-devel@gnu.org; Sun, 16 Nov 2008 02:16:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1brb-0002Uw-Sq for grub-devel@gnu.org; Sun, 16 Nov 2008 02:16:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1bra-0002Uk-Kj for grub-devel@gnu.org; Sun, 16 Nov 2008 02:16:06 -0500 Received: from [199.232.76.173] (port=48102 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1bra-0002Uh-FS for grub-devel@gnu.org; Sun, 16 Nov 2008 02:16:06 -0500 Received: from yx-out-1718.google.com ([74.125.44.154]:39944) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L1brY-0005Yk-Oa for grub-devel@gnu.org; Sun, 16 Nov 2008 02:16:05 -0500 Received: by yx-out-1718.google.com with SMTP id 34so934630yxf.66 for ; Sat, 15 Nov 2008 23:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=ylDIuvwwqwGxouPzvyVboFLKbSuuNbmz/WDwkF67vEk=; b=FvkZYlGAf05zBOpmRtM/sVUwtJkGv5YvOz911Ff5nRS2g30LkR41pG0cSENxhDddVg 9wFBaV+p3y6PNX4K31uWTqFDI8fkh33g3eXQk4XKI8MaOwQL1EBM06xITBS6vTL7rkbg RBsMhAMsP/f8bQlYstCD2r7LHwcfBsDBhL11Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=BBEZTEIk0DiqG0UcIRPKH4FmZ4mItK0bf3dSDYPVwdh1G7iwYRCWdi0tBouRUncU+c zII/u+OBO3iE10kYluiUBn+AI6c35tv9RfejL9qHhekSVtYgq1zMcR85z3nbnNnEFKQf A7+jfd4QF9MgI6V01U/DQH7CaRSInQuBY17zQ= Received: by 10.64.213.8 with SMTP id l8mr2610867qbg.3.1226819763264; Sat, 15 Nov 2008 23:16:03 -0800 (PST) Received: by 10.64.97.4 with HTTP; Sat, 15 Nov 2008 23:16:03 -0800 (PST) Message-ID: Date: Sun, 16 Nov 2008 07:16:03 +0000 From: "Jonathan Ellis" To: grub-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_31162_22700708.1226819763238" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Use of root LABEL=mylabel in menu.lst X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2008 07:16:08 -0000 ------=_Part_31162_22700708.1226819763238 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I had to reorganise my partitions and it was necessary to copy my root partition and then delete the original (I won't bore you with the reasons for this). This meant that the device id for the root partition changed (/dev/sda1 to /dev/sda2 or something similar). To make it easier in future I now refer to all my partitions by volume label instead of by number. This has the advantage of making the menu.lst and fstab (in Linux) more easily human-readable. Unfortunately it seems that the following statements in menu.lst will not work groot=LABEL=mylabel root LABEL=mylabel and at boot grub gives *Error 11: Unrecognized device string* This is rather odd because the following statements (from menu.lst) work correctly kopt=root=LABEL=ubuntu8-04 ro kernel /boot/vmlinuz-2.6.24-20-generic root=LABEL=ubuntu8-04 ro quiet splash so I have had to change these to groot=(hd0,3) root (hd0,3) Is there any way I can make these work with labels instead of numbers? I have attached an extract from menu.lst below and fstab below. Kind regards, Jonathan Ellis ---------- Extract from menu.lst --------------------- ## ## Start Default Options ## ## default kernel options ## default kernel options for automagic boot options ## If you want special options for specific kernels use kopt_x_y_z ## where x.y.z is kernel version. Minor versions can be omitted. ## e.g. kopt=root=/dev/hda1 ro ## kopt_2_6_8=root=/dev/hdc1 ro ## kopt_2_6_8_2_686=root=/dev/hdc2 ro # kopt=root=LABEL=ubuntu8-04 ro ####### Irrelevant lines deleted in this email for clarity ###### ## default grub root device ## e.g. groot=(hd0,0) # groot=(hd0,3) ####### Irrelevant lines deleted in this email for clarity ###### ## ## End Default Options ## title Ubuntu 8.04.1, kernel 2.6.24-20-generic root (hd0,3) kernel /boot/vmlinuz-2.6.24-20-generic root=LABEL=ubuntu8-04 ro quiet splash initrd /boot/initrd.img-2.6.24-20-generic quiet ####### Irrelevant lines deleted in this email for clarity ###### ----------------- Linux fstab file ----------------------- # /etc/fstab: static file system information. # # proc /proc proc defaults 0 0 LABEL=ubuntu8-04 / ext3 relatime,errors=remount-ro 0 1 LABEL=grub /boot/grub ext3 nodev,nosuid 0 2 LABEL=home /home ext3 nodev,nosuid 0 2 LABEL=swap2 none swap sw 0 0 LABEL=extraspace /media/extraspace ext3 nodev,nosuid 0 2 LABEL=spare /media/spare ext3 nodev,nosuid 0 2 LABEL=winxp /mnt/winxp ntfs nodev,nosuid 0 2 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0 ------=_Part_31162_22700708.1226819763238 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,
I had to reorganise my partitions and it was necessary to copy my root partition and then delete the original (I won't bore you with the reasons for this). This meant that the device id for the root partition changed (/dev/sda1 to /dev/sda2 or something similar).

To make it easier in future I now refer to all my partitions by volume label instead of by number. This has the advantage of making the menu.lst and fstab (in Linux) more easily human-readable. Unfortunately it seems that the following statements in menu.lst will not work
     groot=LABEL=mylabel
     root     LABEL=mylabel

and at boot grub gives
     Error 11: Unrecognized device string

This is rather odd because the following statements (from menu.lst) work correctly
     kopt=root=LABEL=ubuntu8-04 ro
     kernel        /boot/vmlinuz-2.6.24-20-generic root=LABEL=ubuntu8-04 ro quiet splash

so I have had to change these to
     groot=(hd0,3)
     root        (hd0,3)

Is there any way I can make these work with labels instead of numbers?
I have attached an extract from menu.lst below and fstab below.

Kind regards,
Jonathan Ellis


---------- Extract from menu.lst ---------------------

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=LABEL=ubuntu8-04 ro

####### Irrelevant lines deleted in this email for clarity ######

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,3)

####### Irrelevant lines deleted in this email for clarity ######

## ## End Default Options ##

title        Ubuntu 8.04.1, kernel 2.6.24-20-generic
root        (hd0,3)
kernel        /boot/vmlinuz-2.6.24-20-generic root=LABEL=ubuntu8-04 ro quiet splash
initrd        /boot/initrd.img-2.6.24-20-generic
quiet

####### Irrelevant lines deleted in this email for clarity ######

----------------- Linux fstab file -----------------------

# /etc/fstab: static file system information.
#
# <file system>     <mount point>           <type>      <options>               <dump>  <pass>
proc                /proc                   proc        defaults                0    0
LABEL=ubuntu8-04    /                ext3        relatime,errors=remount-ro    0    1
LABEL=grub        /boot/grub            ext3        nodev,nosuid            0    2
LABEL=home        /home                ext3        nodev,nosuid            0    2
LABEL=swap2        none                    swap        sw                      0    0

LABEL=extraspace    /media/extraspace        ext3        nodev,nosuid             0    2
LABEL=spare        /media/spare            ext3        nodev,nosuid            0    2
LABEL=winxp        /mnt/winxp            ntfs        nodev,nosuid             0     2

/dev/scd0           /media/cdrom0           udf,iso9660     user,noauto,exec,utf8        0    0
/dev/fd0            /media/floppy0          auto        rw,user,noauto,exec,utf8    0    0



------=_Part_31162_22700708.1226819763238--