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
This commit is contained in:
Marek Marczykowski-Górecki 2017-01-14 16:09:40 +01:00
parent 69a3f06f99
commit 5c7c54adab
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() {
inst_hook pre-udev 90 $moddir/qubes_cow_setup.sh
inst_hook pre-trigger 90 $moddir/qubes_cow_setup.sh
inst_multiple \
sfdisk \
mkswap

View File

@ -1,6 +1,6 @@
#!/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
#

View File

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