mumble-vm-install.sh: switch to guix system init
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
65f67ada92
commit
f858429ad4
|
@ -1,7 +1,7 @@
|
||||||
<domain type="kvm">
|
<domain type="kvm">
|
||||||
<name>guix-vm-installer</name>
|
<name>guix-vm-installer</name>
|
||||||
<memory unit="KiB">16777216</memory>
|
<memory unit="KiB">4194304</memory>
|
||||||
<currentMemory unit="KiB">16777216</currentMemory>
|
<currentMemory unit="KiB">4194304</currentMemory>
|
||||||
<resource>
|
<resource>
|
||||||
<partition>/machine</partition>
|
<partition>/machine</partition>
|
||||||
</resource>
|
</resource>
|
||||||
|
|
|
@ -207,15 +207,30 @@ guix shell -C --nesting autoconf automake bash coreutils grep sed -- \
|
||||||
guix shell -C --nesting bash coreutils gawk grep sed -- \
|
guix shell -C --nesting bash coreutils gawk grep sed -- \
|
||||||
./configure ; report "./configure"
|
./configure ; report "./configure"
|
||||||
|
|
||||||
# TODO: use guix init or temporary storage instead to reduce the
|
guix shell -C --nesting automake coreutils gawk grep make sed tar xz -- \
|
||||||
# memory consumption. Right now we tested this script with 16GiB of
|
make mumble-vm.tar.xz ; report "Generating VM definition"
|
||||||
# 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 ddrescue -- ddrescue mumble-vm.img /dev/vda && sync ; \
|
cp mumble-vm.tar.xz ../ && \
|
||||||
report "ddrescue mumble-vm.img /dev/vda"
|
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" \
|
printf "Installation done: %s\n" \
|
||||||
"you can remove the install media and reboot to the new VM"
|
"you can remove the install media and reboot to the new VM"
|
||||||
|
|
Loading…
Reference in New Issue