Skip to content

Commit d1af3f7

Browse files
committed
Fix the order of mkinitcpio hooks
As documented on ArchWiki [1], the `lvm2` hook must appear after the `block` and before the `filesystems` hook. Otherwise, LVM might attempt to activate logical volumes before the underlying block devices are available. [1]: https://wiki.archlinux.org/title/Install_Arch_Linux_on_LVM#Adding_mkinitcpio_hooks
1 parent 0cb0708 commit d1af3f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

archlinux/PKGBUILD-qubes-vm-kernel-support.install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $end"
2222
if [[ ! -s /etc/default/grub ]]; then
2323
echo >> /etc/default/grub
2424
fi
25-
sed -Ei 's/^(HOOKS=[("])base/\1lvm2 qubes base/' /etc/mkinitcpio.conf
25+
sed -Ei '/^HOOKS=/ s/(block)/\1 lvm2 qubes/' /etc/mkinitcpio.conf
2626
echo 'Adding qubes required hooks to /etc/default/grub'
2727
sed -Ei "/^$begin\$/,/^$end\$/{
2828
\$c$combined
@@ -41,7 +41,7 @@ post_upgrade () {
4141
post_remove () {
4242
local begin='### BEGIN QUBES HOOKS ###' end='### END QUBES HOOKS ###'
4343
echo 'Removing qubes required hooks from mkinitcpio.conf'
44-
sed -Ei 's/^(HOOKS=[("])lvm2 qubes base/\1base/' /etc/mkinitcpio.conf
44+
sed -Ei '/^HOOKS=/ s/(block) lvm2 qubes/\1/' /etc/mkinitcpio.conf
4545
echo 'Removing qubes required hooks from /etc/default/grub'
4646
sed -Ei "/^$begin\$/,/^$end\$/d" /etc/default/grub
4747
grub-mkconfig -o /boot/grub/grub.cfg

0 commit comments

Comments
 (0)