dracut: add a safety check preventing qubes_cow_setup.sh running in dom0

Theoretically it shouldn't be a problem, because module isn't installed
in initramfs by default (in dom0), but since such error would be fatal
to dom0 (will prevent it from booting), add a safety check for it.

Probably it will be required when (if) we migrate dom0 to Debian
pull/1/head
Marek Marczykowski-Górecki 9 years ago
parent 3cd77e4f70
commit 64331d7e09
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -41,6 +41,11 @@ fi
info "Qubes initramfs script here:"
if ! grep -q 'root=[^ ]*dmroot' /proc/cmdline; then
warn "dmroot not requested, probably not a Qubes VM"
exit 0
fi
if [ -e /dev/mapper/dmroot ] ; then
die "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
fi

Loading…
Cancel
Save