Radified Community Forums
http://radified.com/cgi-bin/yabb2/YaBB.pl
Rad Community Technical Discussion Boards (Computer Hardware + PC Software) >> PC Hardware + Software (except Cloning programs) >> Backup/Restore MBR b/f Linux install
http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1197239819

Message started by zmdmw52 on Dec 9th, 2007 at 4:36pm

Title: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Dec 9th, 2007 at 4:36pm
I have 500 GB SATA and 250 GB Seagate HD's on my desktop PC, presently dual-booting Windows Prof SP2 with itself.

Plan to add Linux Fedora Core 8 as a 3rd OS, but want to preserve the current WinXP installs and the MBR, so that if anything goes wrong, I can revert to the old configuration (minus Fedora).

- How can I go about doing this: links to relevant webpages would also be useful.

- More importantly, how can I backup and restore the MBR to the previous state (i.e. WinXP only), in case something goes wrong.

Would appreciate detailed instructions, particularly on how to backup & restore the MBR; as I am new to this.

Thanks


Title: Re: Backup/Restore MBR b/f Linux install
Post by Brian on Dec 9th, 2007 at 5:22pm
zmdmw52,

I don't use Linux but here is something to get you started.

http://www.goodells.net/multiboot/index.htm

http://members.shaw.ca/LeesPlace/mbrwork.htm

http://www.terabyteunlimited.com/utilities.html

Using MBRWork from a floppy, you can backup and restore the first track, LBA-0 to LBA-62. Your MBR is LBA-0.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Dec 11th, 2007 at 2:22am

Quote:
Using MBRWork from a floppy, you can backup and restore the first track, LBA-0 to LBA-62. Your MBR is LBA-0.


The MBRWork DOS screen offers to:

- backup the MBR,  and
- backup MBR to a file

What is the difference between these 2 options?

Also, more important:
Where is this backup stored? i.e. from within Windows how can I access the MBR backup or the 'MBR backup file'?

Title: Re: Backup/Restore MBR b/f Linux install
Post by Brian on Dec 11th, 2007 at 3:03am

Quote:
- backup the MBR,  and
- backup MBR to a file

Are you sure? I don't see those options with MBRWork.

The first track is backed up to the floppy. Then you can restore from the same floppy. That's what you need, the First Track.

You can run MBRWork from a USB flash drive but be careful that you don't backup the First Track of the flash drive. Floppies are easier to use. Less likely to make a mistake.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Dec 11th, 2007 at 4:56pm
My PC does not have a Floppy Drive and I use MBRWorks from a bootable CD.

Is there any way to save the MBR to a file (or as a file) on the Hard Disk & then restore from there if there is a problem.

Will try and post a screenshot of the MBR screen later, to explain the options that I referred to earlier.

Title: Re: Backup/Restore MBR b/f Linux install
Post by Brian on Dec 11th, 2007 at 7:42pm
Can you boot to a USB flash drive?

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Dec 19th, 2007 at 2:47am
Please refer to the attached image:
The first picture has the MBRWork Main Screen. I think I can get this to boot from a USB Disk. (ccurrently am booting from a DOS bootable CD).
Could you give the steps necessary for backing up the MBR to a file on the Hard Disk or Flash Disk (if such a thing is possible).
Also, *by default*, where does MBRWork backup the MBR?



