Not very helpful. A screen shot of the Yast bootloader screen would have been better.
I’ll take your word for it that grub is on the extended partition.
Here’s what you can do:
- Make a copy of that boot partition
# dd if=/dev/sda2 of=bootsect count=1
- Make a note of where you saved that “bootsect” file. Perhaps the root directory would be a good place (so make it “/bootsect” in place of the “bootsect”.
- Possibly copy that boot sector to a USB flash drive for extra safety.
- Install Windows.
- Restore the booting. More details below. The Windows install is sure to have messed it up.
To restore the boot setup:
Boot from your install media, and select the “system rescue” option. When given a login prompt, type “root” (without the quotes). No password is required.
Mount your root partition
# mount /dev/sda5 /mnt
Check that you can find that “bootsect” file
ls -l /mnt/bootsect
Next, restort the boot sector to the extended partition
# dd if=/mnt/bootsect of=/dev/sda2 bs=440 count=1
Next, you will have to set the extended partition as the active partition.
# fdisk /dev/sda
p
That should show the partition table. One of the partitions – I’m guessing that it will be “/dev/sda3” will be marked as active (a “*” on that line).
continuing in your fdisk session
a
3
a
2
That’s what you type in. “fdisk” will ask which partition. The “3” in the second of those lines should be changed to whichever partition shows as active (the earlier line with “*”). This removes the active flag from that partition. The “2” in the fourth line marks the extended partition as active.
Continue with
w
which tells fdisk to save the changes.
The reboot. That should take you straight into opensuse. You probably cannot get into Windows at that stage. But it’s easy to fix that once you are in opensuse.
Finally, in opensuse:
# grub2-mkconfig -o /boot/grub2/grub.cfg
That should regenerate the boot menu, and put Windows in that menu.
If this all fails, there are other rescue possibilities. Hopefully this will work, giving you a relatively easy recovery.