contrib: Add Fedora default-kernel scripts
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
This commit is contained in:
parent
45da5af37d
commit
9db0374050
17
contrib/fedora-default-kernel/README.md
Normal file
17
contrib/fedora-default-kernel/README.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# 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
|
||||
|
||||
```bash
|
||||
$ sudo dnf install /usr/sbin/grubby
|
||||
$ sudo cp default-kernel.{path,service} /etc/systemd/system/
|
||||
$ sudo systemctl daemon-reload
|
||||
$ sudo systemctl enable --now default-kernel.path
|
||||
```
|
8
contrib/fedora-default-kernel/default-kernel.path
Normal file
8
contrib/fedora-default-kernel/default-kernel.path
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=linux-surface default kernel watchdog
|
||||
|
||||
[Path]
|
||||
PathChanged=/boot
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
6
contrib/fedora-default-kernel/default-kernel.service
Normal file
6
contrib/fedora-default-kernel/default-kernel.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=linux-surface default kernel watchdog
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c "grubby --set-default /boot/vmlinuz*surface*"
|
Loading…
Reference in a new issue