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.
This commit is contained in:
parent
456fe99fa6
commit
5eb526da4b
@ -53,12 +53,12 @@ fi
|
|||||||
modprobe xenblk || modprobe xen-blkfront || warn "Qubes: Cannot load Xen Block Frontend..."
|
modprobe xenblk || modprobe xen-blkfront || warn "Qubes: Cannot load Xen Block Frontend..."
|
||||||
|
|
||||||
log_begin "Waiting for /dev/xvda* devices..."
|
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
|
log_end
|
||||||
|
|
||||||
# prefer partition if exists
|
# prefer partition if exists
|
||||||
if [ -b /dev/xvda1 ]; then
|
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"))
|
ROOT_DEV=$(basename $(readlink "/dev/disk/by-partlabel/Root\\x20filesystem"))
|
||||||
else
|
else
|
||||||
ROOT_DEV=xvda3
|
ROOT_DEV=xvda3
|
||||||
|
Loading…
Reference in New Issue
Block a user