From b2fe6d551dcb720dd2352510c7bca081cc88a5b0 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sat, 7 Oct 2023 05:47:24 +0200 Subject: [PATCH] Add gnutoo-trisquel-netinstall VM Signed-off-by: Denis 'GNUtoo' Carikli --- gnutoo-trisquel-netinstall/Makefile | 35 ++++++ gnutoo-trisquel-netinstall/README | 50 +++++++++ .../create-netinstall-volume.sh | 31 ++++++ gnutoo-trisquel-netinstall/create-vm.sh | 18 ++++ .../gnutoo-trisquel-netinstall.xml | 102 ++++++++++++++++++ gnutoo-trisquel-netinstall/use-serial-port.sh | 19 ++++ 6 files changed, 255 insertions(+) create mode 100644 gnutoo-trisquel-netinstall/Makefile create mode 100644 gnutoo-trisquel-netinstall/README create mode 100755 gnutoo-trisquel-netinstall/create-netinstall-volume.sh create mode 100755 gnutoo-trisquel-netinstall/create-vm.sh create mode 100644 gnutoo-trisquel-netinstall/gnutoo-trisquel-netinstall.xml create mode 100755 gnutoo-trisquel-netinstall/use-serial-port.sh diff --git a/gnutoo-trisquel-netinstall/Makefile b/gnutoo-trisquel-netinstall/Makefile new file mode 100644 index 0000000..a7c7e49 --- /dev/null +++ b/gnutoo-trisquel-netinstall/Makefile @@ -0,0 +1,35 @@ +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +CURL ?= curl +MIRROR ?= https://cdimage.trisquel.info/trisquel-images +# http://mirror.fsf.org/trisquel-images +VERSION ?= 11.0 + +.precious: \ + trisquel_$(VERSION)_amd64.iso \ + trisquel_$(VERSION)_amd64.iso.asc \ + trisquel-netinst_$(VERSION)_amd64.iso \ + trisquel-netinst_$(VERSION)_amd64.iso.asc + +.PHONY: all +all: \ + verify-trisquel_$(VERSION)_amd64 \ + verify-trisquel-netinst_$(VERSION)_amd64 \ + +trisquel-archive-signkey.gpg: + gpg --list-keys D24DDAC9226D5BA5E9F3BED3F5DAAAF74AD4C938 || \ + $(CURL) https://archive.trisquel.info/trisquel/$@ -o $@ + gpg --list-keys D24DDAC9226D5BA5E9F3BED3F5DAAAF74AD4C938 || \ + gpg --import trisquel-archive-signkey.gpg + +%.iso: + $(CURL) $(MIRROR)/$@ -o $@ + +%.asc: trisquel-archive-signkey.gpg % + $(CURL) $(MIRROR)/$@ -o $@ + +verify-%: %.iso.asc + gpg --verify $< diff --git a/gnutoo-trisquel-netinstall/README b/gnutoo-trisquel-netinstall/README new file mode 100644 index 0000000..24a514b --- /dev/null +++ b/gnutoo-trisquel-netinstall/README @@ -0,0 +1,50 @@ +Deployment +========== + +If you don't have the Trisquel netinstall iso inside libvirt you can +get it by first downloading it in the current directory with the +following command: + +``` +$ make +``` + +Then you can add it to libvirt with the following command: + +``` +$ ./create-netinstall-volume.sh +``` + +Then if the VM is not already defined in libvirt, you can use the +following command to do that: + +``` +$ ./create-vm.sh +``` + +You will then need to add an extra storage device to the VM to have +some storage to install Trisquel on. + +You can then start the installer and get a console inside it with the +following commands: + +``` +$ virsh -c qemu:///system start gnutoo-trisquel-netinstall +$ ./use-serial-port.sh +$ virsh -c qemu:///system console gnutoo-trisquel-netinstall +``` + +License +======= +This project is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This project is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this project. If not, see . diff --git a/gnutoo-trisquel-netinstall/create-netinstall-volume.sh b/gnutoo-trisquel-netinstall/create-netinstall-volume.sh new file mode 100755 index 0000000..55d5bb5 --- /dev/null +++ b/gnutoo-trisquel-netinstall/create-netinstall-volume.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (C) 2023 Denis 'GNUtoo' Carikli +# +# This project is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This project is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this project. If not, see . + +virsh -c qemu:///system \ + vol-create-as installation trisquel-netinst_11.0_amd64.isoc 0 + +virsh -c qemu:///system \ + vol-upload --pool installation trisquel-netinst_11.0_amd64.iso \ + --file $PWD/trisquel-netinst_11.0_amd64.iso + +virsh -c qemu:///system \ + vol-create-as installation trisquel-netinst_11.0_amd64.iso.asc 0 + +virsh -c qemu:///system \ + vol-upload --pool installation trisquel-netinst_11.0_amd64.iso.asc \ + --file $PWD/trisquel-netinst_11.0_amd64.iso.asc + diff --git a/gnutoo-trisquel-netinstall/create-vm.sh b/gnutoo-trisquel-netinstall/create-vm.sh new file mode 100755 index 0000000..3503998 --- /dev/null +++ b/gnutoo-trisquel-netinstall/create-vm.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Copyright (C) 2023 Denis 'GNUtoo' Carikli +# +# This project is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This project is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this project. If not, see . + +virsh -c qemu:///system define --file gnutoo-trisquel-netinstall.xml diff --git a/gnutoo-trisquel-netinstall/gnutoo-trisquel-netinstall.xml b/gnutoo-trisquel-netinstall/gnutoo-trisquel-netinstall.xml new file mode 100644 index 0000000..a590f43 --- /dev/null +++ b/gnutoo-trisquel-netinstall/gnutoo-trisquel-netinstall.xml @@ -0,0 +1,102 @@ + + gnutoo-trisquel-netinstall + 2097152 + 2097152 + + /machine + + + hvm + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/qemu-system-x86_64 + + + + + +
+ + +
+ + + +
+ + + +
+ + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +