Bug#541462: grub-pc: Incompatible grub.cfg after upgrade
Harald Braumann
harry at unheit.net
Fri Aug 14 12:40:10 UTC 2009
Package: grub-pc
Version: 1.96+20090725-1
Severity: normal
Hi,
I upgraded grub-pc but didn't install it in the boot record. A new
grub.cfg was still created by update-grub and it is incompatible with
the grub version installed in the boot record. The culprit is the line
search --no-floppy --fs-uuid ...
When booting and selecting the first menu entry, I get the error:
error: Unknown argument `--no-floppy'
Pressing a key got me back to the menu. But if I enter `e' to edit the
entry, the `unknown argument' seems to have confused grub so much, that
it now only shows the first line of the menu entry, i.e. `insmod lvm', which
in turn confused me quite a bit. `grub-install' fixed the problem.
IMO, this whole automagic configuration system is far too fragile, anyway
and breaks the boot more often than not.
But a concrete solution for cases like this might be to only call update-grub
from postinst, if the user selects to install grub in the boot record and
leave it alone otherwise.
Cheers,
harry
PS: The new version of the loader doesn't get confused by unknown arguments.
I tried to add a nonsense argument, it showed me an error but I them can still
edit the menu entry with `e'.
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/mapper/vgsys-lvroot / ext3 rw,errors=remount-ro,data=ordered 0 0
/dev/mapper/vgraw-lvboot /boot ext3 rw,errors=continue,data=ordered 0 0
/dev/mapper/vghb-lvhb /home/hb ext3 rw,errors=continue,data=ordered 0 0
/dev/mapper/vgsys-lvvar /var ext3 rw,errors=continue,data=ordered 0 0
/dev/mapper/vgsys-lvvm /var/lib/vm ext3 rw,errors=continue,data=ordered 0 0
*********************** END /proc/mounts
*********************** BEGIN /boot/grub/device.map
(hd0) /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
set timeout=5
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
if loadfont /grub/ascii.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.29.3" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.29.3 root=/dev/mapper/vgsys-lvroot ro resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.29.3
}
menuentry "Debian GNU/Linux, Linux 2.6.29.3 (recovery mode)" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.29.3 root=/dev/mapper/vgsys-lvroot ro single resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.29.3
}
menuentry "Debian GNU/Linux, Linux 2.6.27.8" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.27.8 root=/dev/mapper/vgsys-lvroot ro resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.27.8
}
menuentry "Debian GNU/Linux, Linux 2.6.27.8 (recovery mode)" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.27.8 root=/dev/mapper/vgsys-lvroot ro single resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.27.8
}
menuentry "Debian GNU/Linux, Linux 2.6.26" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.26 root=/dev/mapper/vgsys-lvroot ro resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.26
}
menuentry "Debian GNU/Linux, Linux 2.6.26 (recovery mode)" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.26 root=/dev/mapper/vgsys-lvroot ro single resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.26
}
menuentry "Debian GNU/Linux, Linux 2.6.25-1-686" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.25-1-686 root=/dev/mapper/vgsys-lvroot ro resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.25-1-686
}
menuentry "Debian GNU/Linux, Linux 2.6.25-1-686 (recovery mode)" {
insmod lvm
set root=(vgraw-lvboot)
search --no-floppy --fs-uuid --set 4631fcaa-cb7f-4147-818f-001ce123668f
linux /vmlinuz-2.6.25-1-686 root=/dev/mapper/vgsys-lvroot ro single resume=swap:/dev/mapper/vgsys-lvswap no_console_suspend hpet=force acpi_sleep=s4_nohwsig
initrd /initrd.img-2.6.25-1-686
}
### 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 testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.29.3
Locale: LANG=POSIX, LC_CTYPE=de_AT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-pc depends on:
ii debconf [debconf-2.0] 1.5.27 Debian configuration management sy
ii grub-common 1.96+20090725-1 GRand Unified Bootloader, version
ii libc6 2.9-23 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
pn os-prober <none> (no description available)
-- debconf information:
* grub-pc/linux_cmdline:
* grub-pc/chainload_from_menu.lst: false
* grub-pc/install_devices:
More information about the Pkg-grub-devel
mailing list