isantop / kernelstub

A simple EFI boot manager manager for Linux
Other
87 stars 21 forks source link

add option to preserve NVRAM boot order #38

Open vindex10 opened 8 months ago

vindex10 commented 8 months ago

efibootmgr has two options: -c and -C. The latter allows to add a new entry but keep the boot order intact.

I'm using kernelstub in a dual-boot scenario, and also use systemd-boot as a bootloader.

I want to keep the systemd-boot entry - the default, but I want kernelstub to update the NVRAM entry whenever the kernel upgrades, so that I can use the direct NVRAM entry as a fallback if needed.

Currently, kernelstub uses -c option only, which brings the newly added entry to front of the boot order, which requires me to reset boot order manually each time the kernel upgrades.

This pull request is a sketch of what I think of, I'm open to suggestions, comments, improvements :)