You are not logged in.

#1 2022-05-20 17:28:09

DrLucky
Member
Registered: 2021-09-21
Posts: 23

boot partition on removable USB

I believe I have an inherent misunderstanding of how GRUB/the bootloader process works with the motherboard bios.
I am trying keep my boot partition on a removable usb - for security but largely as a fun "stick the keys in the ignition to start the car" sort of experience.

I am making a uefi system.
My swap and root partition remain on the internal nvme drive.
I edited my fstab file to use the UUID of the removable usb.
GRUB install and configuration worked fine.

The first reboot worked perfectly, Arch booted up just as normal. lsblk confirmed my boot partition was on the usb drive and swap and root on the nvme.
Second reboot was a test without the usb plugged in.  As expected, it landed me in my motherboard's bios (uefi) menu as no boot partition was present in the system.

The issue starts after that. My motherboard does not see GRUB on the usb boot partition on any following reboots. I have to use a live arch iso to chroot into the usb and nvme and re-generate with

grub-mkconfig -o /boot/grub/grub.cfg

a grub.cfg file in order for the boot option to reappear on my motherboards boot options.

At this point I'm not quite sure where to start digging. I previously assumed that at boot the motherboard scans all local storage for a boot partition, finds grub, and carries on from there. 
I've ran into a (I think) similar issue in the past when needing to clear the CMOS of a different motherboard - grub was no longer listed in the boot options, and a chroot to regenerate the grub.cfg was needed to boot back into my arch os.

I'd appreciate it if someone could point me in the right direction or explain where my misunderstanding of the process lies.

Offline

#2 2022-05-20 17:40:44

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: boot partition on removable USB

Many firmwares will remove NVRAM entries if they don't exist. You need to install grub to the default loader location using the --removable option.

See https://www.happyassassin.net/posts/201 … work-then/ to understand what's happening.

Last edited by Scimmia (2022-05-20 17:41:40)

Online

#3 2022-05-20 17:56:58

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: boot partition on removable USB

To expand further on Scimmia's post...
https://wiki.archlinux.org/title/GRUB#Installation_2

Also you don't have a BIOS - you have a UEFI firmware menu.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2022-05-20 18:53:29

DrLucky
Member
Registered: 2021-09-21
Posts: 23

Re: boot partition on removable USB

Scimmia wrote:

Many firmwares will remove NVRAM entries if they don't exist. You need to install grub to the default loader location using the --removable option.

ahh, I was suspecting something like this.
I recall seeing that option being used when installing arch entirely to a usb and wondered if I needed the same or similar.
So in a usual grub install, the mb is writing a bit to the NVRAM about grub now being present?

Slithery wrote:

Also you don't have a BIOS - you have a UEFI firmware menu.

true, and fair enough, I need to break the habit of calling them all BIOS.

Offline

#5 2022-05-20 19:39:27

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: boot partition on removable USB

Sorry, I'm just being pedantic.

It's a pet peeve of mine that everyone still keeps calling 'UEFI Firmware' 'BIOS'.

I try to correct them in every relevant thread but I feel like no-one listens to me......


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB