Again - this code is for booting Windows in legacy BIOS mode; you are booting openSUSE in EFI mode. You cannot use this code to boot Windows. And you cannot boot Windows in EFI mode because for this you need Windows bootloader on ESP and you do not have it.
The simplest solution is to change how you boot openSUSE (i.e. to switch it to legacy BIOS mode). If you consider it, please post “fdisk -l” output to show your current partition table and “blkid” output to check UUIDs.
I used to have this setup working (booting opensuse and Windows 7) with opensuse 13.2. I believe I used grub2.
Most likely, during installation of Leap I reformatted the /boot/efi or /boot. But I don’t remember.
How can I put the Windows’s bootloader on ESP? Is it a matter of copying files? I can mount Windows 7’s partitions and copy files from there. This is the path I would like to go if possible.
Shall I change motherboard’s settings for this?
Here are outputs of disk-related commands, with some information removed. /dev/sdb4 is data storage, not an OS. Opensuse OS is entirely on /dev/sda
fdisk -l
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x..d3
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sdb2 206848 839072951 838866104 400G 7 HPFS/NTFS/exFAT
/dev/sdb3 839073792 964911103 125837312 60G c W95 FAT32 (LBA)
/dev/sdb4 964911104 1953523711 988612608 471.4G 83 Linux
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: ..2F
Device Start End Sectors Size Type
/dev/sda1 2048 610303 608256 297M EFI System
/dev/sda2 610304 2715647 2105344 1G EFI System
/dev/sda3 2715648 48852991 46137344 22G Microsoft basic data
/dev/sda4 48852992 103378943 54525952 26G Microsoft basic data
/dev/sda5 103378944 136937471 33558528 16G Microsoft basic data
/dev/sda6 136937472 199848011 62910540 30G Microsoft basic data
GPT PMBR size mismatch (10701336 != 1565565871) will be corrected by w(rite).
I would say by booting from Windows installation CD and running boot recovery. There is more than just files there, Windows bootloader configuration is also kept on ESP and must be recreated.
But I strongly advice to change /dev/sda2 partition type to something different than ESP; Windows gets very confused when it sees two ESP and bootloader recovery fails. /dev/sda2 cannot be ESP because it contains ext4 filesystem.
Device Start End Sectors Size Type
/dev/sda1 2048 610303 608256 297M EFI System
/dev/sda2 610304 2715647 2105344 1G EFI System
/dev/sda1: SEC_TYPE=“msdos” UUID=“22A0-696F” TYPE=“vfat” PARTLABEL=“primary” PARTUUID=“fd26a45c-8e5e-4dd1-9191-1cfa14715ce3”
/dev/sda2: UUID=“787889e3-ce01-4a27-86dc-a4428a953f5b” TYPE=“ext4” PARTLABEL=“primary” PARTUUID=“d767d397-c7ec-4838-bcd6-888b79fae1e0”