Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  14] [ 0]  / answers: 1 / hits: 160805  / 2 Years ago, thu, january 13, 2022, 3:57:40

I am not asking how to boot the LiveCD from a USB.



I have 2 Ubuntu installations, one on my computer's internal hard drive and another on a USB drive.



Is there a way to add a GRUB2 menu entry (to the GRUB on my internal hard drive) to boot the Ubuntu OS which I have installed to the USB flash drive and have this same menu entry still work after I've upgraded the Linux kernel on the USB installation?


More From » boot

 Answers
4

I found out how to use the UUID of the drive, useful if you have multiple drives plugged in at boot time. Credits to oldfred for his note about /vmlinux and /initrd.img symlinks.



Add this to the file /etc/grub.d/40_custom, replacing UUID=XXXX-YYYY with the partition UUID (get UUID with command blkid)



menuentry "Boot from USB Drive" {
set root=UUID=XXXX-YYYY
linux /vmlinuz root=UUID=XXXX-YYYY ro quiet splash
initrd /initrd.img
}

[#29498] Thursday, January 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utonmbo

Total Points: 134
Total Questions: 104
Total Answers: 118

Location: Argentina
Member since Mon, Jan 3, 2022
2 Years ago
;