summaryrefslogtreecommitdiff
path: root/client-build/02-setup-system.sh
blob: 709333b7705fa5792b6abc8af23e97959e94aa12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Run QEMU with the installer.iso image (created via make-iso.sh) to
# create a system image "talerwoo.img".
#

TARGET=wooclient.img

if [ -f $TARGET ]
then
	echo "Confirm removal of existing $TARGET by pressing \"y\":"
	rm -i $TARGET
	if [ -f $TARGET ]
	then
		echo "proceed with installation (see 00-README)"
		exit 0
	fi
fi

# Create target image file.  Note: Debian has a minimum
# size for automatic partitioning >= 10G these days!
qemu-img create -q -f qcow2 $TARGET 32G > /dev/null 2>&1

echo "installing system - please be patient (approx. 5-10 minutes)!"

qemu-system-x86_64 -m 4G -enable-kvm -hda $TARGET \
	-display none -cdrom installer.iso > /dev/null 2>&1

echo "run system (first run) - please be patient (approx 10-15 minutes)!"

qemu-system-x86_64 -m 4G -enable-kvm -net nic,model=rtl8139 \
	-net user,hostfwd=tcp::2222-:22,hostfwd=tcp::7776-:7776 \
	-display none -hda $TARGET > /dev/null 2>&1

echo "proceed with installation (see 00-README)"