Install Windows after openSUSE Linux (Encrypted)

Hi,
I have a HP 630 notebook on which i have installed openSUSE Leap 15.0 on an encrypted EXT4 partition, along with Windows 7. So I have the following partitions:
Boot partition for Win7
NTFS partition with Win7
EXT4 encrypted with openSUSE (root)
/boot partition for openSUSE.

So the /boot partition is required to boot the encrypted EXT4. YaST -> Boot Loader reports that openSUSE starts from partition and from Master Boot Record.

Now, I need to re-install Windows 7 due to a bug in a driver that corrupted the system, can you please suggest me a procedure in order to restore GRUB after Windows will have overwritten the MBR?

Thanks in advance,

Bye
hawake

What is the output from

parted -l
linux-mr0h:/home/hawake # parted -l
Modello: ATA Hitachi HTS54755 (scsi)
Disco /dev/sda: 500GB
Dimensione del settore (logica/fisica): 512B/4096B
Tabella delle partizioni: msdos
Flag del disco: 

Numero  Inizio  Fine   Dimensione  Tipo     File system     Flag
 1      1049kB  186GB  186GB       primary                  type=07
 2      186GB   497GB  311GB       primary                  avvio, type=83
 3      497GB   497GB  210MB       primary  ext4            type=83
 4      497GB   500GB  2976MB      primary  linux-swap(v1)  type=82


linux-mr0h:/home/hawake #

I forget to mention the SWAP space in the previous post, but the strange thing is that it see just one partition for Windows (the one of 186 GB).

Thanks,

Bye
hawake

I have no idea whether encryption might affect this, but without encryption at least, using YaST, Grub could be put on the /boot partition on sda3 instead of the MBR, a boot flag set on sda3, and the MBR configured with generic boot code. Follow that with a test boot of openSUSE to be sure it was correctly done. Next install Windows. Once you have Windows the way you want it, any number of tools in Windows, or any bootable Linux media, could be used to move the boot flag back from sda1 (where Windows installation will put it) to sda3. Grub does not need to be on MBR to boot Linux: https://old-en.opensuse.org/Bugs/grub#How_does_a_PC_boot_.2F_How_can_I_set_up_a_working_GRUB.3F

What i do not understand is why YaST suggest to create a /boot partition during openSUSE installation process and *parted -l *see the / partition as the bootable one (in the previous code listing, the root partition is the one of 311 GB, the /boot is of 210 MB).

BTW I will try the procedure you suggested.

Thanks!

Bye
hawake

If encryption is used it is normal to suggest a separate boot to prevent need to enter passwords twice

Ok, but why it setup as bootable the root partition instead the /boot one?

So, from YaST -> Boot Loader, i uncheck “Boot from Master Boot Record” and leave checked “Boot from partition” (as it is right now, both are checked)?

Thanks,

Bye
hawake

Checks need to be only on:
1-Boot from [Root] Partition
2-Write generic Code to MBR
3-Set active Flag in Partition Table for Boot Partition

It worked! Thank you very much.

Thanks to this procedure I was able to install Windows and encrypt it with Veracrypt, while maintaining dual-boot with encrypted openSUSE.

Bye
hawake