Bug#550319: grub-pc: grub2 does not honor quoted kernel command line arguments
Norbert Preining
preining at logic.at
Fri Oct 9 06:37:11 UTC 2009
Package: grub-pc
Version: 1.97~beta4-1
Severity: important
As you can see below my kernel cmd line is
linux /boot/vmlinuz-2.6.32-rc3 root=/dev/sda3 ro acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
so there are quotes around the argument for acpi_osi.
Unfortunately grub-pc does NOT honor that quotes and strips them
before passing that to the kernel as can be seen from the boot messages:
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-rc3 root=/dev/sda3 ro acpi_osi=!Windows 2006 nmi_watchdog=0 reboot=pci
To be sure I added a printk to params.c from the kernel that shows that
current argument and value:
[ 0.000000] DDDD param=BOOT_IMAGE, val=.../boot/vmlinuz-2.6.32-rc3...
[ 0.000000] DDDD param=root, val=.../dev/sda3...
[ 0.000000] DDDD param=ro, val=...<NULL>...
[ 0.000000] DDDD param=acpi_osi, val=...!Windows...
[ 0.000000] DDDD param=2006, val=...<NULL>...
[ 0.000000] DDDD param=nmi_watchdog, val=...0...
[ 0.000000] DDDD param=reboot, val=...pci...
Here we go, that is completely hosed.
That is in fact a SERIOUS bug and a severe regression against grub1 where
it was working.
No combinations of \\\""" '"'" or whatever could convince grub2 to take
the quotes over to the kernel.
Please consider this a serious bug, forward it upstream.
-- Package-specific info:
*********************** BEGIN /proc/mounts
/dev/sda3 / ext3 rw,noatime,errors=remount-ro,user_xattr,data=writeback 0 0
/dev/sda2 /xp fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/loop0 /media/TLDVD iso9660 ro,relatime 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
if terminal_input console ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_input
terminal console
fi
if terminal_output console ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal console
fi
set timeout=5
### 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.32-rc3" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.32-rc3 root=/dev/sda3 ro acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.32-rc3
}
menuentry "Debian GNU/Linux, Linux 2.6.32-rc3 (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.32-rc3 root=/dev/sda3 ro single acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.32-rc3
}
menuentry "Debian GNU/Linux, Linux 2.6.31.2-rc1" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.31.2-rc1 root=/dev/sda3 ro acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.31.2-rc1
}
menuentry "Debian GNU/Linux, Linux 2.6.31.2-rc1 (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.31.2-rc1 root=/dev/sda3 ro single acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.31.2-rc1
}
menuentry "Debian GNU/Linux, Linux 2.6.31" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.31 root=/dev/sda3 ro acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.31
}
menuentry "Debian GNU/Linux, Linux 2.6.31 (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.31 root=/dev/sda3 ro single acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.31
}
menuentry "Debian GNU/Linux, Linux 2.6.30" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.30 root=/dev/sda3 ro acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.30
}
menuentry "Debian GNU/Linux, Linux 2.6.30 (recovery mode)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux /boot/vmlinuz-2.6.30 root=/dev/sda3 ro single acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
initrd /boot/initrd.img-2.6.30
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 961635f4-762d-4136-a3d5-35fca8e4f3d8
linux16 /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 ###
# For booting Microsoft Windows
menuentry "Microsoft XP" {
set root=(hd0,2)
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Windows Vista Rescue Partition" {
set root=(hd0,1)
chainloader +1
}
# 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 unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-rc3 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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~beta4-1 GRand Unified Bootloader, version
ii libc6 2.9-27 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: acpi_osi="!Windows 2006" nmi_watchdog=0 reboot=pci
* grub-pc/chainload_from_menu.lst: true
grub-pc/kopt_extracted: false
* grub-pc/install_devices: /dev/sda
grub-pc/postrm_purge_boot_grub: false
grub2/kfreebsd_cmdline_default: quiet
* grub2/linux_cmdline_default:
More information about the Pkg-grub-devel
mailing list