I needed a linux-based system for my work, and because I rely on windows and have no other devices, I wanted to dual boot windows and ubuntu. In my case, I had an external SSD, so I decided to install ubuntu on the external ssd, leaving everything as is.
In my setup, I have 3 drives:
- Internal SSD: has Windows 10 installed, and an EFI partition (I will come to that later)
- An HDD: with my data, should be completely irrelevant.
- External (USB) SSD: has Ubuntu 20.04 installed and configured, two partitions: root and swap (in that order, in case it matters), swap is 7GB, root is the rest.
My boot menu has two elements, regardless of whether the external SSD is connected or not. The two elements are (in order): ubuntu
, and Windows Boot Manager
both with the same drive id, so I believe both are likely installed in the EFI partition.
If the external SSD is connected, GRUB loads and asks me whether I want to load Ubuntu or load Windows 10. Perfectly okay, later on I would love for it to just load ubuntu automatically, but that's not my (current) issue.
However, if the external SSD is disconnected, GRUB still loads, but freaks out and gives me a CLI which I dunno what to do with. Typing exit
just "crashes?".
Switching the boot order completely ignores Ubuntu; always loads Windows.
Ideally, I would want to move GRUB to the external SSD, and make it so it loads Ubuntu by default (or shows me the window) if it is connected, loads Windows if it is not.
Trying to follow this, I attempted to run sudo grub-install /dev/sdc
, but it finishes almost instantly and nothing seems to be changed. I know I can probably remove the ubuntu
loader using something like this, but I don't want to do that without first installing grub in case it needs to be done from ubuntu.
EDIT: I also ran a grub-update
. In my external ssd, I currently have a boot
folder (I dunno if it's been always there, or if it was added after I grub-install
ed). But it doesn't seem to show up in my boot menu.
I think my issue is quite similar to this one, but unfortunately it is not answered, and the comments suggest reinstalling ubuntu (which I really don't want to do)
TLDR; Both GRUB and Windows Boot Manager reside currently in the same drive, I want to move just GRUB to the external drive.
sudo update-grub
to add the internal drives to the USB boot menu, then continue as oldfred says. – C.S.Cameron May 06 '21 at 01:44