Skip to content

Instantly share code, notes, and snippets.

@soscler
Last active August 20, 2019 09:51
Show Gist options
  • Save soscler/7f70177744e5b9577ac3a81418627b28 to your computer and use it in GitHub Desktop.
Save soscler/7f70177744e5b9577ac3a81418627b28 to your computer and use it in GitHub Desktop.

GRUB bootloader gets overrided if you install Windows after Ubuntu. I make this video tutorial on how to restore and customize the GRUB loader.

Common Problem: You install Windows after you install Ubuntu. That erases the GRUB loader, and instead of being able to switch between Ubuntu and Windows, Windows will boot automatically.

Steps:

  1. Create a bootable USB Flash Drive of Ubuntu.
  1. Restart computer and boot into Ubuntu.
  2. Use try Ubuntu and install boot-repair. Commands: sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install boot-repair y boot-repair
  3. Recommended repair.
  4. Afterwards, if you restart, you can see the GRUB Bootloader again. You can select between Ubuntu and Windows.
  5. Use Ubuntu Next parts will be customizing Ubuntu GRUB Bootloader:
  6. Open a terminal: sudo fdisk -l
  7. Keep track of what sda number is Windows partition on.
  8. Customize GRUB bootloader cd /boot/grub sudo gedit grub.cfg
  9. Delete any duplicate entries that do not match sda number correctly, and delete any extra entries that you may never use.

Twitter: https://twitter.com/microwavesam Blog: http://slothparadise.com

Consider supporting our group in making stuff: ►https://www.patreon.com/slothparadise

Boot successfully repaired.

Please write on a paper the following URL: http://paste.ubuntu.com/p/CnDTsFPdsy/

In case you still experience boot problem, indicate this URL to: [email protected] or to your favorite support forum.

You can now reboot your computer. Please do not forget to make your BIOS boot on sdb4/EFI/ubuntu/shimx64.efi file!

If your computer reboots directly into Windows, try to change the boot order in your BIOS. If your BIOS does not allow to change the boot order, change the default boot entry of the Windows bootloader. For example you can boot into Windows, then type the following command in an admin command prompt: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment