How to install grub to mbr in 13.1 ?

Now my opensuse 13.1 is in /dev/sdb3, I want to install grub to mbr of /dev/sda .

I try sudo /usr/sbin/grub2-install /dev/sda , but it does not work .

How to do it ?

You will probably be helped by using caf4926’s article on reinstalling Grub2 here:


Why do you think it does not work? This does install grub into MBR of /dev/sda. Whether your system will actually boot from MBR of /dev/sda is another question. It depends on BIOS settings.

Please explain what you expect and why you think “it does not work”.

You do it the same way as ever.

The only reason I can think of, that you might be having problems, is that perhaps you have a GPT partitioned disk. In that case, you need to create a special partition for grub to use.

On the box where I did that (for an external drive), I created a partition starting at sector 34, and ending at sector 2047. And I gave it a partition type code of “ef02”. I did this with “gdisk”.

With MBR partitioning, “grub2” install in an MBR cheats and puts some of its code in unused space just after the MBR. That doesn’t work with GPT partition, so instead grub2 looks for that special “BIOS boot partition”. I think it can go anywhere, and the type code is what grub2 recognizes. But the location immediately after the GPT partition table (sectors 34-2047) is the recommended place.

Then grub-install had failed if this partition were missing.

I mean after I do that I can not boot from sda.
If this is a matter of my disk? Is my disk dying ?