linux-surface/contrib/fedora-default-kernel
Maximilian Luz 20ca44dc7f
contrib/fedora-default-kernel: Make more robust and add rEFInd support
Add a script to explicitly handle multiple Surface kernel versions being
installed in parallel, sorting kernels by timestamp and choosing the
latest one.

Further, add support for rEFInd by updating the vmlinuz file timestamp
to ensure it's always seen as the last modified file (which will be
picked by rEFInd as the "default" kernel in that directory).

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
2023-06-02 21:55:09 +02:00
..
default-kernel.path contrib: Add Fedora default-kernel scripts 2021-04-20 18:37:47 +02:00
default-kernel.service contrib/fedora-default-kernel: Make more robust and add rEFInd support 2023-06-02 21:55:09 +02:00
default-kernel.sh contrib/fedora-default-kernel: Make more robust and add rEFInd support 2023-06-02 21:55:09 +02:00
README.md contrib/fedora-default-kernel: Make more robust and add rEFInd support 2023-06-02 21:55:09 +02:00

Fedora Default Kernel Updater

This is a small systemd service and path unit that makes sure that the linux-surface kernel is always booted by default on Fedora.

The out of the box behaviour is that the newest kernel will be booted by default. This means that if the default kernel is ahead of the surface kernel, you have to go into GRUB and change the selection every time.

Installation

$ sudo dnf install /usr/sbin/grubby
$ sudo cp default-kernel.{path,service} /etc/systemd/system/
$ sudo cp default-kernel.sh /usr/local/bin/default-kernel
$ sudo chmod 755 /usr/local/bin/default-kernel
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now default-kernel.path