Rebuild initramfs on package upgrade (already done for Debian
previously) and store 1 into /var/lib/qubes/initramfs-updated. Then,
only add xen_scrub_pages=0 kernel option if
/var/lib/qubes/initramfs-updated is there (with "1" or greater number).
This way, if initramfs rebuild doesn't happen for any reason,
xen_scrub_pages=0 will not be added.
Fixes 456fe99
"Disable scrubbing memory pages during initial balloon down"
QubesOS/qubes-issues#1963
mm_7d9fe8e3
parent
b234b84bc5
commit
7d9fe8e39f
@ -1,5 +1,8 @@
|
||||
# add kernel options only in VM
|
||||
if [ -r /usr/share/qubes/marker-vm ]; then
|
||||
# add kernel options only in VM, and only if initramfs is updated already
|
||||
# /var/lib/qubes/initramfs-updated contains "milestone" initramfs update version:
|
||||
# 1 - addition of xen scrub_pages enabling code
|
||||
if [ -r /usr/share/qubes/marker-vm ] &&
|
||||
[ "$(cat /var/lib/qubes/initramfs-updated 2>/dev/null || echo 0)" -ge 1 ]; then
|
||||
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX xen_scrub_pages=0"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in new issue