Bug#611463: grub-pc: grub-install does NOT install Grub2 to extended/logical partition boot sector.
tompfr
tomp at terabyteunlimited.com
Sat Jan 29 16:57:17 UTC 2011
Package: grub-pc
Version: 1.98+20100804-14
Severity: normal
Tags: d-i upstream
During Debian Squeeze install (rc2, 1386, netinst), the Grub2 boot sector does NOT get
installed to an /extended/logical partition (such as /dev/sda5) when specified to be installed
there. The same problem occurs when running e.g. 'grub-install --force /dev/sda5' manually from
the command line. The first sector of /dev/sda5 does NOT get written, and is all zeros (blank)
in both cases.
This results in the installation being UNBOOTABLE by normal means after the install completes.
Note that installing Grub2 into a PRIMARY partition boot sector DOES work. The failure is when
attempting to install Grub2 to an EXTENDED/LOGICAL partition boot sector. The Debian installer,
as well as 'grub-install' itself, accepts the option of installing to the logical partition,
and indicates success afterwards, but the boot sector always is left blank.
Installing Grub to a partition boot sector is important functionality when using a 3rd party
boot manager in the MBR to boot the installation by chainloading to the partition boot sector
(including to extended/logical partition boot sectors as described here). This is not an issue
in Grub legacy.
The following is the relevant text found in the /var/log/installer/syslog file after the
installation completed (some repetive lines left out):
Jan 29 15:29:38 grub-installer: info: Installing grub on '/dev/sda5'
Jan 29 15:29:38 grub-installer: info: grub-install supports --no-floppy
Jan 29 15:29:38 grub-installer: info: Running chroot /target grub-install --no-floppy --force "/dev/sda5"
Jan 29 15:29:39 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:39 grub-installer:
Jan 29 15:29:39 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:39 grub-installer: .
Jan 29 15:29:39 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:39 grub-installer:
Jan 29 15:29:39 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:39 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-probe: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Discarding improperly nested partition (hd0,msdos1,msdos1)
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-setup: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:40 grub-installer: /usr/sbin/grub-setup: warn:
Jan 29 15:29:40 grub-installer:
Jan 29 15:29:40 grub-installer: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are U$
Jan 29 15:29:40 grub-installer: .
Jan 29 15:29:41 grub-installer: Installation finished. No error reported.
Jan 29 15:29:41 grub-installer: info: grub-install ran successfully
-- Package-specific info:
*********************** WARNING grub-setup left core.img in filesystem
*********************** BEGIN /proc/mounts
/dev/sda5 / ext4 rw,relatime,errors=remount-ro,barrier=1,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 grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 0d78129b-c53b-4d83-8377-f9b8d2cb5194
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 0d78129b-c53b-4d83-8377-f9b8d2cb5194
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 0d78129b-c53b-4d83-8377-f9b8d2cb5194
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=0d78129b-c53b-4d83-8377-f9b8d2cb5194 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 0d78129b-c53b-4d83-8377-f9b8d2cb5194
echo 'Loading Linux 2.6.32-5-686 ...'
linux /boot/vmlinuz-2.6.32-5-686 root=UUID=0d78129b-c53b-4d83-8377-f9b8d2cb5194 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-686
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# 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 ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg
-- System Information:
Debian Release: 6.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages grub-pc depends on:
ii debconf [debconf-2.0] 1.5.36 Debian configuration management sy
ii grub-common 1.98+20100804-14 GRand Unified Bootloader, version
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.48-5 The Linux Kernel Device Mapper use
ii ucf 3.0025+nmu1 Update Configuration File: preserv
grub-pc recommends no packages.
Versions of packages grub-pc suggests:
pn desktop-base <none> (no description available)
-- debconf information:
grub-pc/kopt_extracted: false
grub2/kfreebsd_cmdline:
grub2/device_map_regenerated:
* grub-pc/install_devices: /dev/sda5
grub-pc/postrm_purge_boot_grub: false
grub-pc/install_devices_failed_upgrade: true
grub-pc/disk_description:
* grub2/linux_cmdline:
grub-pc/install_devices_empty: false
grub2/kfreebsd_cmdline_default: quiet
grub-pc/partition_description:
grub-pc/install_devices_failed: false
grub-pc/install_devices_disks_changed:
* grub2/linux_cmdline_default: quiet
grub-pc/chainload_from_menu.lst: true
grub-pc/mixed_legacy_and_grub2: true
More information about the Pkg-grub-devel
mailing list