-# we don't need any drivers (which take up most of the space).
-# (We need to keep kernel/net/sunrpc for NFS)
-rm -rf initramfs/lib/modules/*/kernel/{drivers,sound}
-rm -rf initramfs/lib/modules/*/kernel/arch/x86/kvm
+# we don't need many drivers (which take up most of the space).
+(cd initramfs && find lib/modules/*/kernel \
+ -name '*.ko' \
+ -a ! -name 'virtio.ko' \
+ -a ! -name 'virtio_net.ko' \
+ -a ! -name 'virtio_pci.ko' \
+ -a ! -name 'virtio_ring.ko' \
+ -a ! -name 'ext2.ko' \
+ -a ! -name 'ext4.ko' \
+ -a ! -name 'crc16.ko' \
+ -a ! -name 'jbd2.ko' \
+ -a ! -name 'fuse.ko' \
+ -a ! -name 'vfat.ko' \
+ -a ! -name 'fat.ko' \
+ -a ! -name 'udf.ko' \
+ -a ! -name 'crc_itu_t.ko' \
+ -a ! -name 'nls_utf8.ko' \
+ -a ! -name 'dm-*.ko' \
+ -a -print0 ) |
+ xargs -0 @FEBOOTSTRAP_RUN@ initramfs -- rm