[Bug 495423] Re: update to grub-pc writes MBR without checks, prompt or backup

Adrian Wilkins 495423 at bugs.launchpad.net
Tue Oct 16 18:34:41 UTC 2012


I upgraded grub on a VM which I had snapshotted - apparently, this
changes the disk ID.

This was on Precise Server. I was prompted for which drive to reinstall
grub to, which is pretty much the desired result - grub is not
installing itself to a disk it hasn't seen before.

Can I infer this has been fixed, or does it not work with the desktop
distribution? I may have to make a VM and try the same trick...

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/495423

Title:
  update to grub-pc writes MBR without checks, prompt or backup

Status in “grub2” package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: grub

  Booted laptop from external USB HDD containing Karmic.

  Installed updates. One of the updates is to grub.

  Internal drive contains a full-disk encrypted Windows installation.

  Update to grub writes the grub MBR to the internal disk, instead of
  the disk that grub booted the original MBR from.

  On a standard Windows install I would have considered this merely
  annoying, because I could have replaced the MBR easily enough. On this
  install I have to get one of the support techs to "bless" the disk
  with a special bootloader and the "Code of the Day".

  This is a more general case of #112239 "GRUB writes to wrong MBR and
  destroys RAID setup"

  Suggestions ;

   - Where multiple disks present, always prompt the user for the disk to put the MBR on. This would help prevent these problems 
     - Make the prompt nice and clear, disk descriptors, sizes, etc
   - When UPDATING grub, only write the MBR to a disk that has a recognized grub MBR on it already.
     - It's not an "install" (and be damned), it's an update
   - Whenever you write any MBR, write the previous MBR data to a permanent log file. This way it can be restored afterwards.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/495423/+subscriptions




More information about the foundations-bugs mailing list