Bug#508567: grub2: Wrong automatic generation of grub.cfg makes only one partition bootable

Alex Dănilă nuorama at gmail.com
Fri Dec 12 15:37:38 UTC 2008


Package: grub2
Version: 1.96+20080724-12
Severity: important

*** Please type your report below this line ***
A typical Debian grub.cfg looks like this:
### BEGIN /etc/grub.d/10_linux ###
set root=(hd0,5)
search --fs-uuid --set fa23b4c4-ede2-4b69-8daa-4e405dc8ea36
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64" {
	linux	/boot/vmlinuz-2.6.26-1-amd64 
root=UUID=fa23b4c4-ede2-4b69-8daa-4e405dc8ea36 ro usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
[...]
### END /etc/grub.d/10_linux ###
This is wrong because the set root command should stay inside the 
menuentry.
The effects are bad mostly through their didactic effects, trying to use 
these method to add another distribution will make only the last 
distribution in the list bootable (as can be seen in the grub.cfg that 
comes with the report.
Debian Unstable updated today.

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/disk/by-uuid/fa23b4c4-ede2-4b69-8daa-4e405dc8ea36 / reiserfs 
rw,noatime,notail,commit=0 0 0
/dev/sda7 /home reiserfs rw,noatime,notail,commit=0 0 0
/dev/sda2 /mnt/winD fuseblk 
rw,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other,blksize=4096 
0 0
/dev/sda1 /mnt/Fedora ext3 
rw,noatime,errors=continue,user_xattr,acl,commit=5,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/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=2
terminal console
### 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_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
set root=(hd0,5)
search --fs-uuid --set fa23b4c4-ede2-4b69-8daa-4e405dc8ea36
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64" {
	linux	/boot/vmlinuz-2.6.26-1-amd64 
root=UUID=fa23b4c4-ede2-4b69-8daa-4e405dc8ea36 ro usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64 (single-user mode)" {
	linux	/boot/vmlinuz-2.6.26-1-amd64 
root=UUID=fa23b4c4-ede2-4b69-8daa-4e405dc8ea36 ro single 
usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.18-6-amd64" {
	linux	/boot/vmlinuz-2.6.18-6-amd64 
root=UUID=fa23b4c4-ede2-4b69-8daa-4e405dc8ea36 ro usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.18-6-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.18-6-amd64 (single-user mode)" {
	linux	/boot/vmlinuz-2.6.18-6-amd64 
root=UUID=fa23b4c4-ede2-4b69-8daa-4e405dc8ea36 ro single 
usbcore.autosuspend=1
	initrd	/boot/initrd.img-2.6.18-6-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN Fedora ###
#set root=(hd0, 1)
#search --fs-uuid --set 22fc0287-08c9-454e-9738-9043d65468ae
menuentry "Fedora, 2.6.27.5-117.fc10.x86_64" {
	linux	/boot/vmlinuz-2.6.27.5-117.fc10.x86_64 
root=UUID=22fc0287-08c9-454e-9738-9043d65468ae rhgb quiet 
usbcore.autosuspend=1
	initrd	/boot/initrd-2.6.27.5-117.fc10.x86_64.img
}
### END Fedora ###

### BEGIN /etc/grub.d/11_windows ###
menuentry "Windows XP" {
chainloader (hd0,2)+1
}
### END /etc/grub.d/11_windows ###

### 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: 5.0
   APT prefers testing
   APT policy: (650, 'testing'), (600, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
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 grub2 depends on:
ii  debconf [debconf-2.0]   1.5.24           Debian configuration 
management sy
ii  grub-pc                 1.96+20080724-12 GRand Unified Bootloader, 
version

grub2 recommends no packages.

grub2 suggests no packages.

-- debconf information:
   grub2/numbering_scheme_transition:





More information about the Pkg-grub-devel mailing list