diff --git a/build-host.sh b/build-host.sh index 9a3dfa0b62e5f3a662a7afd5cc8e2ea976cd2901..a13c22d3a6988625e1663315f4ccb1884ea4a8ca 100755 --- a/build-host.sh +++ b/build-host.sh @@ -54,7 +54,7 @@ function start_qemu() { { qemu-system-x86_64 \ -machine accel=kvm:tcg \ -smp 4 \ - -m 768 \ + -m 1024 \ -net nic \ -net user \ -kernel vmlinuz-linux \ diff --git a/build-inside-vm.sh b/build-inside-vm.sh index f741237659ad6c19e753597a31acdddc6f5bcc18..8fe6be65676d3574d608590e8755420f8dd956b6 100755 --- a/build-inside-vm.sh +++ b/build-inside-vm.sh @@ -83,6 +83,17 @@ function image_cleanup() { # Remove pacman key ring for re-initialization rm -rf "${MOUNT}/etc/pacman.d/gnupg/" + # The mkinitcpio autodetect hook removes modules not needed by the + # running system from the initramfs. This make the image non-bootable + # on some systems as initramfs lacks the relevant kernel modules. + # Ex: Some systems need the virtio-scsi kernel module and not the + # "autodetected" virtio-blk kernel module for disk access. + # + # So for the initial install we use the fallback initramfs, and + # "autodetect" should add the relevant modules to the initramfs when + # the user updates the kernel. + cp -a "${MOUNT}/boot/"{initramfs-linux-fallback.img,initramfs-linux.img} + sync -f "${MOUNT}/etc/os-release" fstrim --verbose "${MOUNT}" }