mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
limine-snapper.sh: write /etc/kernel/cmdline and rebuild UKI
In the package-based install, omarchy-limine is a hard dep of omarchy, so archinstall pacstraps limine-mkinitcpio-hook (via omarchy-limine's depends) early. That triggers a UKI build BEFORE limine-snapper.sh runs, which means the UKI is built with no kernel cmdline (the 'Kernel command line is not available' warning in the archinstall log). The system then can't unlock the LUKS root on boot because the encrypt hook has no cryptdevice= to act on, and drops to an emergency shell. The previous flow worked because 'pacman -S limine-mkinitcpio-hook' inside limine-snapper.sh installed the hook for the first time, firing its post-transaction UKI rebuild AFTER /etc/default/limine had been written. With it pre-installed, '--needed' makes that line a no-op. Fix: after writing /etc/default/limine, write the same cmdline to /etc/kernel/cmdline (the source mkinitcpio --uki reads) and explicitly run mkinitcpio -P to rebuild the UKIs with the correct cmdline.
This commit is contained in:
@@ -53,7 +53,19 @@ EOF
|
||||
# We overwrite the whole thing knowing the limine-update will add the entries for us
|
||||
sudo cp $OMARCHY_PATH/default/limine/limine.conf /boot/limine.conf
|
||||
|
||||
sudo pacman -S --noconfirm --needed limine-snapper-sync limine-mkinitcpio-hook
|
||||
# The UKI must embed the kernel cmdline (read by mkinitcpio --uki from
|
||||
# /etc/kernel/cmdline) so the early encrypt hook can find cryptdevice=...
|
||||
# to unlock /dev/mapper/root. archinstall doesn't write this file; the
|
||||
# initial UKI built when limine-mkinitcpio-hook was pulled in via
|
||||
# omarchy-limine's depends was built with an empty cmdline, dropping us
|
||||
# to the emergency shell on first boot.
|
||||
echo "$CMDLINE" | sudo tee /etc/kernel/cmdline >/dev/null
|
||||
|
||||
# Force a UKI rebuild now that /etc/default/limine and /etc/kernel/cmdline
|
||||
# exist. limine-snapper-sync and limine-mkinitcpio-hook are already
|
||||
# installed (via omarchy-limine's depends), so 'pacman -S --needed' here
|
||||
# is a no-op and won't re-trigger the post-transaction UKI rebuild.
|
||||
sudo mkinitcpio -P
|
||||
|
||||
# Only snapshot root — /home is user data; rolling it back loses user work
|
||||
if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then
|
||||
|
||||
Reference in New Issue
Block a user