dracut: fix checking for "Root filesystem" label, improve udev sync

Don't try to dereference "Root filesytem" partlabel symlink, unless it's
really present (not only directory for it).

Also, use udevadm settle for waiting for /dev/xvda, instead of naive
wait sleep loop.
pull/39/head
Marek Marczykowski-Górecki 5 years ago
parent 456fe99fa6
commit 5eb526da4b
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -53,12 +53,12 @@ fi
modprobe xenblk || modprobe xen-blkfront || warn "Qubes: Cannot load Xen Block Frontend..."
log_begin "Waiting for /dev/xvda* devices..."
while ! [ -e /dev/xvda ]; do sleep 0.1; done
udevadm settle --exit-if-exists=/dev/xvda
log_end
# prefer partition if exists
if [ -b /dev/xvda1 ]; then
if [ -d /dev/disk/by-partlabel ]; then
if [ -e "/dev/disk/by-partlabel/Root\\x20filesystem" ]; then
ROOT_DEV=$(basename $(readlink "/dev/disk/by-partlabel/Root\\x20filesystem"))
else
ROOT_DEV=xvda3

Loading…
Cancel
Save