Quote:
Quote:
- backup the MBR, and
- backup MBR to a file
(Brian's reply)
Are you sure? I don't see those options with MBRWork.

Sorry for the mix-up, but those options were from MBRTool 2.2.100 (that was also used from a boot CD) and which I found easier to deal with. The 2nd pict displays the Main screen of MBR Tool, from which I chose Option # 2, since I wanted to backup to file.
The 3rd picture shows the results: it says that the MBRs of all 3 Hard Disks have been backed-up to file (named ? MBR_BACK.drv ?).
(I have 3 Hard Disks in my system, as given in the first pane of this post ... with the 500 GB WD SATA added on with the boot sector (*System*/*Active* C:/ partition))  

But I have no clue as to *where* this file has been backed-up.
I am mainly concerned with backing up the MBR of the first HD (disk 128 (0) in 3rd pict).

Picture1a.jpg (Attachment deleted)

Title: Re: Backup/Restore MBR b/f Linux install
Post by Brian on Dec 19th, 2007 at 3:45am
zmdmw52,

I don't think you can backup the MBR from a boot CD with MBRWork. The medium has to be writable. ie floppy or USB stick.

This may be easier. Download MBRWhisky from..

http://red.boot-land.net/mbrwhisky.html

Also download MBRWizard 1.53 (Aug 24 2004) from...

http://www.mbrwizard.com/download.shtml

Put both exe files in the same folder and run MBRWhisky.

Choose your HD, Disk, Save MBR to file etc

How did it go?




Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Dec 21st, 2007 at 11:15am
Thank you for those 2 programs!

I saved them to a folder on the C:/ drive and ran MBRWhisky from there. It was able to backup  the MBR to a location on the Hard Drive (as a '.dat' file).

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Jul 5th, 2008 at 12:00am
About the above discussion:
If I image my C:/ drive with Norton Ghost 2003, does it include the MBR (and other 'hidden'/'boot sector' files/tracks); so that if & when I have to restore the C:/ image, everything, including MBR gets restored?

Title: Re: Backup/Restore MBR b/f Linux install
Post by Nigel Bree on Jul 5th, 2008 at 4:13am

zmdmw52 wrote on Jul 5th, 2008 at 12:00am:
does it include the MBR (and other 'hidden'/'boot sector' files/tracks); so that if & when I have to restore the C:/ image, everything, including MBR gets restored

The Ghost image does always contain a full MBR, but not the rest of the boot track unless you specify the "-ib" switch. That's true of every version ever made up to now, but it'll be something we're aiming to change as soon as we can since an increasing number of machines are using custom MBRs now that occupy multiple sectors.

The rules about what gets put back under what circumstances are more subtle.

In general for normal images (no -ib) although the image has the MBR it pretty much never restores it, because it has no real way of knowing whether the boot code in the MBR already on a disk is more or less suitable for the machine the disk is going to end up in than the MBR in the image is (and this problem is particularly acute when you have multisector MBRs floating around).

However, if when taking the image you use the "-ib" flag to ensure that the boot track is captured, then it will be restored by default (on the basis that's what you intended to have happen by asking for it explicitly to be captured) if you do a disk restore, and to stop this happening you have to do partition restores from the image.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Jul 5th, 2008 at 6:18am
Nigel,
Thanks for the reply.

I was also considering using third-party boot loaders+. If you have any experience in using one-

Would it be better than the standard Windows boot loader in terms of ease of backup, reliability & stability (or would it confuse things more)?
Will it be an advantage if I install Linux (plan on Fedora Core 9), for dual-booting with Windows (Win XP)?


Or am I better off just letting the Windows boot loader handle everything (with periodic image backups using the '-ib' switch as above)?

+ XOSL is one I have heard about. Partition Magic (ver 8, by PowerQuest) also has it's own boot manager ('Boot Magic').

Title: Re: Backup/Restore MBR b/f Linux install
Post by Nigel Bree on Jul 6th, 2008 at 12:03am

zmdmw52 wrote on Jul 5th, 2008 at 6:18am:
If you have any experience in using one-

A great deal, over the years, and there is no way I'll ever use one over a VM if I can help it.


zmdmw52 wrote on Jul 5th, 2008 at 6:18am:
Will it be an advantage if I install Linux (plan on Fedora Core 9), for dual-booting with Windows (Win XP)?

I cannot emphasise strongly enough that you are best off putting either one inside a VM running under the other (or both in VMs under something like VMware ESX, but that's not something most people need). Keep the VMs in a volume separate from the host OS, so they are easy to backup using a simple file copy, and periodically back up the host OS as you would normally (whether by imaging or whatever else you prefer).

Which OSes to use as the host and which as the guest (and which VMM to prefer) is your choice, and really depends on personal preference and what you're doing. Since I'm a developer my choices will probably be different to yours.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Jul 6th, 2008 at 9:27am

wrote on Jul 5th, 2008 at 4:13am:
The Ghost image does always contain a full MBR, but not the rest of the boot track unless you specify the "-ib" switch.  

I tried the '-ib' switch. Ghost displayed an Error Message- "-ib & -id switches are not valid for partition to image backups" (or something to that effect). What option do I have to use to image the boot sector & ensure that the MBR/boot sector gets restored when I restore from that image?

Subsequently, I tried the '-ia' switch, the complete partition (entire 30 GB, including the vacant portion got imaged; in contrast to the data portion (eg 5 GB) that happens when Ghost is used without any additional parameters). Naturally, would prefer to use the "-ib" option, if available, to conserve disk space.

Another question that arises is: on restoration from this '-ia' image, to an unequal-size partition (i.e. original part (incld. free space = 30 GB), destination part. - 60 GB), would the destination partition be auto-resized to 30 GB (if so, what happens to the additional 30 GB?-does it have to be extended manually using another program)?


Title: Re: Backup/Restore MBR b/f Linux install
Post by Nigel Bree on Jul 6th, 2008 at 4:29pm

zmdmw52 wrote on Jul 6th, 2008 at 9:27am:
What option do I have to use to image the boot sector & ensure that the MBR/boot sector gets restored when I restore from that image?

It's tied into Disk imaging; you have to do a disk-to-image operation and restore with an image-to-disk with the -ib switch.

The issue here is really just a UI one, unfortunately. When adding the ability to capture the boot track to Ghost, the developers decided to make it happen implicitly as a side-effect of "disk" operations. The reasons it was done this way are hard to explain, but are consequences of the way the cloning code was originally written and evolved over the years, and the image file format evolved with it.

The most flexible (and thus, the correct internal implementation style, and what the code has evolved to nowadays) would have been for the boot track to be in effect a kind of pseudo-volume with an implicit size, for images to be just collections of volumes, and for Ghost to have the ability to allow arbitrary numbers of partitions (from an arbitrary number of source disks) to be gathered into or deployed from an image in a single operation.

Unfortunately, the code at the time the "-ib" switch was added wasn't designed with that flexibility in mind; the two modes of operation - single disk with all partitions, or a single partition - were baked solidly into the code and into the image file format. Faced with retrofitting the ability to capture and image the boot track by itself into that model, the developers chose to add it as a side-effect of the disk imaging rather than changing Ghost's internal modeling in a substantial way.


Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Jul 10th, 2008 at 12:27am

zmdmw52 wrote on Jul 6th, 2008 at 9:27am:
Subsequently, I tried the '-ia' switch, the complete partition (entire 30 GB, including the vacant portion got imaged); ... on restoration from this '-ia' image, to an unequal-size partition (i.e. original part (incld. free space = 30 GB), destination part. = 60 GB), would the destination partition be auto-resized to 30 GB (if so, what happens to the additional 30 GB? -does it have to be extended manually using another (partitioning) program)?
Nigel,
I am still in the dark about this.

For including the boot sectors & MBR (& restoring successfully therefrom), would '-ia' then be the best option (with NG 2003)?


Title: Re: Backup/Restore MBR b/f Linux install
Post by Nigel Bree on Jul 10th, 2008 at 7:00pm
The only change to the operation of Ghost when you use -ib is that is adds the boot track to the image at capture time, and if the image was captured with -ia then it will be restored when you do a "Disk" restore. Otherwise, everything else works as it would otherwise do, including the partition resizing that Ghost does.

It's really only the -ia (image all) and -id (forensic) switches that have functions that stop Ghost doing its normal default behaviours during restoration of other data.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Apr 1st, 2009 at 1:49pm
Having tried Clonezilla (Clonezilla Live CD 1.2.1-39), I find this to be the best partition backup/restore and disk clone software IMO (though limited). I have just succesfully restored a Linux ext3 / (root) partition from an image saved to a Windows partition (NTFS), successfully *.

*Internet connnection got disrupted during updating Linux (openSUSE 11.1) & on reboot mouse and keyboard were unusable.

In addition: it can backup MBR and Partition Table (on by default) and you can choose to restore this or not when you restore from the saved partition image; the compression ratio is much better than NG+/TI and the speed is faster (average of about 1.2 GB/min for ext3 (SATA HD) > NTFS (also SATA HD) imaging. Also, for those restoring a Linux / (root) or /boot partition, it can (optionally-on by default) restore GRUB.

(+ Like 'TheShadow', I was an almost exclusive user of NG 2003 through a Boot CD, until I installed Linux (openSUSE 11.1, dual-booting with Windows XP Prof) and associated OSS ...
.... Shadow, how about giving the Clonezilla Live CD a spin ?)

The GUI can be a bit confusing, but there is an online forum and Quick Reference Card (at the Sourceforge Download page).

Here are some links to Clonezilla Live CD:

Main Site:
http://www.clonezilla.org/

Wikipedia Entry: (with further links)
http://en.wikipedia.org/wiki/Clonezilla

How to use Clonezilla Live:
http://www.clonezilla.org/clonezilla-live/#use

Forum on SourceForge:
http://www.clonezilla.org/forum/

Clonezilla Quick Reference Card d/l link:
http://sourceforge.net/project/showfiles.php?group_id=115473&package_id=125231&release_id=659572


PS:
It's sad to see the very knowledgeable 'nbree' become an 'ex-member'. His answers were insightful and thought-provoking. Hope he'll return to Radified Forums with another User Name.
(But then, I guess his insightful answers would give him away !)



Title: Re: Backup/Restore MBR b/f Linux install
Post by Spanky on Apr 1st, 2009 at 8:41pm

zmdmw52 wrote on Apr 1st, 2009 at 1:49pm:
PS:
It's sad to see the very knowledgeable 'nbree' become an 'ex-member'. His answers were insightful and thought-provoking. Hope he'll return to Radified Forums with another User Name.
(But then, I guess his insightful answers would give him away !)

I had the exact same thought.  :)

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Apr 2nd, 2009 at 2:05am

Quote:
I had the exact same thought.  :)


... as do so many others on Radified Forums.


Title: Re: Backup/Restore MBR b/f Linux install
Post by Pleonasm on Apr 2nd, 2009 at 9:39am
Readers of this thread may also be interested in the free utility MBR Fix.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw52 on Sep 4th, 2009 at 1:25pm

Brian wrote on Dec 19th, 2007 at 3:45am:
zmdmw52,
I don't think you can backup the MBR from a boot CD with MBRWork. The medium has to be writable. ie floppy or USB stick.

This may be easier. Download MBRWhisky from..
http://red.boot-land.net/mbrwhisky.html

Also download MBRWizard 1.53 (Aug 24 2004) from...
http://www.mbrwizard.com/download.shtml

Put both exe files in the same folder and run MBRWhisky. Choose your HD, Disk, Save MBR to file etc

How did it go?

As a follow-up, I tried to restore the MBR from the .dat file generated by MBRWhisky & MBR_Works. This happened after an accidental deletion from a Linux Live CD (posted the problem on www.annoyances.org, which I find good for Windows troubleshooting, http://www.annoyances.org/exec/forum/winxp/t1249500186).
However, I could not restore the MBR from the .dat file, as MBRWhisky /MBRWork just did not recognize the Hard Disks; Windows itself could recognize only the C:\ partition and not the extended partitions (4 extended partitions, from E:\ through H:\); this was most probably because the partition table (MFT) was destroyed.

I managed to get back some of the data in the extended partitions from an old image file (about a year old). Had I used Clonezilla Live CD rather than Ghost to image the C:\ drive [I tried to restore from a NG 2003 image of the C:\ drive. about 6 mo old, but after booting into Windows (normal & 'safe' mode), it still did not recognize the extended partitions], probably this could have been averted, as Clonezilla backs-up the MBR + MFT (Master File Table/ Partition Table).

Anyway, there was not much data loss, as I back-up my important documents, photographs, etc onto a flash drive frequently.

Title: Re: Backup/Restore MBR b/f Linux install
Post by zmdmw on Sep 16th, 2009 at 1:57pm
In continuation of the above:
I put the question about whether Clonezilla backs-up the Partition Table, etc (see [1]), when it images a partition (rather, qn was about what exactly the backed-up files in the Clonezilla-created backup folder, represented -see [2]) on the Clonezilla-Help Forum at Sourceforge.net. Steven Shiau (lead developer) clarified that Clonezilla indeed does backup the Partition Table of the Hard Disk (in addition, the MBR + 'Hidden Data after MBR' are also backed up by default for a partition backup).



Quote:
You have used partclone to image sdb4 partition, and it's using gzip compression, and the image is split as 2 files, i.e. sdb4.ext4-ptcl-img.gz.aa, sdb4.ext4-ptcl-img.gz.ab.
sdb-pt.sf is the partition table outputed by sfdisk, sdb-pt.parted is the partition table outputed by parted.
sdb-hidden-data-after-mbr is the data between MBR and the first partition. Sometime it's useful for some recovery tools to put binary data in that area. We do not know it's useful or not, just dd it as an image "sdb-hidden-data-after-mbr".
Steven.


[1] http://sourceforge.net/projects/clonezilla/forums/forum/394751/topic/3391130
[2] Backup folder contents (folder created by Clonezilla during partition imaging) - http://www.imagebam.com/image/6ab41b47779143 (also attached)

Clonezilla_Live_Backup_Image_Folder_Components.png (59 KB | 899 )

Radified Community Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.