You are not logged in.

#1 2023-04-13 17:54:58

FlashSystems
Member
Registered: 2019-11-24
Posts: 3

ukibak - "Last known good" fallback for your boot config

If you're using a unified kernel image (UKI) all parts necessary to boot the system are integrated into one file (at least kernel, the initrd and the kernel command line). After having to fall back to booting from an USB thumb drive after messing up the kernel command line of my notebook I thought: "Couldn't I simply create a backup copy of the UKI after the system has successfully booted?"

That's why I created ukibak. It keeps a backup copy of the UKI within the ESP. This backup can simply be added to the boot menu and can be used if something goes wrong with the current kernel image or configuration.

In addition to a simple call to copy (which would also work) ukibak does some additional checks to make everything faster and more intuitive:

  1. Check that the currently booted kernel isn't already the backup copy.

  2. Check that the currently booted kernel image is in deed a UKI and that it contains at least the kernel, an initrd and the kernel command line. This makes sure that we do not create an unusable backup copy.

  3. Check that the currently booted kernel image was not modified since the last reboot. This is done to make sure that image has at least booted once successfully before we copy it.

  4. Check that the currently booted kernel is different from the backup copy. This makes sure that we do not make unnecessary copy operations that may be slow and can wear out your eMMC or SDCard.

More details about this tool are available on its GitHub page.

There is an AUR package available that can be installed manually or via your favourite AUR helper.

Feel free to leave suggestions or questions in this thread or to open an issue on GitHub page.

Last edited by FlashSystems (2023-04-16 17:49:20)

Offline

#2 2023-04-14 09:41:22

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: ukibak - "Last known good" fallback for your boot config

interesting idea and the aur PKGBUILD looks good.

One request :
It's best practice and perfectly fine to use AUR without an aur helper . Please replace the aur helper references in your post and on github with a link to https://wiki.archlinux.org/title/Arch_User_Repository .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2023-04-15 13:18:31

FlashSystems
Member
Registered: 2019-11-24
Posts: 3

Re: ukibak - "Last known good" fallback for your boot config

Hello Lone_Wolf,

thank you for your feedback. I've modified my original posting and the README.md to make it clear, that an AUR helper is by no means a requirement to install the package. I've included the link to the wiki for manual installation of the AUR package.

Offline

Board footer

Powered by FluxBB