Bug#666992: grub-pc: installation into partition broken, postinst script does not detect MBR installation

Colin Watson cjwatson at debian.org
Tue Apr 3 13:14:26 UTC 2012


On Tue, Apr 03, 2012 at 04:40:26PM +0900, Norbert Preining wrote:
> I don't know if it was always like that, but the last update of grub2
> failed in the postinst script, because it tried to install into
> 	/dev/sda3
> which was found via
> 	grub-probe --target=device /boot
> Yes, all my linux is in /dev/sda3, all of it. The error message is
> # grub-install /dev/sda3
> /usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
> /usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
> /usr/sbin/grub-setup: error: will not proceed with blocklists.
> #

The real error may be obtained using 'grub-install --force /dev/sda3',
and I strongly suspect that it is along the lines of "error:
non-sector-aligned data is found in the core file".  See:

  https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/972250

> I faintly remember that I *have* installed grub into sda3 before, but
> that is no proof I assume.
> 
> Now, installation into the MBR works without a problem, and I am
> anyway running it from the MBR.
> 
> So what I see here are two bugs:
> * grub is not able to be installed into my /dev/sda3

That is indeed an important regression and I'm working on a fix now.

> * postinst is not able to detect that grub is already installed in MBR
[...]
> * grub-pc/install_devices: /dev/disk/by-id/ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276, /dev/disk/by-id/ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276-part3

If you don't want to install it to /dev/sda3, then you should run 'sudo
dpkg-reconfigure grub-pc' and select only /dev/sda.  At the moment this
debconf-show output indicates that you have both /dev/sda and /dev/sda3
selected there, hence why the postinst tried to do this.

Cheers,

-- 
Colin Watson                                       [cjwatson at debian.org]





More information about the Pkg-grub-devel mailing list