Mon 20 Jul 2009 04:34:27 PM UTC, original submission:
New Feature Request:
Save current MBR before installing grub to MBR and
provide an new mbrUndo command to restore MBR to previous state.
----------------------------------------------------------------
As a Gnu/Linux user of many many years I have found that the most common problem/complaint of grub users is the
accidental installing of GRUB onto a computer's MBR.
This is usually due to either a discrete user error - or due to a wayward distribution's automatic install to the MBR without asking the user for confirmation of the action.
(e.g At time of writing a standard Ubuntu 9.04 desktop install, is a classic example of an distribution that installs
grub to the MBR without seeking prior approval or confirmation)
To counteract this, I propose that GRUB take the initiative by:
1. First backing up the current MBR to a file, before installing itself to the MBR ( or to the first sector of a partition).
2. Provide a new MBR 'undo' command that would reinstate a previous MBR of the users choosing.
e.g.
Grub could store the previous MBR in a file in /boot/grub/MBR.000
/boot/grub/MBR.001
etc.
A new grub 'undo' command could restore the MBR to a previous state, thus providing
a user with a quick remedy to the situation.
mbrUndo <filename>
e.g mbrUndo /boot/grub/MBR.001
Invoking mbrUndo without a filename could default to the last MBR.xxx file created.
By doing this, a user who accidentally installed grub to the MBR, or to a partitions first sector, could
quickly rectify the situation.
|