Use proper dracut module and conf files...
... instead of the ugly and incompatible /usr/share/qubes/regenerate_initramfs.sh script
This commit is contained in:
parent
11da1633d3
commit
16a46f9a9c
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
KERNEL_VER=$1
|
|
||||||
if [ -z "$KERNEL_VER" ]; then
|
|
||||||
KERNEL_VER=`uname -r`
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Find all network devices
|
|
||||||
HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'`
|
|
||||||
|
|
||||||
echo "# This file is autogenerated by kernel post-install script" > /etc/modprobe.d/pciback.conf
|
|
||||||
echo "# DO NOT EDIT" >> /etc/modprobe.d/pciback.conf
|
|
||||||
echo "" >> /etc/modprobe.d/pciback.conf
|
|
||||||
echo "options pciback hide=$HIDE_PCI" >> /etc/modprobe.d/pciback.conf
|
|
||||||
|
|
||||||
dracut --force --add-drivers 'xts aesni-intel aes-x86_64 crc32c-intel fpu ghash-clmulni-intel salsa20-x86_64 twofish-x86_64 pciback' \
|
|
||||||
/boot/initramfs-$KERNEL_VER.img $KERNEL_VER
|
|
@ -0,0 +1,4 @@
|
|||||||
|
# Apprently some of the drivers required when using a processor with AESNI for LUKS
|
||||||
|
# are missing in the initramfs, so lets include them manually here:
|
||||||
|
|
||||||
|
add_drivers="xts aesni-intel aes-x86_64 crc32c-intel fpu ghash-clmulni-intel salsa20-x86_64 twofish-x86_64"
|
5
dom0/dracut/dracut.conf.d/qubes-pciback.conf
Normal file
5
dom0/dracut/dracut.conf.d/qubes-pciback.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# This is to include Qubes-specific dracut module that takes care of
|
||||||
|
# detecting and hiding all networking devices at boot time
|
||||||
|
# so that Dom0 doesn't load drivers for them...
|
||||||
|
|
||||||
|
add_dracutmodules="qubes-pciback"
|
5
dom0/dracut/modules.d/90qubes-pciback/install
Executable file
5
dom0/dracut/modules.d/90qubes-pciback/install
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
inst_hook cmdline 02 "$moddir/qubes-pciback.sh"
|
||||||
|
inst lspci
|
||||||
|
inst grep
|
||||||
|
inst awk
|
2
dom0/dracut/modules.d/90qubes-pciback/installkernel
Executable file
2
dom0/dracut/modules.d/90qubes-pciback/installkernel
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
instmods pciback
|
8
dom0/dracut/modules.d/90qubes-pciback/qubes-pciback.sh
Executable file
8
dom0/dracut/modules.d/90qubes-pciback/qubes-pciback.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Find all networking devices currenly installed...
|
||||||
|
HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'`
|
||||||
|
|
||||||
|
# ... and hide them so that Dom0 doesn't load drivers for them
|
||||||
|
modprobe pciback hide=$HIDE_PCI
|
||||||
|
|
@ -92,7 +92,6 @@ cp aux-tools/convert_dirtemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
|||||||
cp aux-tools/create_apps_for_appvm.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
cp aux-tools/create_apps_for_appvm.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
cp aux-tools/remove_appvm_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
cp aux-tools/remove_appvm_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
cp aux-tools/reset_vm_configs.py $RPM_BUILD_ROOT/usr/lib/qubes
|
cp aux-tools/reset_vm_configs.py $RPM_BUILD_ROOT/usr/lib/qubes
|
||||||
cp aux-tools/regenerate_initramfs.sh $RPM_BUILD_ROOT/usr/lib/qubes
|
|
||||||
cp aux-tools/sync_rpmdb_updatevm.sh $RPM_BUILD_ROOT/usr/lib/qubes/
|
cp aux-tools/sync_rpmdb_updatevm.sh $RPM_BUILD_ROOT/usr/lib/qubes/
|
||||||
cp qmemman/server.py $RPM_BUILD_ROOT/usr/lib/qubes/qmemman_daemon.py
|
cp qmemman/server.py $RPM_BUILD_ROOT/usr/lib/qubes/qmemman_daemon.py
|
||||||
cp ../common/meminfo-writer $RPM_BUILD_ROOT/usr/lib/qubes/
|
cp ../common/meminfo-writer $RPM_BUILD_ROOT/usr/lib/qubes/
|
||||||
@ -175,6 +174,12 @@ install -d $RPM_BUILD_ROOT/etc/xdg/autostart
|
|||||||
install -m 0644 qubes-guid.desktop $RPM_BUILD_ROOT/etc/xdg/autostart/
|
install -m 0644 qubes-guid.desktop $RPM_BUILD_ROOT/etc/xdg/autostart/
|
||||||
install -m 0644 qubes-update-watch.desktop $RPM_BUILD_ROOT/etc/xdg/autostart/
|
install -m 0644 qubes-update-watch.desktop $RPM_BUILD_ROOT/etc/xdg/autostart/
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/dracut.conf.d
|
||||||
|
cp dracut/dracut.conf.d/* $RPM_BUILD_ROOT/etc/dracut.conf.d/
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/usr/share/dracut/modules.d
|
||||||
|
cp -r dracut/modules.d/* $RPM_BUILD_ROOT/usr/share/dracut/modules.d/
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
# Create NetworkManager configuration if we do not have it
|
# Create NetworkManager configuration if we do not have it
|
||||||
@ -305,7 +310,6 @@ fi
|
|||||||
/usr/lib/qubes/qmemman_daemon.py*
|
/usr/lib/qubes/qmemman_daemon.py*
|
||||||
/usr/lib/qubes/meminfo-writer
|
/usr/lib/qubes/meminfo-writer
|
||||||
/usr/lib/qubes/qfile-daemon-dvm*
|
/usr/lib/qubes/qfile-daemon-dvm*
|
||||||
/usr/lib/qubes/regenerate_initramfs.sh
|
|
||||||
/usr/lib/qubes/sync_rpmdb_updatevm.sh
|
/usr/lib/qubes/sync_rpmdb_updatevm.sh
|
||||||
/usr/lib/qubes/qubes-receive-updates
|
/usr/lib/qubes/qubes-receive-updates
|
||||||
%attr(4750,root,qubes) /usr/lib/qubes/qfile-dom0-unpacker
|
%attr(4750,root,qubes) /usr/lib/qubes/qfile-dom0-unpacker
|
||||||
@ -363,3 +367,6 @@ fi
|
|||||||
/etc/xdg/autostart/qubes-update-watch.desktop
|
/etc/xdg/autostart/qubes-update-watch.desktop
|
||||||
/etc/security/limits.d/99-qubes.conf
|
/etc/security/limits.d/99-qubes.conf
|
||||||
/etc/yum/post-actions/qubes_sync_rpmdb_updatevm.action
|
/etc/yum/post-actions/qubes_sync_rpmdb_updatevm.action
|
||||||
|
%dir /etc/dracut.conf.d/*
|
||||||
|
%dir /usr/share/dracut/modules.d/
|
||||||
|
%dir /usr/share/dracut/modules.d/90qubes-pciback/*
|
||||||
|
Loading…
Reference in New Issue
Block a user