Skip to content

Commit

Permalink
Update mkinitcpio.conf hooks for upstream consistency (#2515)
Browse files Browse the repository at this point in the history
This commit adjusts the hooks in mkinitcpio.conf to follow the changes
in the upstream mkinitcpio repository.
It also add the consolefont hook if udev is used instead of systemd.

Addresses upstream commits:
[mkinitcpio.conf: add kms to the default HOOKS array](https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/commit/b99eb1c0d5704ed0a0d220d0abcbbbeec10a3b76)
[mkinitcpio.conf: adjust the placement of the modconf hook for consistency](https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/commit/0b052b14615fefbb61ee3d813e3acd365332ee35)

Additionally, it replaces the missing `consolefont` hook if the
`keyboard` hook is used instead of the `sd-vconsole` hook.
For more details, see the Arch Wiki:
[dm-crypt/System configuration - 1.1 mkinitcpio](https://wiki.archlinux.org/title/Dm-crypt/System_configuration#mkinitcpio)
  • Loading branch information
AlexpFr committed May 25, 2024
1 parent 6863994 commit 6b48d78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def __init__(
# systemd, sd-vconsole and sd-encrypt will be replaced by udev, keymap and encrypt
# if HSM is not used to encrypt the root volume. Check mkinitcpio() function for that override.
self._hooks: List[str] = [
"base", "systemd", "autodetect", "microcode", "keyboard",
"sd-vconsole", "modconf", "block", "filesystems", "fsck"
"base", "systemd", "autodetect", "microcode", "modconf", "kms", "keyboard",
"sd-vconsole", "block", "filesystems", "fsck"
]
self._kernel_params: List[str] = []
self._fstab_entries: List[str] = []
Expand Down Expand Up @@ -709,7 +709,7 @@ def mkinitcpio(self, flags: List[str]) -> bool:
# This is purely for stability reasons, we're going away from this.
# * systemd -> udev
# * sd-vconsole -> keymap
self._hooks = [hook.replace('systemd', 'udev').replace('sd-vconsole', 'keymap') for hook in self._hooks]
self._hooks = [hook.replace('systemd', 'udev').replace('sd-vconsole', 'keymap consolefont') for hook in self._hooks]

mkinit.write(f"HOOKS=({' '.join(self._hooks)})\n")

Expand Down

0 comments on commit 6b48d78

Please sign in to comment.