This is the entire process that I did to create my multi boot system using Windows 10 and openSuse 42.1 Leap using EFI system partition.
Hardware:
- Laptop Asus A55VD
- Processors: 8 Intel Core i7-3610QM CPU @ 2.30GHz
- Ram: 6 GiB
- HDD: 500 GiB
Tools:
- USB stick with Windows 10
- USB stick with openSuse 42.1 Leap
I want to describe the complete process for anyone with dubts.
First clean the entire HDD for change from MBR to GPT. After that boot USB UEFI option and install Windows 10 Pro.
In Windows 10 partition assistant first delete every partition. Then make first partion with desire size, and automatically ask for creation of other partiotions that the SO Windows need, then press Accept.
After that install continue the installation in created partition for the SO.
When finish complete Windows install preceed to install openSuse 42.1.
Boot with and openSuse USB stick in UEFI mode too and follow the different steps. When reach the partition options, make a custom partition, in my case I create one partition for “/” (btrfs file system),
one for “/home” (xfs file system) and one for “swap”, each one choose the prefered size and file system for the different partitions. After that follow the steps as default and before finish the installation
shows a window error about grub2 bootloader installation; don’t care about that and continue until finish.
Now you should have the two operating systems installed but only will boot Windows 10 directly without show boot options.
After that I proceed to install grub2 in EFI partition, replacing the info that Windows put there.
Boot again in EFI mode with the USB with opensuse 42.1 Installation and choose the option Rescue; the put as login “root” with blank password.
Then you must know the information about your partition table.
parted -l
or
fdisk -l
Then use the follow commands step by step (take care don’t copy the evey command adyacent explantion):
mount /dev/sda2 /mnt (sda5 is my root partition)
mount /dev/sda1 /mnt/boot/efi (sda2 is my efi partition)
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
modprobe efivars (make sure this is loaded)
Enter chroot mode:
chroot /mnt
grub2-install --target=x86_64-efi
shim-install (only needed for secure-boot)
grub2-mkconfig -o /boot/grub2/grub.cfg (write configuration to grub.cfg)
Then Ctrl+D for out chroot and umount every mounted resource:
for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done
umount /mnt/boot/efi #please do this. corrupted efi partitions are not nice
umount /mnt
After that reboot the system:
reboot
Now the grub is installed and working perfectly except that don’t appear the entry for Windows 10 in the grub. Don’t be scared.
Start openSuse OS and log in.
After that we will recover the Windows 10 entry in “/boot/grub2/grub.cfg” file.
Then execute the script provided by openSuse for find other operating systems.
./etc/grub.d/30_os-prober
In my case it returned the following lines
menuentry ‘Windows Boot Manager (on /dev/sda2)’ --class windows --class os $menuentry_id_option ‘osprober-efi-42F6-0AEC’ {
insmod part_gpt
insmod fat
set root=‘hd0,gpt2’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 42F6-0AEC
else
search --no-floppy --fs-uuid --set=root 42F6-0AEC
fi
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
You can change the name ‘Windows Boot Manager (on /dev/sda2)’ by your prefered name for your windows partition.
Then put the returned text in “/boot/grub2/grub.cfg” file, after submenu entry
submenu ‘Advanced options for openSUSE Leap 42.1’ … {
…
}
Save changes and reboot for test. You should see the grub2 menu with all entries.
Hope this help.