#611463 grub-pc: grub-install does NOT install Grub2 to extended/logical partition boot sector.

Package:
grub-pc
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (PC/BIOS version)
Submitter:
tompfr
Date:
2014-10-18 21:15:12 UTC
Severity:
normal
#611463#5
Date:
2011-01-29 16:57:17 UTC
From:
To:
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

#611463#10
Date:
2011-05-09 17:37:42 UTC
From:
To:
Could you try latest upstream bzr GRUB? It was a trouble with linux cache.
#611463#15
Date:
2011-05-09 17:37:42 UTC
From:
To:
Could you try latest upstream bzr GRUB? It was a trouble with linux cache.
#611463#20
Date:
2011-05-09 17:42:19 UTC
From:
To:
tag 611463 fixed-upstream
thanks