Package: grub-common Version: 1.98+20100602-2 Hello,
since a little while (probably since 1.98+20100602-1) grubs savedefault doesn't work anymore. On boot, always the first entry is selected and thus booted automatically no matter what entry was chosen before. /boot/grub/grubenv always contains saved_entry=Debian instead of the complete menuentry name. I attached a patch that protects all variable expansions against spaces and makes savedefault working again. regards Mario -- Das Gegenteil einer trivialen Wahrheit ist falsch; das Gegenteil einer grossen Wahrheit ist ebenfalls wahr. -- Niels Bohr
--- /boot/grub/grub.cfg.orig 2010-06-05 02:30:59.000000000 +0200 +++ /boot/grub/grub.cfg 2010-06-06 21:18:06.000000000 +0200 @@ -6,12 +6,12 @@ # ### BEGIN /etc/grub.d/00_header ### -if [ -s $prefix/grubenv ]; then +if [ -s "$prefix"/grubenv ]; then load_env fi set default="${saved_entry}" -if [ ${prev_saved_entry} ]; then - set saved_entry=${prev_saved_entry} +if [ "${prev_saved_entry}" ]; then + set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry @@ -19,8 +19,8 @@ fi function savedefault { - if [ -z ${boot_once} ]; then - saved_entry=${chosen} + if [ -z "${boot_once}" ]; then + saved_entry="${chosen}" save_env saved_entry fi } @@ -42,7 +42,7 @@ insmod ext2 set root='(/dev/sda,3)' search --no-floppy --fs-uuid --set 4e8219fe-b608-423c-ba5d-360f20b97216 -set locale_dir=($root)/boot/grub/locale +set locale_dir=("$root")/boot/grub/locale set lang=en insmod gettext set timeout=5 @@ -174,7 +174,7 @@ insmod fat set root='(/dev/sda,1)' search --no-floppy --fs-uuid --set 3b0d-15da - drivemap -s (hd0) ${root} + drivemap -s (hd0) "${root}" chainloader +1 } ### END /etc/grub.d/30_os-prober ###
signature.asc
Description: Digital signature