0

So I have a internal Hard Drive and a external usb hard drive , the internal one has windows and the external one has ubuntu , I added an efi partition the the external drive cuz my internal one got corrupt and I bought a new one , so Now what I want to do is , I want my ubuntu to boot when it is plugged in the usb and windows to boot when my ubuntu usb is not plugged in , pls help

Note:In my case ubuntu is already installed

  • 2
    Because you are going to be physically disconnecting drives, the capabilities of your motherboard firmware (BIOS) will determine whether or not you can do this, and how you would be able to do this. Your motherboard firmware would need to prioritize the external hard drive over USB. But most BIOS will not keep this option if it isn't plugged in all the time. You will need to consult your motherboard documentation. There's probably nothing in Ubuntu you can do for this. You could install GRUB to your internal drive, but you would need to choose OS on boot (Ubuntu will fail if disconnected) – Nmath Dec 31 '21 at 07:20
  • Well Installing grub on the internal drive is what I tried but it fails to boot windows when ubuntu is disconnected even when grub and windows is on the same drive – Electro Dec 31 '21 at 07:32
  • Is EFI on the external drive as well? – Nmath Dec 31 '21 at 09:48
  • Does this answer your question? How to change boot priority? – karel Dec 31 '21 at 09:49
  • As Nmath is suggesting, you have to have grub installed to external drive in an ESP on that drive. Then you set external drive as first in UEFI boot order & Windows as second. External drives directly boot from /EFI/Boot/bootx64.efi just like the installer, not the "ubuntu" entry. Standard Ubuntu install only installs grub's EFI files to internal drive's ESP & uses "ubuntu" entry. But rest of grub is on external drive. https://askubuntu.com/questions/1167910/unable-to-properly-boot-linux-from-external-ssd/1167940#1167940 – oldfred Dec 31 '21 at 15:48

0 Answers0