diff --git a/guix-vm-installer.xml b/guix-vm-installer.xml index 4d6110d..7c0b74f 100644 --- a/guix-vm-installer.xml +++ b/guix-vm-installer.xml @@ -1,7 +1,7 @@ guix-vm-installer - 16777216 - 16777216 + 4194304 + 4194304 /machine diff --git a/mumble-vm-install.sh b/mumble-vm-install.sh index fcb274d..921c792 100755 --- a/mumble-vm-install.sh +++ b/mumble-vm-install.sh @@ -207,15 +207,30 @@ guix shell -C --nesting autoconf automake bash coreutils grep sed -- \ guix shell -C --nesting bash coreutils gawk grep sed -- \ ./configure ; report "./configure" -# TODO: use guix init or temporary storage instead to reduce the -# memory consumption. Right now we tested this script with 16GiB of -# RAM which is probably too big for many potential users. Requiring -# 4GiB would be more reasonable. -guix shell -C --nesting automake coreutils gawk grep make sed -- \ - make ; report "make" +guix shell -C --nesting automake coreutils gawk grep make sed tar xz -- \ + make mumble-vm.tar.xz ; report "Generating VM definition" -guix shell -C ddrescue -- ddrescue mumble-vm.img /dev/vda && sync ; \ - report "ddrescue mumble-vm.img /dev/vda" +cp mumble-vm.tar.xz ../ && \ + cd ../ && \ + rm -rf mumble-vm && \ + guix shell -C tar xz -- tar xf mumble-vm.tar.xz && \ + rm -f mumble-vm.tar.xz ; report "Removing git repository" + +guix gc ; report "guix gc" + +echo 'label: gpt' | sfdisk /dev/vda ; report "GPT creation on /dev/vda" ; \ + report "GPT formating" + +echo ';;L;*' | sfdisk /dev/vda ; report "/dev/vda1 creation" ; \ + report "Adding partition" + +mkfs.ext4 -F -L Guix_image /dev/vda1 ; report "EXT4 formating" + +mount /dev/vda1 /mnt ; report "mount /dev/vda1 /mnt" ; report "mounting rootfs" + +herd start cow-store /mnt ; report "Using /mnt for storing guix system init packages" +guix system init mumble-vm-system.scm /mnt ; report "guix system init" +umount /mnt ; report "umount rootfs" printf "Installation done: %s\n" \ "you can remove the install media and reboot to the new VM"