Bug#542898: grub-pc: install finds kernel command line properly, but doesn't write it to /etc/default/grub

Corey Hickey bugfood-c at fatooh.org
Sat Aug 22 04:21:29 UTC 2009


Package: grub-pc
Version: 1.96+20090808-1
Severity: normal

Hello,

I like the transition from grub-legacy to grub2 so far, except for one
detail that I have been unable to troubleshoot yet. When I install the
grub-pc package, I get prompted:

"The following Linux command line was extracted from the `kopt'
parameter in GRUB Legacy's menu.lst. Please verify that it is correct,
and modify it if necessary."

The command line shown was correctly parsed from menu.lst, so I leave
it alone. The installation scripts then go on to generate
/etc/default/grub and /boot/grub/grub.cfg, but the kernel command line
seems to get ignored. In /etc/default/grub, a line is generated:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

That "quiet" option then gets propagated on to /boot/grub/grub.cfg. If
I change the GRUB_CMDLINE_LINUX_DEFAULT option manually and run
update-grub2, that works ok.

I thought it would be good to report this in case it happens to other
people. My grub-legacy menu.lst should be attached. I can reproduce the
problem right now by running:

# apt-get --purge remove grub-pc
# rm /boot/grub/core.img
# apt-get install grub-pc

Thanks,
Corey

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/disk/by-uuid/036c4ae3-4272-410d-91ef-0bb0b9dddcc0 / reiserfs rw,relatime 0 0
/dev/hda1 /mnt/freedos vfat rw,relatime,fmask=0022,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/hda
*********************** 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
set timeout=5
set root=(hd0,6)
search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
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
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, Linux 2.6.30.5" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.30.5 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro  quiet
	initrd	/boot/initrd.img-2.6.30.5
}
menuentry "Debian GNU/Linux, Linux 2.6.30.5 (recovery mode)" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.30.5 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro single 
	initrd	/boot/initrd.img-2.6.30.5
}
menuentry "Debian GNU/Linux, Linux 2.6.28.7" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.28.7 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro  quiet
	initrd	/boot/initrd.img-2.6.28.7
}
menuentry "Debian GNU/Linux, Linux 2.6.28.7 (recovery mode)" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.28.7 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro single 
	initrd	/boot/initrd.img-2.6.28.7
}
menuentry "Debian GNU/Linux, Linux 2.6.28" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.28 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro  quiet
	initrd	/boot/initrd.img-2.6.28
}
menuentry "Debian GNU/Linux, Linux 2.6.28 (recovery mode)" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.28 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro single 
	initrd	/boot/initrd.img-2.6.28
}
menuentry "Debian GNU/Linux, Linux 2.6.26.3" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.26.3 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro  quiet
	initrd	/boot/initrd.img-2.6.26.3
}
menuentry "Debian GNU/Linux, Linux 2.6.26.3 (recovery mode)" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.26.3 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro single 
	initrd	/boot/initrd.img-2.6.26.3
}
menuentry "Debian GNU/Linux, Linux 2.6.24.2" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.24.2 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro  quiet
	initrd	/boot/initrd.img-2.6.24.2
}
menuentry "Debian GNU/Linux, Linux 2.6.24.2 (recovery mode)" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.24.2 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro single 
	initrd	/boot/initrd.img-2.6.24.2
}
menuentry "Debian GNU/Linux, Linux 2.6.23.12" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.23.12 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro  quiet
	initrd	/boot/initrd.img-2.6.23.12
}
menuentry "Debian GNU/Linux, Linux 2.6.23.12 (recovery mode)" {
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 036c4ae3-4272-410d-91ef-0bb0b9dddcc0
	linux	/boot/vmlinuz-2.6.23.12 root=UUID=036c4ae3-4272-410d-91ef-0bb0b9dddcc0 ro single 
	initrd	/boot/initrd.img-2.6.23.12
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30.5
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
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.96+20090808-1 GRand Unified Bootloader, version 
ii  libc6                    2.9-19          GNU C Library: Shared libraries
ii  ucf                      3.0018          Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
pn  desktop-base                  <none>     (no description available)
ii  genisoimage                   9:1.1.9-1  Creates ISO-9660 CD-ROM filesystem

-- debconf information:
* grub-pc/linux_cmdline:
* grub-pc/chainload_from_menu.lst: true
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/install_devices:
-------------- next part --------------
# 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         0saved

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

# Pretty colours
color cyan/blue white/blue
splashimage /boot/grub/debian_cooleye-mod.xpm.gz

## 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=ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap

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

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

## 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,5)
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.5
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.30.5 ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap 
initrd		/boot/initrd.img-2.6.30.5

title		Debian GNU/Linux, kernel 2.6.28.7
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.28.7 ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap 
initrd		/boot/initrd.img-2.6.28.7

title		Debian GNU/Linux, kernel 2.6.28
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.28 ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap 
initrd		/boot/initrd.img-2.6.28

title		Debian GNU/Linux, kernel 2.6.26.3
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.26.3 ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap 
initrd		/boot/initrd.img-2.6.26.3

title		Debian GNU/Linux, kernel 2.6.24.2
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.24.2 ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap 
initrd		/boot/initrd.img-2.6.24.2

title		Debian GNU/Linux, kernel 2.6.23.12
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.23.12 ro root=/dev/hda6 init=/sbin/bootchartd resume=/dev/hda5 resume2=swap:/dev/hda5 video=uvesafb:1400x1050-32,ywrap 
initrd		/boot/initrd.img-2.6.23.12

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

### END DEBIAN AUTOMAGIC KERNELS LIST

title		back to mbr
root		(hd0,0)
chainloader	(hd0)+1


More information about the Pkg-grub-devel mailing list