restoring mbr does not work with grub2

Hello :slight_smile:

I used to backup the mbr with the command

dd if=/dev/sda of=pfad-name-file bs=512 count=1

and to restore it with

dd if=pfad-name-file of=/dev/sda bs=446 count=1

Now i noticed that this isnt working anymore when the bootloader is Grub2. When rebooting the system i get the msg “no operating system found”. What am i doing wrong ? Is it possible because grub is installed in the root partition (default) instead of being installed in the mbr ?

migo32 wrote:
> Is it possible because grub is installed
> in the root partition (default) instead of being installed in the mbr ?

That’s a question you have to answer, not us. It depends on how you
configured your system when you installed it.

Of course this works. It definitely writes the first 446 bytes of that file to the first 446 bytes on that disk. That has nothing to do with grub or openSUSE or what else. It is a plain hard byte copy.

What may go wrong is why you are doing this and if this command still is instrumental in what you want to happen. We do not know in what siruation you wrote the file, nor what you did afterwards to the MBR that you think must be undone. Thus a further explanation why you want to do this, might help you in finding out why a path you walked in the past is not the right path anymore.

Certainly…

When i install my System, im make backups of my partitions. Im using fsarchiver for it, but fsarchiver doesnt save the mbr. With the images from my partitions (/ and home) i can go back to a working system within a few minutes.
In case of going back to my fomer working openSuse 12.1 i have to restore the mbr, and when im on 12.1 and want to continue on 12.3, i have to restore the backup’ed mbr for 12.3.
This worked fine with grub, but doesnt anymore wiht grub2.

I am not an expert here, but grub2 is probably not installed in the MBR.

Did you check if the two MBR backups differ?

Unless you explain what you have done between saving and “restoring” MBR - preferably step by step - there is no way to even guess.