I just bought a new Windows 10 machine and want to use my Ubuntu 22.04 on an external drive that I was using connected to my older Windows 10 machine with dual boot.
So in this case, I am not sure if I am making my new machine a dual boot like I did for my old or if there is a way to just get Grub on the new machine so when I plug my external drive in the USB, I can run Ubuntu, ie. I have a portable Ubuntu 22.04 that I can carry around.
- 829
1 Answers
Install GRUB on Windows to replace Windows Boot Manager and Boot External Ubuntu
UEFI should boot GRUB located on an external drive automatically.
I have tested this with an external install made like this: How to Create a Full Install of Ubuntu 22.04 to USB Device Step by Step You will need to use F9, F12, etc to select the USB drive.
You can also add the external drive to the UEFI boot menu.
To add the Full install USB drive to internal GRUB
Once GRUB has been installed to the internal drive you can plug in your external drive and run sudo update-grub Ubuntu must be installed in the same BIOS or UEFI mode as Windows.
Note: Grub 2.06 turns off os-prober in /etc/default/grub. See: How can I add Windows 11 to grub menu?
To add Persistent Live install to the internal GRUB boot menu, (by hand)
Add the following menuentry to /etc/grub.d/40_custom and then run sudo update-grub
menuentry "Ubuntu USB" {
set root=(hd0,1)
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
initrd /casper/initrd
}
or
menuentry "Ubuntu - flash drive" {
search --set=root --fs-uuid xxxx-xx-xx-xx-xx-xx-xx
set gfxpayload=keep
linux ($root)/casper/vmlinuz$casper_flavour file=/cdrom/preseed/ubuntu.seed quiet splash ---
initrd ($root)/casper/initrd$casper_flavour
}
where xxxx-xx-xx-xx-xx-xx-xx is the USB / partition UUID
If I recall right.
- 20,530
- 12
- 78
- 125