Dual boot with UEFI boot mode and grub2

NeilZhang
NeilZhang
管理员
140
文章
106.8千
浏览
Linux评论1,1971字数 440阅读1分28秒阅读模式

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:

  1. In the BIOS, disable the 'Secure Boot' (and 'Fast Boot'?)
  2. 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.
  3. 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:
    1. Mount the / filesystem under a folder, like /mnt
    2. Find the EFI partition and mount it to /mnt/boot/efi
    3. mount -o bind /dev /mnt/dev
    4. mount -o bind /dev/pts /mnt/dev/pts
    5. modprobe efivars
    6. chroot /mnt
    7. mount -t sysfs none /sys
    8. mount -t proc none /proc
    9. install  grub-efi
    10. efibootmgr -v or check the /boot/efi/EFI folder to make sure the right Linux entry has been generated
  4. In the BIOS, sometime you can choose to boot the Linux system, but maybe it does not work.
  5. In the Windows 10, run:
    1. bcdedit /enum firmware, make sure the Linux entry could be found
    2. bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
  6. OK, Now reboot and enjoy the dual boot.

 
  • 本文由 NeilZhang 发表于28/10/2018 01:22:42
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/linux/dual-boot-with-uefi-boot-mode-and-grub2/
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定