From 9efc9e3bd70d4c38c76c4a2922959b40c80521f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 26 Jun 2023 16:22:07 +0200 Subject: [PATCH] debian: reduce initramfs size Build initramfs with only required modules, not all of them. Otherwise it's too big to boot with default 400M. Additionally disable looking for suspend-to-disk signature, this feature is never used on Qubes VM (swap device is not persistent). Fixes QubesOS/qubes-issues#8277 --- debian/qubes-kernel-vm-support.install | 1 + initramfs-tools/Makefile | 2 ++ initramfs-tools/qubes.conf | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 initramfs-tools/qubes.conf diff --git a/debian/qubes-kernel-vm-support.install b/debian/qubes-kernel-vm-support.install index f64243f2..120e3ea5 100644 --- a/debian/qubes-kernel-vm-support.install +++ b/debian/qubes-kernel-vm-support.install @@ -1,3 +1,4 @@ +usr/share/initramfs-tools/conf.d/qubes.conf usr/share/initramfs-tools/scripts/local-top/scrub_pages usr/share/initramfs-tools/scripts/local-top/qubes_cow_setup usr/share/initramfs-tools/hooks/qubes_vm diff --git a/initramfs-tools/Makefile b/initramfs-tools/Makefile index 65f2004f..a57cf17d 100644 --- a/initramfs-tools/Makefile +++ b/initramfs-tools/Makefile @@ -5,4 +5,6 @@ install: $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/scrub_pages install -D qubes_vm \ $(DESTDIR)/usr/share/initramfs-tools/hooks/qubes_vm + install -m 0644 -D qubes.conf \ + $(DESTDIR)/usr/share/initramfs-tools/conf.d/qubes.conf diff --git a/initramfs-tools/qubes.conf b/initramfs-tools/qubes.conf new file mode 100644 index 00000000..5d1d0cab --- /dev/null +++ b/initramfs-tools/qubes.conf @@ -0,0 +1,4 @@ +# reduce initramfs size +MODULES=dep +# there is no suspend-to-disk for VMs +RESUME=none