summaryrefslogtreecommitdiff
path: root/README
blob: c97373cc3a29968e1339b13fbecbcdd612d82257 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Requirements
------------

pacman -S archiso qemu syslinux darkhttpd

ArchISO and optional local cache
--------------------------------

We build a live Arch boot CD.

export http_proxy=http://192.168.1.12:3128
mkdir archlive
cp -r /usr/share/archiso/configs/releng/* archlive/.
cd archlive

# always had problem with keys, switch of signing (not good, I know)

sed -i 's/^SigLevel.*/SigLevel = Never/g' pacman.conf

# build the live CDs, this take quite a while

./build.sh -v build single

cd ..

We mount it and make it accessible over a webserver:

mkdir archiso
mount -o loop,ro archlive/out/archlinux-2013.05.16-dual.iso archiso
darkhttpd . --port 8080 &

We can also make available the packages on this webserver:

mkdir -p {core,extra,community}/os/x86_64/
repo-add core/os/x86_64/core.db.tar.gz core/os/x86_64/*
tar zcvfT extra/os/x86_64/extra.db.tar.gz /dev/null
ln -s extra.db.tar.gz extra/os/x86_64/extra.db
tar zcvfT community/os/x86_64/community.db.tar.gz /dev/null
ln -s community.db.tar.gz community/os/x86_64/community.db

TFTP root
--------

Copy PXE bootstrap files to a TFTP root:

mkdir -p tftproot/boot/x86_64
cp archiso/arch/boot/x86_64/vmlinuz tftproot/boot/x86_64/
cp archiso/arch/boot/x86_64/archiso.img tftproot/boot/x86_64/

cp /usr/lib/syslinux/pxelinux.0 tftproot

Custom software from AUR
------------------------

Build the following packages from AUR:

qdbm-1.8.78-1-x86_64.pkg.tar.xz
cfengine-3.4.4-2-x86_64.pkg.tar.xz

Put them into a local repository 'aba':

mkdir -p aba/os/x86_64/
repo-add aba/os/x86_64/aba.db.tar.gz aba/os/x86_64/*

Install Archlinux
-----------------

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 arch.img 4G

qemu-system-x86_64 -hda arch.img -net nic \
	-net user,tftp=$PWD/tftproot,bootfile=pxelinux.0 \
	-m 386 -display curses \
	-machine accel=kvm -redir tcp:222::22 \
	-boot n

# remote install (manually), then follow docu
# (this gives a rough idea of what should be automatized)
passwd
systemctl start sshd

# 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

Running the system
------------------

qemu-system-x86_64 -hda arch.img -net nic \
	-net user \
	-m 386 -display curses \
	-machine accel=kvm -redir tcp:222::22

Links
-----

https://wiki.archlinux.org/index.php/Archiso
https://wiki.archlinux.org/index.php/PXE
https://wiki.archlinux.org/index.php/Archiso_as_pxe_server
https://kroweer.wordpress.com/2011/09/07/creating-a-custom-arch-linux-live-usb/
http://pxeknife.erebor.org/
https://github.com/altercation/archblocks
https://bbs.archlinux.org/viewtopic.php?id=149597
https://github.com/jdodds/aif
https://wiki.archlinux.org/index.php/Autostarting
https://wiki.archlinux.org/index.php/Automatic_login_to_virtual_console
https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide
https://bbs.archlinux.org/viewtopic.php?id=148790 (text mode boot from archiso)
http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=How_to_run_OVMF (UEFI BIOS)
https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi
https://wiki.archlinux.org/index.php/GRUB2
http://www.brianparsons.net/Best-Practices-For-Using-Arch-Linux-on-Servers/

Other projects
--------------
https://github.com/roman-neuhauser/anarchinst