So that would mean that these entries would NOT appear if I did not additionally install the LTS kernel? Hm …, possibilities?
It’s strange that no one else has noticed this, since almost everyone has installed a 2nd kernel.
[Trigger]
Type = Path
Operation = Install
Operation = Upgrade
Target = usr/lib/modules/*/vmlinuz
Target = usr/lib/initcpio/*
[Action]
Description = Updating linux initcpios...
When = PostTransaction
Exec = /usr/share/libalpm/scripts/mkinitcpio-install
NeedsTargets
mkinitcpio-install
#!/bin/bash -e
args=()
all=0
while read -r line; do
if [[ $line != */vmlinuz ]]; then
# triggers when it's a change to usr/lib/initcpio/*
all=1
continue
fi
if ! read -r pkgbase > /dev/null 2>&1 < "${line%/vmlinuz}/pkgbase"; then
# if the kernel has no pkgbase, we skip it
continue
fi
preset="/etc/mkinitcpio.d/${pkgbase}.preset"
if [[ ! -e $preset ]]; then
if [[ -e $preset.pacsave ]]; then
# move the pacsave to the template
mv "${preset}.pacsave" "$preset"
else
# create the preset from the template
sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset \
| install -Dm644 /dev/stdin "$preset"
fi
fi
# always install the kernel
install -Dm644 "${line}" "/boot/vmlinuz-${pkgbase}"
# compound args for each kernel
args+=(-p "${pkgbase}")
done
if (( all )) && compgen -G /etc/mkinitcpio.d/"*.preset" > /dev/null; then
# change to use all presets
args=(-P)
fi
if (( ${#args[@]} )); then
mkinitcpio "${args[@]}"
fi
Because then I would have the problem again that this would not be storable with BTRFS. You said GRUB_DEFAULT=1 works without saving. Sorry if I get things mixed up again.