How do I recover MBR

After a Power failure, my system (13.1) boots to the GRUB prompt.
I used another disk and did fsck /dev/sda2 (my root partition) and that cleared the problems.
Using the installation disk I went to rescue and logged in with root and get a su prompt " rescue ~:# "
Can anyone help me with steps to recover the mbr?

chroot into the system from your rescue:

mount /dev/sda2 /mnt
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt

re-init grub2:

grub2-mkconfig -o /boot/grub2/grub.cfg

And then reboot.

When I do the first line I get "can’t find /dev/sda2/mnt in /etc/fstab "

You forgot the space between /dev/sda2 and /mnt

Here’s it in code wrap:

mount /dev/sda2 /mnt
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt

grub2-mkconfig -o /boot/grub2/grub.cfg

I always forget to wrap it since my font makes spaces quite visible. Sorry 'bout that.

When I get to grub2-mkconfig -o , I get
/use/sbin/grub2-mkconfig: option requires an argument – “-o”

You need to read the box up there more carefully - it clearly states the full command, you completely dropped everything after -o

grub2-mkconfig -o /boot/grub2/grub.cfg

Sorry about that - I was using my phone and it put it on 2 lines.

It then started generating grub.config

found linux theme
found linux image
found initrd image

then had a problem

ERROR opening path /mounts/instsys/sys/block
ERROR failed to discover devices

/dev/mapper/control: mkmod failed: No such file or directory
failure to connect with kernel device-mapper driver
Check that device-mapper is available in the kernel
WARNING: failed to connect to lumetad: No such file or directory. Falling back to internal scanning.
No Volume groups found

Do you use LVM or some other weirdo setup?

Did you make sure you bound all the paths correctly?

The fsck command will correct problems to produce a sane file system but may leave files and directories orphaned, depends on how bad the FS got scrambled. They then end up in lost&found. Note that this can be full files or just fragments. With text files they can be pieced back together but is is pretty much impossible for binaries. If you have lost a whole sub directory the FS even though now sane may still be hosed as far as files and data. I recommend you re install. If yoou don’t format home and just mount it as /home your personal files should be ok in the main.

Hi Miuku, No weird things here just a plain old opensuse out of the box. Not even windows.

Tomorrow morning I will get a linux technician in to see if he can help. If not, I will upgrade to 13.2

Thanks for your help.