initramfs: move qubes_cow_setup hook to pre-trigger

This hook require new device nodes to appear in /dev. If devtmpfs is
used, it's not a problem ("simple" initramfs case), but otherwise udevd
is needed - and it isn't running in pre-udev hook yet.

QubesOS/qubes-issues#2577

(cherry picked from commit 5c7c54adab)
This commit is contained in:
Marek Marczykowski-Górecki 2017-01-14 16:09:40 +01:00
parent ea0c714139
commit 5428ce06ee
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 2 additions and 3 deletions

View File

@ -14,7 +14,7 @@ depends() {
} }
install() { install() {
inst_hook pre-udev 90 $moddir/qubes_cow_setup.sh inst_hook pre-trigger 90 $moddir/qubes_cow_setup.sh
inst_multiple \ inst_multiple \
sfdisk \ sfdisk \
mkswap mkswap

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# This file should be placed in pre-mount directory in dracut's initramfs, or # This file should be placed in pre-trigger directory in dracut's initramfs, or
# scripts/local-top in case of initramfs-tools # scripts/local-top in case of initramfs-tools
# #

View File

@ -83,7 +83,6 @@ if ! [ -d "$NEWROOT/lib/modules/$kver/kernel" ]; then
rmdir /tmp/modules rmdir /tmp/modules
fi fi
umount /dev /sys /proc umount /dev /sys /proc
exec switch_root $NEWROOT /sbin/init exec switch_root $NEWROOT /sbin/init