If you keep your Zorin OS USB stick plugged in so you can easily boot from it, you know that you then have to change the boot order to do so. The procedure for doing so ranges from entering your BIOS and changing the boot order, to pressing a certain key as the machine boots to change the boot order, depending upon your machine.
Here's another way, with a couple distinct advantages:
To add the Zorin OS USB stick as a Grub menu entry:
Use one of two methods to open the 40_custom
file:
sudoedit /etc/grub.d/40_custom
- or -
install Nautilus Admin:
sudo apt install nautilus-admin
... then right-click the /etc/grub.d/40_custom
file and select "Edit As Administrator".
Add the following at the bottom of the text:
menuentry 'Zorin OS Boot USB' --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
search --no-floppy --set=root --fs-uuid 2022-12-08-19-53-13-00
configfile /boot/grub/grub.cfg
}
Where "--fs-uuid 2022-12-08-19-53-13-00
" is the UUID of the Zorin OS USB stick as found in sudo blkid
.
Save that file, then issue:
sudo update-grub
You can view what your Grub menu entries will be via:
awk -F\' '/^menuentry / {print $2}' /boot/grub/grub.cfg|cat -n|awk '{print $1-1,$1="",$0}'
Now, the advantages:
-
The original grub menu pops up, you select 'Zorin OS Boot USB', then another grub menu pops up for the Zorin OS USB stick... so you can input kernel parameters for it, just as you can for the installed Zorin OS.
-
You no longer have to change BIOS settings or press a special key to boot the Zorin OS USB stick.
-
You can reboot from Zorin OS into the Zorin OS Boot USB without having to press any key...
Running the command above, my grub boot menu looks like:
0 Zorin OS 16.2
1 UEFI Firmware Settings
2 Zorin OS Boot USB
So if I wanted to reboot into the Zorin OS Boot USB, I could just issue:
grub-reboot 2
Of course, it helps if your Grub menu comes up every time you boot.