Bug#535239: grub-pc: Multiple kernel root= paramaters

Andrew Vaughan ajv-lists at netspace.net.au
Sun Sep 27 15:11:48 UTC 2009


Package: grub-pc
Version: 1.97~beta3-1
Severity: normal

Hi

Time for another variation on this bug.

I was asked the debconf dialog about kopt, however the extracted value was empty.
I copied and pasted "root=/dev/hda5 ro" into the dialog.  Next came the defoptions question.
Old value was 
# defoptions=
The debconf dialog supplied (defaulted to ?) "quiet" which I accepted.

During reboot I checked the commandline and noticed
linux   /boot/vmlinuz-2.6.30-1-686 root=UUID=24ed1821-c6b9-433b-9e03-b794a442e389 ro root=/dev/hda5 ro quiet

Given that grub-pc generated the root=UUID=24e... param perhaps it did extract the kopt 
root=/dev/hda5 param successfully, but discarded it knowing it was going to add a root=
param anyway.

The kernel booted ok, so duplicate root params aren't necessarily a problem.

HTH

Andrew V.



*********************************** BEGIN /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),       
#            grub-md5-crypt, /usr/share/doc/grub    
#            and /usr/share/doc/grub-doc/.          

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.              
#                                                                            
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.                          
default         0                                                             

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).                                          
timeout         15                                                             

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the  
# command 'lock'                                                              
# e.g. password topsecret                                                     
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/                        
# password topsecret                                                          

#
# examples
#         
# title         Windows 95/98/NT/2000
# root          (hd0,0)              
# makeactive                         
# chainloader   +1                   
#                                    
# title         Linux                
# root          (hd0,1)              
# kernel        /vmlinuz root=/dev/hda2 ro
#                                         

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## 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=/dev/hda5 ro                                          

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

## should update-grub create alternative automagic boot options
## e.g. alternative=true                                       
##      alternative=false                                      
# alternative=true                                             

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true                                 
##      lockalternative=false                                
# lockalternative=false                                      

## additional options to use with the default boot option, but not with the
## alternatives                                                            
## e.g. defoptions=vga=791 resume=/dev/hda5                                
# defoptions=                                                              

## should update-grub lock old automagic boot options
## e.g. lockold=false                                
##      lockold=true                                 
# lockold=false                                      

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=                                                       

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0                                             

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single                  
# altoptions=(recovery mode) single                      

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the     
## alternative kernel options                               
## e.g. howmany=all                                         
##      howmany=7                                           
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title           Chainload into GRUB 2
root            (hd0,4)
kernel          /boot/grub/core.img

title           ���������������������������������������������������������������������
root

title           When you have verified GRUB 2 works, you can use this command to
root

title           complete the upgrade:  upgrade-from-grub-legacy
root

title           ���������������������������������������������������������������������
root

title           Debian GNU/Linux, kernel 2.6.30-1-686
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.30-1-686 root=/dev/hda5 ro
initrd          /boot/initrd.img-2.6.30-1-686

title           Debian GNU/Linux, kernel 2.6.30-1-686 (recovery mode)
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.30-1-686 root=/dev/hda5 ro single
initrd          /boot/initrd.img-2.6.30-1-686

title           Debian GNU/Linux, kernel 2.6.30-1-486
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.30-1-486 root=/dev/hda5 ro
initrd          /boot/initrd.img-2.6.30-1-486

title           Debian GNU/Linux, kernel 2.6.30-1-486 (recovery mode)
root            (hd0,4)
kernel          /boot/vmlinuz-2.6.30-1-486 root=/dev/hda5 ro single
initrd          /boot/initrd.img-2.6.30-1-486

title           Debian GNU/Linux, kernel memtest86+
root            (hd0,4)
kernel          /boot/memtest86+.bin

************************************* END /boot/grub/menu.lst

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/hda5 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/hda1 /mnt/p4-win2k fuseblk ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/hda2 /mnt/p4-winxp fuseblk ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/hda3 /mnt/p4-win7-rc fuseblk ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/hda6 /mnt/p4-lenny ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/hda9 /srv/shared ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/hdb1 /mnt/p4-games fuseblk ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/sda1 /srv/dirvish ext3 rw,noatime,errors=remount-ro,data=ordered 0 0
/dev/hda5 /mnt/p4-squeeze ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/hda
(hd1)	/dev/hdb
(hd2)	/dev/sda
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 24ed1821-c6b9-433b-9e03-b794a442e389
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 24ed1821-c6b9-433b-9e03-b794a442e389
insmod png
if background_image /boot/grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, Linux 2.6.30-1-686" {
	insmod ext2
	set root=(hd0,5)
	search --no-floppy --fs-uuid --set 24ed1821-c6b9-433b-9e03-b794a442e389
	linux	/boot/vmlinuz-2.6.30-1-686 root=UUID=24ed1821-c6b9-433b-9e03-b794a442e389 ro root=/dev/hda5 ro quiet
	initrd	/boot/initrd.img-2.6.30-1-686
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-686 (recovery mode)" {
	insmod ext2
	set root=(hd0,5)
	search --no-floppy --fs-uuid --set 24ed1821-c6b9-433b-9e03-b794a442e389
	linux	/boot/vmlinuz-2.6.30-1-686 root=UUID=24ed1821-c6b9-433b-9e03-b794a442e389 ro single root=/dev/hda5 ro
	initrd	/boot/initrd.img-2.6.30-1-686
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-486" {
	insmod ext2
	set root=(hd0,5)
	search --no-floppy --fs-uuid --set 24ed1821-c6b9-433b-9e03-b794a442e389
	linux	/boot/vmlinuz-2.6.30-1-486 root=UUID=24ed1821-c6b9-433b-9e03-b794a442e389 ro root=/dev/hda5 ro quiet
	initrd	/boot/initrd.img-2.6.30-1-486
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-486 (recovery mode)" {
	insmod ext2
	set root=(hd0,5)
	search --no-floppy --fs-uuid --set 24ed1821-c6b9-433b-9e03-b794a442e389
	linux	/boot/vmlinuz-2.6.30-1-486 root=UUID=24ed1821-c6b9-433b-9e03-b794a442e389 ro single root=/dev/hda5 ro
	initrd	/boot/initrd.img-2.6.30-1-486
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	linux	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	linux	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]       1.5.27       Debian configuration management sy
ii  grub-common                 1.97~beta3-1 GRand Unified Bootloader, version 
ii  libc6                       2.9-25       GNU C Library: Shared libraries
ii  ucf                         3.0022       Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
ii  desktop-base                  5.0.5      common files for the Debian Deskto
ii  genisoimage                   9:1.1.9-1  Creates ISO-9660 CD-ROM filesystem

-- debconf information:
  grub2/kfreebsd_cmdline:
* grub2/linux_cmdline: root=/dev/hda5 ro
* grub-pc/chainload_from_menu.lst: true
  grub-pc/kopt_extracted: true
  grub-pc/postrm_purge_boot_grub: false
  grub2/kfreebsd_cmdline_default: quiet
* grub2/linux_cmdline_default: quiet
  grub-pc/install_devices:





More information about the Pkg-grub-devel mailing list