diff --git a/README.md b/README.md index f1db3c1..6517b9b 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ The fallback initramfs (`/boot/initramfs-linux-fallback.img`) and fallback command line file (`/etc/snap-pac-uki/kernel-cmd-fallback`) are only required on the current system. +Also the current command line file (`/etc/snap-pac-uki/kernel-cmd-current`) +needs is only required on the current system. + EFI boot options are only created for each snapshot. If you want the UKIs created for the current system, you'll need to add boot entries yourself: diff --git a/src/snap-pac-uki.fish b/src/snap-pac-uki.fish index 273aea6..437719c 100755 --- a/src/snap-pac-uki.fish +++ b/src/snap-pac-uki.fish @@ -53,6 +53,7 @@ function create_uki -d "creates a new uki" -a variant id switch $variant case "rolling" set bd "$CFG_BUILD_DIR/current" + set current "-current" case "fallback" set bd "$CFG_BUILD_DIR/current" set fallback "-fallback" @@ -80,7 +81,7 @@ function create_uki -d "creates a new uki" -a variant id # create uki objcopy \ --add-section .osrel="$bd/os-release$fallback" --change-section-vma .osrel=0x20000 \ - --add-section .cmdline="$bd/kernel-cmd$fallback" --change-section-vma .cmdline=0x30000 \ + --add-section .cmdline="$bd/kernel-cmd$current$fallback" --change-section-vma .cmdline=0x30000 \ --add-section .splash="$prefix/usr/share/systemd/bootctl/splash-arch.bmp" --change-section-vma .splash=0x40000 \ --add-section .linux="$prefix/boot/vmlinuz-linux" --change-section-vma .linux=0x2000000 \ --add-section .initrd="$initrd" --change-section-vma .initrd=0x3000000 \ @@ -129,7 +130,7 @@ function create_current_uki -d "creates an uki for the current system" # create default cp "/usr/lib/os-release" "$bd/os-release" - sed "s/SNAPSHOT/$CFG_DEFAULT_SUBVOL/" <"/etc/snap-pac-uki/kernel-cmd" >"$bd/kernel-cmd" + sed "s/SNAPSHOT/$CFG_DEFAULT_SUBVOL/" <"/etc/snap-pac-uki/kernel-cmd-current" >"$bd/kernel-cmd-current" create_uki rolling # create fallbac