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
This commit is contained in:
parent
3cd77e4f70
commit
64331d7e09
@ -41,6 +41,11 @@ fi
|
|||||||
|
|
||||||
info "Qubes initramfs script here:"
|
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
|
if [ -e /dev/mapper/dmroot ] ; then
|
||||||
die "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
|
die "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user