Bug#564928: the mbr needs updating

Vincent Fourmond fourmond at debian.org
Fri Jan 15 09:56:22 UTC 2010


severity 564928 important
thanks

  Hello,

On Fri, Jan 15, 2010 at 10:33 AM, Felix Zielcke <fzielcke at z-51.de> wrote:
> Am Mittwoch, den 13.01.2010, 14:08 +0000 schrieb Dennis 123321:
>> I had this issue this morning. It is caused by the installation of the
>> new grub not updating the actual mbr, and only the files in
>> /boot/grub/
>>
>> It is a simple fix;
>> as root, execute something like this after you install the new package
>> for grub-pc. (changing the destination for your drive, this was __my
>> exact command__ for my computer):
>>
>>      # grub-install --no-floppy --recheck --force /dev/sda3
>>
>> a more generic command may look like:
>>
>>      # grub-install /dev/sda
>>
>> now, reboot, and it should boot perfectly.
>> If you install the new grub-pc and forget to update the boot sector,
>> you can chroot in and do it that way (thats what I did).
>
> The proper fix is to run `sudo dpkg-reconfigure grub-pc' and select the
> device (or just all) in the debconf prompt for it, from which you boot.
> Else grub-install gets run on the wrong the device and then this can
> happen.
> Only grub-install touches /boot/grub. The package postinst just runs it
> if a device is stored in grub-pc/install_devices.
>
> @Vincent:
> You're report shows grub-pc/install_devices has /dev/hda stored.
> I assume that's not (anymore?) the device you boot from, else that
> shouldn't happen.

  OK, I understand the problem. I had changed the device (from IDE to
SATA using an adapter). Is there any way to detect that at postinst ?
Could somehow grub find out that a drive has changed its interface ?
(it can happen also if you change the SATA or IDE port, I believe, not
only in the tight corner case of changing the whole interface !).

  I've downgraded the severity to important, since it only happens in
very special cases. However, when that happens, it is guaranteed to be
a real pain... (especially since I only had old Knoppix versions that
would not recognize my SATA driver or my network card... Rather
delicate, I'd say).

  Thanks for the reply,

      Vincent

PS: upon submission of the bug, I got a message saying that I didn't
have posting right the the pkg-grub mailing list. This should be
disabled, as bug reports definitely should arrive there, even from
unsubscribed addresses.





More information about the Pkg-grub-devel mailing list