trisquel-automatic-netinstall-qemu: Reduce storage usage.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-07-06 03:04:46 +02:00
parent 37201a9361
commit b9abe6c2b3
Signed by: GNUtoo
GPG Key ID: 5F5DFCC14177E263
2 changed files with 13 additions and 1 deletions

View File

@ -61,7 +61,7 @@ preseed.img: Makefile preseed.cfg
mv $@.tmp $@
rootfs.img.tmp: Makefile
qemu-img create -f qcow2 $@ 10G
qemu-img create -f qcow2 $@ $(TRISQUEL_ROOTFS_SIZE)
# The 790M were found by trial and error. At 789M the netinstall
# complains about "low memory".

View File

@ -22,6 +22,7 @@ AC_PROG_MKDIR_P
AM_INIT_AUTOMAKE([foreign])
AC_SUBST([ENABLE_KVM], [])
AC_SUBST([TRISQUEL_ROOTFS_SIZE], [])
AC_SUBST([TRISQUEL_NETINSTALL], [])
AC_ARG_ENABLE(kvm,
@ -32,6 +33,16 @@ AC_ARG_ENABLE(kvm,
AM_CONDITIONAL( [WANT_KVM], [test x"$kvm" = x"yes"])
AC_ARG_WITH(
[--with-trisquel-target-rootfs-size],
[AS_HELP_STRING(
[--trisquel-target-rootfs-size=SIZE],
[Size of the target image (default=3.5G). The size will be passed
as-is to the 'qemu-img create' command. See 'man 1 qemu-img' for
more details.])],
[TRISQUEL_ROOTFS_SIZE=$withval],
[TRISQUEL_ROOTFS_SIZE=3.5G]) dnl 3.4G: Fail, 3.5G: OK
AC_ARG_WITH(
[trisquel-netinstall],
[AS_HELP_STRING(
@ -118,3 +129,4 @@ AS_IF([test x"$kvm" = x"yes"],
[echo "- Kvm: enabled"],
[echo "- Kvm: disabled"])
echo "- Trisquel netinstall path: $TRISQUEL_NETINSTALL"
echo "- Trisquel target rootfs size: $TRISQUEL_ROOTFS_SIZE"