Skip to content

Commit

Permalink
Include default-kernelopts-common.txt with kernel-specific default op…
Browse files Browse the repository at this point in the history
…tions

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
  • Loading branch information
marmarek committed Feb 27, 2019
1 parent 43235dd commit 9cfa9a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kernel.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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@

0 comments on commit 9cfa9a9

Please sign in to comment.