From 9cfa9a92afee22e5949d115cb3255de52fd60905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 25 Feb 2019 04:16:47 +0100 Subject: [PATCH] Include default-kernelopts-common.txt with kernel-specific default options Default kernel options like root= or plymouth.enable are specific to the kernel package (and initrd bundled with it). Start migrating away from built-in defaults in core-admin by adding a file in kernel package containing those options. Also, if new enough initramfs is included, add xen_scrub_pages=0 which will speed up the domain start. QubesOS/qubes-issues#4839 QubesOS/qubes-issues#4736 --- kernel.spec.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kernel.spec.in b/kernel.spec.in index 50e0b77..647b6f7 100644 --- a/kernel.spec.in +++ b/kernel.spec.in @@ -383,6 +383,16 @@ fi cp -p arch/x86/boot/bzImage %buildroot/%vm_install_dir/vmlinuz +# default kernel options for this kernel +def_kernelopts="root=/dev/mapper/dmroot ro nomodeset console=hvc0" +def_kernelopts="$def_kernelopts rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0" +if [ -e /usr/lib/dracut/modules.d/90qubes-vm-simple/xen-scrub-pages-supported ]; then + # set xen_scrub_pages=0 _only_ when included initramfs does support + # re-enabling it + def_kernelopts="$def_kernelopts xen_scrub_pages=0" +fi +echo "$def_kernelopts " > %buildroot/%vm_install_dir/default-kernelopts-common.txt + # Modules for Qubes VM mkdir -p %buildroot%vm_install_dir/modules cp -a %buildroot/lib/modules/%kernelrelease %buildroot%vm_install_dir/modules/ @@ -531,6 +541,7 @@ exit 0 %attr(0644, root, root) %vm_install_dir/modules.img %attr(0644, root, root) %vm_install_dir/initramfs %attr(0644, root, root) %vm_install_dir/vmlinuz +%attr(0644, root, root) %vm_install_dir/default-kernelopts-common.txt %changelog @CHANGELOG@