Bug 177941 - Backup MBR during install
Backup MBR during install
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2006-01-16 13:29 EST by n0dalus
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-14 17:08:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description n0dalus 2006-01-16 13:29:34 EST
If the MBR is set to be modified during the install, use dd to make a backup
before running grub(-install). The resulting file should be placed in the /root
folder along with the kickstart file and the anaconda log.

This backup would be helpful for reverting back to whatever was installed on the
MBR before.
Comment 1 Jef Spaleta 2006-01-16 13:44:18 EST
can you outline the exact steps one would use to use a backup file?
You should be able to do this manually right now via the installer's provided
virtual console facilities. Can you generate such a file manually right now and
then place it back manually under rescue mode to revert back?

Couldn't we just start up with instructions to do this manually using the
provided console facilities in the installation guide to aid people who are
attempting to do dualboots?  

Comment 2 n0dalus 2006-01-18 06:37:54 EST
(In reply to comment #1)
> can you outline the exact steps one would use to use a backup file?

Not sure if you mean 'use to make a backup file' or 'take to use a backup file'...

I don't know where or how grub-install is called from, but assuming it is passed
an argument for the location of the block file to install itself to, the command is:
dd if=/dev/hdx of=/mnt/sysimage/root/mbr.backup bs=512 count=1

Where hdx is the hard drive that grub will be installing to (can be SCSI, IDE,
it shouldn't matter).

Putting the backup file back is as easy as swapping the if= and of= parameters

This can be done using the console facilities, but putting it in the installer
would be great. The command only takes a fraction of a second.
Comment 3 Chris Lumens 2007-03-14 17:08:53 EDT
This is an admin-specific feature that we're not going to add it to anaconda. 
We do provide enough facilities to be able to do this sort of thing on your own
if you would like it.  If you want this because the system is being left in an
unbootable state after installation, that's definitely a bug that needs to be
fixed.  Please file a report if that's the case.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.