dracut: split 'full' dracut module into 'full-dmroot' and 'full-modules'
When PV Grub will be used, VM initramfs should not contain /lib/modules mounting code, as the VM root.img will already contains kernel modules. Make it possible by splitting the module. QubesOS/qubes-issues#1354
This commit is contained in:
parent
d1238ce060
commit
882052eca0
@ -1,3 +1,4 @@
|
|||||||
install:
|
install:
|
||||||
$(MAKE) -C simple
|
$(MAKE) -C simple
|
||||||
$(MAKE) -C full
|
$(MAKE) -C full-dmroot
|
||||||
|
$(MAKE) -C full-modules
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
install:
|
install:
|
||||||
install -d $(DESTDIR)/usr/lib/dracut/modules.d/90qubes-vm
|
install -d $(DESTDIR)/usr/lib/dracut/modules.d/90qubes-vm
|
||||||
install module-setup.sh mount_modules.sh qubes_cow_setup.sh \
|
install module-setup.sh qubes_cow_setup.sh \
|
||||||
$(DESTDIR)/usr/lib/dracut/modules.d/90qubes-vm/
|
$(DESTDIR)/usr/lib/dracut/modules.d/90qubes-vm/
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
if xenstore-read qubes-vm-type &>/dev/null; then
|
if xenstore-read qubes-vm-type &>/dev/null || qubesdb-read qubes-vm-type &>/dev/null; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 255
|
return 255
|
||||||
@ -10,7 +10,6 @@ check() {
|
|||||||
|
|
||||||
install() {
|
install() {
|
||||||
inst_hook pre-udev 90 $moddir/qubes_cow_setup.sh
|
inst_hook pre-udev 90 $moddir/qubes_cow_setup.sh
|
||||||
inst_hook pre-pivot 50 $moddir/mount_modules.sh
|
|
||||||
inst_multiple \
|
inst_multiple \
|
||||||
sfdisk \
|
sfdisk \
|
||||||
mkswap
|
mkswap
|
@ -1,8 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# This file should be places in pre-mount directory in dracut's initramfs
|
# This file should be places in pre-mount directory in dracut's initramfs
|
||||||
#
|
#
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
echo "Qubes initramfs script here:"
|
echo "Qubes initramfs script here:"
|
||||||
|
|
||||||
if [ -e /dev/mapper/dmroot ] ; then
|
if [ -e /dev/mapper/dmroot ] ; then
|
4
dracut/full-modules/Makefile
Normal file
4
dracut/full-modules/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
install:
|
||||||
|
install -d $(DESTDIR)/usr/lib/dracut/modules.d/90qubes-vm-modules
|
||||||
|
install module-setup.sh mount_modules.sh \
|
||||||
|
$(DESTDIR)/usr/lib/dracut/modules.d/90qubes-vm-modules/
|
9
dracut/full-modules/module-setup.sh
Normal file
9
dracut/full-modules/module-setup.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
check() {
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
inst_hook pre-pivot 50 $moddir/mount_modules.sh
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# This file should be places in pre-pivot directory in dracut's initramfs
|
# This file should be places in pre-pivot directory in dracut's initramfs
|
||||||
#
|
#
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if ! [ -d $NEWROOT/lib/modules/`uname -r` ]; then
|
if ! [ -d $NEWROOT/lib/modules/`uname -r` ]; then
|
||||||
echo "Waiting for /dev/xvdd device..."
|
echo "Waiting for /dev/xvdd device..."
|
@ -61,6 +61,7 @@ make install-kernel-support DESTDIR=%{buildroot}
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
/usr/lib/dracut/modules.d/90qubes-vm
|
/usr/lib/dracut/modules.d/90qubes-vm
|
||||||
|
/usr/lib/dracut/modules.d/90qubes-vm-modules
|
||||||
/usr/lib/dracut/modules.d/90qubes-vm-simple
|
/usr/lib/dracut/modules.d/90qubes-vm-simple
|
||||||
/usr/src/u2mfn-%{version}/
|
/usr/src/u2mfn-%{version}/
|
||||||
/usr/sbin/qubes-prepare-vm-kernel
|
/usr/sbin/qubes-prepare-vm-kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user