Several days ago I installed a Ubuntu 18.10 on a machine already installed a Windows 10.
At the beginning I thought such task could be finished easily in half hour, and I installed it smoothly until I rebooted the machine. After the reboot, I found I could not find the familiar grub boot menu and the machine booted to Windows 10 directly!
Finally, it took me several hours to get it dual boot, and I believe I should share such experience with all other guys just as I also got help from other friends even I did not know their names.
First trouble was that grub2 changed too much and I even could not make a simple change, like displaying the menu and changing the default boot entry.
The second was about UEFI boot mode. To get dual boot, something have to be changed in the BIOS, and maybe also need to change something in the Windows 10.
The final was the Windows boot manager.
I only installed it one time, so some configurations were made while I am not sure if they are related with the final success, so in this post I have to say 'maybe' plenty of times. Usually I do not include such things in my posts, while this time I have to as I will not remember the details soon but I am busy in learning Javascript these days.
Some key points as below:
- In the BIOS, disable the 'Secure Boot' (and 'Fast Boot'?)
- In the Windows 10, disable the 'Fast Boot'. Search 'Control Panel', then search 'Power Options' in the Control Panel, click 'Choose what the power buttons do', click 'Change settings that are currently unavailable.', then you can disable 'Fast Boot'. Some systems maybe also need to disable hibernate: 'powercfg /h off'. Then shutdown the system.
- Make sure the correct grub2 is installed, such as grub-efi. If not, the have to install it in the rescue mode. Follow these steps:
- Mount the / filesystem under a folder, like /mnt
- Find the EFI partition and mount it to /mnt/boot/efi
- mount -o bind /dev /mnt/dev
- mount -o bind /dev/pts /mnt/dev/pts
- modprobe efivars
- chroot /mnt
- mount -t sysfs none /sys
- mount -t proc none /proc
- install grub-efi
- efibootmgr -v or check the /boot/efi/EFI folder to make sure the right Linux entry has been generated
- In the BIOS, sometime you can choose to boot the Linux system, but maybe it does not work.
- In the Windows 10, run:
- OK, Now reboot and enjoy the dual boot.