Updating Grub2 overwrites MBR without confirmation, or backing up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Binary package hint: grub
Hard drive has the following partitions-
SDA1 FAT 16 Dell recover partition
SDA 2 NTFS windows recovery partition
SDA3 window (truecrypt encrypted system drive)
SDA4 Extended
SDA5 EXT4 Ubuntu 10.04
SDA6 SWAP.
To set up a dual boot encrypted system I did the following
Encrypted the Windows system partition using trucrypt- this overwrote the MBR with the truecrypt bootloader.
I then used a rescue disk to install grub 2 on SDA1
Then I marked SDA1 as bootable.
The following was the behaviour before the GRUB2 upgrade today.
At boot, truecrypt boot screen appeared-
Option one- enter windows passphrase- windows then booted
Option two- press escape, Then the Grub boot menu appeared allowing me to to ubuntu.
Post update behaviour.
Grub2 update overwrote MBR without confirmation, and as far as I can see, without taking a copy of the MBR)
At Boot, Grub only lists ubuntu boot options (as windows partition is encrypted.
Attempted solution:
Reinstall Trucrypt bootloader from rescue disk. This was not successful, as Trucrypt boot loader only boots whichever partition has a "boot Flag". This means I can only access windows.
Expected behaviour:
Grub update will only overwrite MBR if grub is installed there already.
Or, Grub asks for confirmation before overwriting MBR
Or, Copy of MBR is taken before Grub overwrites it (this would have saved me a lot of time)
As of now, to fix, I have had to totally decrypt windows partition and re-encrypt and do the boot loaders swap. I will also have to blocklist grub2.
There's no reliable way to tell whether GRUB is installed in an MBR or not; asking for confirmation every time would be an awful lot of confirmation prompts for most people. We have talked about keeping a backup and may do this in the future, though.