summaryrefslogtreecommitdiff
path: root/README
blob: c3b06595298976aed5011a81a1f373c772008481 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
wget archlinux-2017.08.01-i686.iso
mkdir cdrom
mount -o loop archlinux-2017.08.01-i686.iso cdrom

#wget -m mirror.archlinux32.org
#mv mirror.archlinux32.org mirror
rsync -av rsync://mirror.archlinux32.org/archlinux32/ mirror/

TODO FROM HERE:


local network:

# hangs!? why!?
#ip link add name br0 type bridge
#ip addr add dev br0 192.168.130.1/24
brctl addbr br0
ip link set br0 up
ip addr add dev br0 192.168.130.1/24

# We mount it and make it accessible over the 'darkhttpd' webserver:


TFTP root (for PXE boot)
---------

# Copy PXE bootstrap files to a TFTP root:

cp archiso/arch/boot/i686/vmlinuz tftproot/boot/i686/
cp archiso/arch/boot/i686/archiso.img tftproot/boot/i686/

cp /usr/share/syslinux/pxelinux.0 tftproot/
cp /usr/share/syslinux/linux.c32 tftproot/

Local kernel and RAMdisk (for libvirt direct kernel boot)
------------------------

cp archiso/arch/boot/i686/vmlinuz .
cp archiso/arch/boot/i686/archiso.img .

Install Archlinux (PXE and qemu directly)
-----------------

Create a Qemu image with Archlinux (automatically). The main
work is done by the 'archauto.sh' script which is given to
the archiso kernel as script to execute after auto-login:

qemu-img create arch32.img 2G

qemu-system-i386 -drive file=arch32.img,index=0,media=disk,format=raw,if=virtio -net nic \
	-enable-kvm \
	-net user,id=net0,net=192.168.130.2/24,host=192.168.130.1,tftp=$PWD/tftproot,bootfile=pxelinux.0 \
	-m 2048 \
	-machine accel=kvm -redir tcp:2222::22

# fails somehow to start script
# 10.0.2.0 network is quite stuborn, how to set explicitely?
#	-nographic -serial mon:stdio \

qemu-system-i386 -drive file=arch32.img,index=0,media=disk,format=raw,if=virtio -net nic \
	-enable-kvm \
	-net user,id=net0,net=192.168.130.2/24,host=192.168.130.1 \
	-m 2048 \
	-machine accel=kvm -redir tcp:2222::22
	
Install Archlinux (libvirtd and virt-install)
-----------------

There are quite some steps here, so they are wrapped into a shell script:

./createvm.sh

TODOs
-----

# remote install (manually), then follow docu
# (this gives a rough idea of what should be automatized)
#passwd
#systemctl start sshd
#sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

# automatic installation frameworks for ArchLinux
# - AIF
# - ArchBlocks
# - ArchBang
# - backpac: snapshots, not really the cfengine philosophy
# load them after boot of base system or customize the installation medium?

# EFI, later
# wget 'http://wiki.qemu.org/download/efi-bios.tar.bz2'
# qemu with efi
# efi partition etc

# manual minimal installation or "what's needed in a CFengine bootstrap
# script"?
# - boot loader
#   - grub2
#   - virtio ramdisk hooks
# - partitioning
#   - sgdisk scripting (ArchBlocks does it nicely)
#   - RAID, LVM, LUKS and friends
#   - size, swap, filesystem, chunking
#   - file system layout

# via cfengine

# packages net-tools gdisk