How to backup MBR before installing

I have win 7 ultimate. I would like to install opensuse but with the option to revert back to my old MBR in case things don’t work out. my win 7 dvd gives a version error everytime i try to restore the MBR so i end up having to reinstall windows 7 in it’s entirety :’(
Is there a tool that allows me to reload my MBR without going into windows? i recently botched an install and got a grub 17 error lol so i could not go into windows. That was funny.
Also is there a way to install opensuse without touching my MBR at all. (it’s going on a separate drive by itself). I want win 7 as my main, and i’m good with just an entry for opensuse, which i can remove at my pleasure if i’m tried of it

openSUSE comes with a tool that allows you to restore your MBR. SDB:Prefered bootloader options - openSUSE and How to back up your Master Boot Record (MBR): fail to prepare or prepare to fail

On 2010-07-27 17:06, hotnikkelz wrote:
>
> I have win 7 ultimate. I would like to install opensuse but with the
> option to revert back to my old MBR in case things don’t work out. my
> win 7 dvd gives a version error everytime i try to restore the MBR so i
> end up having to reinstall windows 7 in it’s entirety :’(

Create an image copy of it.

> Is there a tool that allows me to reload my MBR without going into
> windows? i recently botched an install and got a grub 17 error lol so i
> could not go into windows. That was funny.

dd if=/dev/sda of=mbrbck count=1

But! That also backups the partition table. Be warned.

Meaning: it will “restore” your partition setup from before the install… destroying your system if
you created/modified partitions. There is a modification to the above command that does the trick,
but I don’t remember the exact incantation (an offset start of some (X) bytes).

Yast could write generic MBR code, but I have seen this fail with Win 7, because the ‘X’ above is
slightly different, I think. Maybe they solved this problem with 11.3, dunno. Better leave Win 7 tho
its own.

> Also is there a way to install opensuse without touching my MBR at all.
> (it’s going on a separate drive by itself). I want win 7 as my main, and
> i’m good with just an entry for opensuse, which i can remove at my
> pleasure if i’m tried of it

You can just leave the default MBR untouched, and tell linux to install grub to the root partition
instead. The generic MBR code will bot whatever partition is marked “bootable”, which in a typical
windows system will be the partition holding windows. Now it will be the partition having grub,
which will display a menu and let you choose windows or linux.

If windows does bad things, and “restores” the MBR, and linux doesn’t boot, you just need any linux
live cd to mark again the other partition as bootable instead, and windows is kept happy.

If I weren’t clear enough (long past bed time here), ask tomorrow :slight_smile:

Ah! It is also possible to use the windows boot loader to ask you what to boot each time. The trick
is convincing it that the partition having some non windows thing is bootable, because it will
refuse to do so. However, there is a freeware utility (I forgot the name) which will do that trick
for you if you wish. Ask tomorrow.

Ah! You said “separate drive”. Mmm… then the above might be incorrect. I’m not sure.

Another trick is choose in the bios which disk is the boot disk, and change it back when you need.
Or use grub tricks to revert and trick windows into booting. I don’t know how this can be done
exactly, never tried myself. But I heard somebody did.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Not an exact answer to your question, but perhaps information you can use.

I have two hard drives in my machine. One, the first, has openSUSE installed. The second, has Win XP PRO.

I will refer to the drives as Lindrive and Windrive

When I installed Windows, I moved the cables from the Lindrive to the Windrive, and left the Lindrive disconnected. Essentially, a single drive machine. After the Windows installation was complete, I moved it back to the second position and hooked up the Lindrive in the first, or boot position. I installed openSUSE on the Lindrive. I think it was 10.3 but I’ve used this procedure for all the 11 series. The installation detected the Windrive and asked me if I wanted to mount it. I opted to do so as Win/C

When the Linux installation was complete, my computer would boot to the grub menu which offered both Linux and Windows. Linux would boot, but not Windows. To get Windows to boot, I modified /boot/grub/menu.lst and changed the Windows part to read:


    map (hd1) (hd0)
    map (hd0) (hd1)
    rootnoverify (hd1,0)
    makeactive
    chainloader +1

You’ll have to use the root account to do this. After making that change, Windows boots from the grub menu just fine.

Now, things I learned while doing all this:
You can install Windows to any drive it recognizes and later move it to anywhere in the drive chain as long as you use either the computer bios to change it drive sequence or grub to trick Windows into thinking it’s number 1. You can pull the cable off the drive during a Linux install and then NOTHING will screw up Windows.

You can install Linux to any drive it recognizes but you can’t move it! The newer versions use a drive ID during install and moving it will mess up a lot of stuff. Make sure you have the drive recognized as where you want it before installing Linux.

Sure hope some of this helps.

Bart

On 2010-07-28 13:06, montana suse user wrote:

> You can install Linux to any drive it recognizes but you can’t move it!
> The newer versions use a drive ID during install and moving it will
> mess up a lot of stuff. Make sure you have the drive recognized as
> where you want it before installing Linux.

Yes, you can. Just change the entries in fstab to use another one of available schemes. There is
UUID, ID, PATH, and LABEL. Each one has advantages and disadvantages. I use “label”, which can be
moved, but not replicated.

You can also change this during install, expert partitioner.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

See? I knew I’d be wrong! :slight_smile:

Then again, I learned something!

Bart

On 2010-07-29 14:36, montana suse user wrote:
>
> Carlos E. R.;2197497 Wrote:
>>
>> Yes, you can. Just change the entries in fstab to use another one of
>> available schemes.
>
> See? I knew I’d be wrong! :slight_smile:
>
> Then again, I learned something!

I forgot to mention that grub may also need adjustments.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))