• Backing up the MBR before installing Ubuntu

    Author
    Topic
    #471148

    I have a desktop with two physical hard drives installed. The master HD (c:) has Windows XP Professional SP3 on it; the slave HD (d:) is completely empty (but NTFS formatted).
    I now would like to install Ubuntu 10.04 LTS on the slave HD and create a dual-boot system with GRUB2 –but first I want to back up the MBR as a precautionary measure!

    Does anyone know how to do this using a Linux Live CD? I’ve seen several examples on the Internet of backup/restore using the dd command in Linux, but I don’t quite understand if the dd command can be run from a Live CD and how. (I am completely new to the Linux world!) Another thing I do not understand is how to backup the MBR on the Live CD itself so that if I need to restore it, I would insert the Linux Live CD, boot up, and use the dd command in reverse.

    My PC does not have a diskette drive and only one CD/DVD drive, so I need to find a way to back up the MBR on a bootable CD/DVD-RW, and that is why I have Linux Live CD in mind for the task!

    PS: I am aware that the MBR can be repaired using the Recovery Console and the “fixmbr” command included in my DVD retail version of Windows XP Professional. I also concede that the likelihood of Ubuntu/GRUB2 messing up my original MBR is remote. Nevertheless, I would like to back up the MBR prior to installing Ubuntu just in case.

    But how do I accomplish this?

    Thanks.

    tb

    Viewing 5 reply threads
    Author
    Replies
    • #1240066

      I have a desktop with two physical hard drives installed. The master HD (c:) has Windows XP Professional SP3 on it; the slave HD (d:) is completely empty (but NTFS formatted).
      I now would like to install Ubuntu 10.04 LTS on the slave HD and create a dual-boot system with GRUB2 –but first I want to back up the MBR as a precautionary measure!

      But how do I accomplish this?
      Thanks.

      tb,
      Hello.. I am no expert in this but this is what i did to keep “Linux” from re-writing the MBR and placing itself as the “Big Dog” on my HD
      1. Power down your PC.
      2. Unplug your main “OS ” HD
      3. Power up and Boot with the “Linux Distro” CD in your CDDrive
      4. Do the Linux “install”(don’t forget to install “Grub”) , It will only see the new HD. Power down and reconnect your main HD, re-boot
      5. Download EasyBCD from Neosmart v 2.0.2 (free program ) (sorry i can’t supply the link …bad thunderstorm) and install from there you can choose who gets to be the “default OS” and then you can backup your MBR as well before you do anything else. Also adjust some of the other defaults to your liking.
      6.At boot time you will be able to choose which OS you want.
      Regards Fred
      PS: storm over http://neosmart.net/thankyou.php?app=EasyBCD

      • #1240416

        tb,
        Hello.. I am no expert in this but this is what i did to keep “Linux” from re-writing the MBR and placing itself as the “Big Dog” on my HD
        1. Power down your PC.
        2. Unplug your main “OS ” HD
        3. Power up and Boot with the “Linux Distro” CD in your CDDrive
        4. Do the Linux “install”(don’t forget to install “Grub”) , It will only see the new HD. Power down and reconnect your main HD, re-boot
        5. Download EasyBCD from Neosmart v 2.0.2 (free program ) (sorry i can’t supply the link …bad thunderstorm) and install from there you can choose who gets to be the “default OS” and then you can backup your MBR as well before you do anything else. Also adjust some of the other defaults to your liking.
        6.At boot time you will be able to choose which OS you want.
        Regards Fred
        PS: storm over http://neosmart.net/thankyou.php?app=EasyBCD

        Your suggestion is simply brilliant, Fred! Unfortunately EasyBCD works only with Vista/Win7, and I cannot use the workaround Neosmart suggests in their FAQ for Windows XP people… (They suggest to find someone running Vista/Win7 and copy certain files from them.)

        If anyone knows of a boot manager, similar to EasyBCD, that works with Windows XP, please let me know.

        Thanks.

        tb

        • #1240428

          Your suggestion is simply brilliant, Fred! Unfortunately EasyBCD works only with Vista/Win7, and I cannot use the workaround Neosmart suggests in their FAQ for Windows XP people… (They suggest to find someone running Vista/Win7 and copy certain files from them.)

          If anyone knows of a boot manager, similar to EasyBCD, that works with Windows XP, please let me know.

          Thanks.

          tb

          tb
          Sorry … about that “XP” thing ..However i have a “work around ”
          1. Go to Macrium Reflect and download their Free Imaging software http://www.macrium.com/reflectfree.asp
          2. Image your “OS” and save to wherever you wish.(data HD etc.)
          3. Load the Linux CD and let it do it’s thing ( install itself as the default on it’s own partition)
          4. You will end up with what you want … only in “reverse” Linux being the “default” …but you will still have a choice … Windows XP or Linux at boot time.
          5. If, after a while you “Hate Linux ” you simply recover your XP image and it will “wipe the Linux from your HD, and re-install every thing as it was.
          Regards Fred

        • #1243670

          Your suggestion is simply brilliant, Fred! Unfortunately EasyBCD works only with Vista/Win7, and I cannot use the workaround Neosmart suggests in their FAQ for Windows XP people… (They suggest to find someone running Vista/Win7 and copy certain files from them.)

          If anyone knows of a boot manager, similar to EasyBCD, that works with Windows XP, please let me know.

          If you are still looking for a tool to backup your MBR pick one from 5 Free Tools to Backup and Restore Master Boot Record (MBR) | Raymond.CC Blog[/url].

          Joe

          --Joe

    • #1240095

      I’m not sure, but I think you could back up your MBR before doing the Linux install. EasyBCD seems the ideal candidate for this procedure. Fred may know more about this but if you disconnect the Windows install, then install the Linux on the blank drive, the Grub loader will not see the Windows disk. Since the MBR on the Windows disk will not see the Linux disk either, can EasyBCD fix one of the MBR to show both at boot??? It would be somewhat impractical to connect or disconnect the drive you do/do not want to boot to.

      • #1240110

        Grub loader will not see the Windows disk. Since the MBR on the Windows disk will not see the Linux disk either, can EasyBCD fix one of the MBR to show both at boot??? It would be somewhat impractical to connect or disconnect the drive you do/do not want to boot to.

        Ted,
        Hello… The reason for disconnecting the “OS” HD (one time) is so when installing Linux… that Linux wont install itself on your primary HD.(or change your boot order) I have noticed that when i tried to put Linux on a separate HD, that i could not get that option, it would only see the one drive(and wanted to set up a partition) and wanted to install itself on it. So i did as i have described above. Once you re-connect (your primary HD)and re-boot , then your Linux drive will be seen by EasyBCD and you then can configure it to arrange your boot sequence.Hope this makes sense Regards Fred

        • #1240120

          Ted,
          Hello… The reason for disconnecting the “OS” HD (one time) is so when installing Linux… that Linux wont install itself on your primary HD.(or change your boot order) I have noticed that when i tried to put Linux on a separate HD, that i could not get that option, it would only see the one drive(and wanted to set up a partition) and wanted to install itself on it. So i did as i have described above. Once you re-connect (your primary HD)and re-boot , then your Linux drive will be seen by EasyBCD and you then can configure it to arrange your boot sequence.Hope this makes sense Regards Fred

          That does make sense to me now as I have used EasyBCD briefly, although parts of it are still a mystery since I do not use it very often. Hopefully the OP will understand as well. Once again thanks Fred! Cheers, Ted

    • #1243618

      As I have posted elsewhere in this Forum area, there are also third-party Boot Managers which allow you to avoid putting GRUB into the MBR at all. One of these comes with Acronis Disk Director, and it is called the Acronis OS Selector. You can install GRUB into the Linux Primary Partition (or the Linux Primary HD) by carefully selecting a non-default location while installing Linux from its install CD. Once GRUB is in the same place where Linux will be installed, the Linux installation proceeds normally. Then, you go into a reboot and the OS Selector comes up. Either from that screen, or from within Windows, you can configure the OS Selector to recognize both Windows and Linux, and you can assign a boot order so that by default, one or the other will boot up, unless you manually select the other OS at the pre-Startup screen. It’s actually pretty simple, and it saves you from the problems of MBR reconstruction if anything ever goes wrong with either Windows or Linux.

      That being said, backing up the MBR, or and creating a full Disk Image before messing with any dual-boot, is a very wise precaution.

      I edited this post to emphasize that the Acronis OS Selector is part of Acronis Disk Director, not True Image Home.

      -- rc primak

      • #1244959

        As I have posted elsewhere in this Forum area, there are also third-party Boot Managers which allow you to avoid putting GRUB into the MBR at all. One of these comes with either Acronis True Image Home or Acronis Disk Driector, and it is called the Acronis OS Selector. You can install GRUB into the Linux Primary Partition (or the Linux Primary HD) by carefully selecting a non-default location while installing Linux from its install CD. Once GRUB is in the same place where Linux will be installed, the Linux installation proceeds normally. Then, you go into a reboot and the OS Selector comes up. Either from that screen, or from within Windows, you can configure the OS Selector to recognize both Windows and Linux, and you can assign a boot order so that by default, one or the other will boot up, unless you manually select the other OS at the pre-Startup screen. It’s actually pretty simple, and it saves you from the problems of MBR reconstruction if anything ever goes wrong with either Windows or Linux.

        That being said, backing up the MBR, or and creating a full Disk Image before messing with any dual-boot, is a very wise precaution.

        Acronis True Image 2011 has what they called a Boot Sequence Manager under Tools and Utilities. This may be what you are talking about here. Since I presently have only one OS, I can not test this.

        • #1245562

          Acronis True Image 2011 has what they called a Boot Sequence Manager under Tools and Utilities. This may be what you are talking about here. Since I presently have only one OS, I can not test this.

          No, it’s the Acronis OS Selector, which is part of Disk Director 11 (and earlier). Look here for a description.

          It turns out that if you cannot load Windows after removing Linux, sometimes this OS Selector can recover the Windows Boot information without any further repairs. See the description link for details.

          And if you have made an Acronis True Image Full Backup lately, your MBR can be restored directly from that Acronis Backup. I just did this on my Windows XP laptop. (Unfortunately, the damages went deeper than the MBR, so I had to restore the entire backup after all. This had nothing to do with dual-booting.) So, backing up your drive before making any changes which might affect booting, is still the first step.

          -- rc primak

    • #1244730

      I have three disk drives in my home PC: WIndows Vista, Ubuntu 8.04, and Ubuntu 10.04. I use Terabyte Unlimited’s BootItNG (BING) product as a boot manager so I can select which OS I want to use. Each OS is on it’s own disk although I can put multiple OSs on one disk if so desired.
      Terabyte’s help forums are VERY helpful, although they can be geeky. Their web site’s knowledge base is excellent including videos. The products don’t require annual subscriptions and such.
      BootItNG will be upgrading this year to version 2 but even if you buy now, you’ll get a free upgrade to the new version when it’s released. I’ve used their products for almost four years buying only one BING license and one upgrade (Image For Windows/DOS/Linux V1 to V2) and the license keys work for all upgrades within a major rev. The products saved my butt when I had a motherboard failure. I lost only a day’s worth of info since I’d backed up my machine to an external drive the day before.
      There are tools for backing up Linux and Windows and the backups can be read by tools running on either OS. terabyteunlimited dot com – check it out.
      [An uncompensated endorsement from a very satisfied user.]
      George

      There are 10 kinds of people in the world.
      Those who understand binary
      and those who don’t.

    • #1245422

      Hi,

      I recently set up Linux in exactly the way you intend, in fact slightly more intricately as I have two versions of XP on my main drive. Provided you use two hard drives, there’s nothing to worry about – as long as you think it through. If you set it up as below all you need to do to stop Linux is unplug the HD it’s on, and then you should be back to normal – I’ve just done that to prove to myself it is so!

      Everyone has their favourite Linux distro – and I’ve tried most – but currently I’d recommend PCLinuxOS as being the closest to a Windows transition platform. My second favourite is Linux Puppy 5.1, which is tiny, yet powerful, and wonderfully cute. What follows definitely works with PCLinuxOS, and I would guess with most other current distros.

      Start things off by downloading and burning the Live CD iso. Then fire up your system with the iso in the CDdrive. When the Live CD is finally loaded you can play around to see if you like it or not. If you do, there’s an installer on the desktop to install PCLinuxOS to your HD.

      Take your time with the installer screens. When you get to the partitioning stage make sure you use the dropdown box to choose to install it to your empty HD – not to your Main XP drive!

      If you install Linux to the second HD, GRUB and Linux will be written to that HD – leaving the WinXP boot.ini intact on the main drive.

      After the Linux install is finished, shut down and restart – you will almost certainly have to first enter the BIOS to alter the boot sequence section to change which HD is chosen to boot – you need to have the 2nd HD with GRUB and Linux to be booted – GRUB is now in overall control of which OS starts and the BIOS can’t boot GRUB if the HD doesn’t contain it!

      On restart, the GRUB boot screen will give you the option to boot either Linux or your Windows partition. If you choose Windows, then GRUB hands over to the normal Windows boot.ini on your main drive. There is a simple GRUB boot-editing tool in PCLinuxOS that allows you to alter which OS is the default boot, and what the time delay is etc.

      Ultimately, if you decide to ditch Linux, simply unplug the second drive and, as the drive with GRUB boot is now missing – the BIOS will seek your old Windows boot.ini and fire that up as normal. Note that if you decide to plug the Linux HD back in again you will have to change the BIOS back again to boot the second HD.

      This has all worked fine for me on several systems but I’d recommend some belt and braces back up: make a copy of the current XP boot.ini, in a folder of the same name, in the root of your XP drive (usually C). That copy is your ultimate backup of the XP boot if things go wrong – and, of course, you can reinstate it back to the root of C from Linux! In fact I’d recommend you also make a backup copy of ntldr, ntdetect and any other files in the root of your XP drive – just in case.

      Even if you did ever need to rewrite the MBR on your main drive you could do that from your XP install disk by going into Repair and doing a FIXMBR. Alternatively, you could use a third party freeware tool such as Partition Wizard (excellent) or MBRFix.

      Have fun – I was personally quite taken aback just how smart PCLinuxOS is now, particularly in the looks department.

      Cheers, Chris

    • #1245587

      Ok Bob, I see. I also agree that Imaging is the greatest “Bacon Saver” of all. It sure has saved my bacon more often that I care to admit. This morning I created another with my change to IE 9.

    Viewing 5 reply threads
    Reply To: Backing up the MBR before installing Ubuntu

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: