dracut: add dmsetup --noudevsync since we're running in pre-udev hook

When udev is installed (and scheduled to be started), but not running
yet, plain dmsetup will deadlock on waiting for udev. Since we call
`dmsetup mknodes dmroot` anyway

QubesOS/qubes-issues#1354
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-09 00:44:24 +01:00
parent aaf84ba305
commit 25c05a3bd3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -37,12 +37,12 @@ EOF
while ! [ -e /dev/xvdc2 ]; do sleep 0.1; done while ! [ -e /dev/xvdc2 ]; do sleep 0.1; done
echo "0 `cat /sys/block/xvda/size` snapshot /dev/xvda /dev/xvdc2 N 16" | \ echo "0 `cat /sys/block/xvda/size` snapshot /dev/xvda /dev/xvdc2 N 16" | \
dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; } dmsetup --noudevsync create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; }
echo Qubes: done. echo Qubes: done.
else else
echo "Qubes: Doing R/W setup for TemplateVM..." echo "Qubes: Doing R/W setup for TemplateVM..."
echo "0 `cat /sys/block/xvda/size` linear /dev/xvda 0" | \ echo "0 `cat /sys/block/xvda/size` linear /dev/xvda 0" | \
dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; exit 1; } dmsetup --noudevsync create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; exit 1; }
echo Qubes: done. echo Qubes: done.
fi fi
dmsetup mknodes dmroot dmsetup mknodes dmroot