Giter Club home page Giter Club logo

systemd-boot-kernel's Introduction

systemd-boot-kernel

ARCHIVED - never added to the aur

A package to enable systemd-boot automation using kernel-install on Arch-based distros.

The kernel-install hooks were adapted from the AUR package originally written by Tilmann Meyer. Inspired by eos-systemd-boot

The package basically does a few things:

  • Overrides the mkinitcpio hooks to generate presets that work with kernel-install
  • Installs hooks to automate the installation and removal of kernels using kernel-install
  • Saves kernel options to /etc/kernel/cmdline to support recovery in a chroot

Compared to systemd-boot-manager this:

  • has no global config file itself, but kernel-install is configurable (see the man page)
  • does not support "fallback" initrds
  • does support multi-boot scenarios, e.g. multiple installations of the same OS with the same kernel version

Example partition layout:

+----------------------+------------------------+------------------------+
| EFI System Partition | Root filesystem #1     | Root filesystem #2     |
|                      |                        |                        |
|                      | /boot                  | /boot                  |
| /efi                 | /                      | /                      |
|----------------------|------------------------|------------------------|
| /dev/sda1            | /dev/sda2              | /dev/sda3              |
+----------------------+------------------------+------------------------+

I recommend that you enable systemd-boot-update.service as well

Additional information:

Usage: sdboot-kernel [action]

Actions:
  install  Generate mkinitcpio presets and install kernels, ucode & initramfs
           to $BOOT
  remove   Remove orphaned kernels from $BOOT and mkinitcpio presets
           entries for other machine-ids are untouched

$BOOT = EFI system partiton; /efi, /boot or /boot/efi

$BOOT should be considered shared among all OS installations of a
system. Instead of maintaining one $BOOT per installed OS (as /boot/ was
traditionally handled), all installed OS share the same place to drop in
their boot-time configuration.

After installing this package and initializing, your $BOOT partition should look like this:

$ bootctl install

$ sdboot-kernel install

$ find /efi -type f | sort
/efi/${MACHINE_ID}/5.15.25-1-MANJARO/amd-ucode.img
/efi/${MACHINE_ID}/5.15.25-1-MANJARO/initrd
/efi/${MACHINE_ID}/5.15.25-1-MANJARO/linux
/efi/${MACHINE_ID}/5.17.0-2-MANJARO/amd-ucode.img
/efi/${MACHINE_ID}/5.17.0-2-MANJARO/initrd
/efi/${MACHINE_ID}/5.17.0-2-MANJARO/linux
/efi/EFI/BOOT/BOOTX64.EFI
/efi/EFI/systemd/systemd-bootx64.efi
/efi/loader/entries/${MACHINE_ID}-5.15.25-1-MANJARO.conf
/efi/loader/entries/${MACHINE_ID}-5.17.0-2-MANJARO.conf
/efi/loader/loader.conf
/efi/loader/random-seed

$ find /boot -type f | sort
/boot/amd-ucode.img
/boot/linux515-x86_64.kver
/boot/linux517-x86_64.kver

The following hooks will run when installing a kernel:

  • /usr/share/libalpm/hooks/90-sdboot-kernel-install.hook

And when removing a kernel:

  • /usr/share/libalpm/hooks/60-sdboot-kernel-remove.hook

The following hooks from other packages are disabled:

  • /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook
  • /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
  • /usr/lib/kernel/install.d/50-depmod.install

systemd-boot-kernel's People

Contributors

cody-greene avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.