rsync -av rsync://mirror.archlinux32.org/archlinux32/i686/core/. mirror/i686/core/. rsync -av rsync://mirror.archlinux32.org/archlinux32/archisos/archlinux-2018.01.01-i686.iso mirror/archisos/. mkdir -p mirror/i686/extra rsync -av rsync://mirror.archlinux32.org/archlinux32/i686/extra/extra.db* mirror/i686/extra/. mkdir -p mirror/i686/community rsync -av rsync://mirror.archlinux32.org/archlinux32/i686/community/community.db* mirror/i686/community/. rsync -av rsync://mirror.archlinux32.org/archlinux32/* mirror/. mkdir archiso mount -o loop mirror/archisos/archlinux-2018.01.01-i686.iso archiso 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: # minimal requirements: # pentium2: CMOV missing # 64M: Physical KASLR disabled: no suitable memory region! # 128M: Initramfs unpacking failed: write error # 256M: Initramfs unpacking failed: write error, failed to configure network # 512M: curl: Out of memory downloading airootfs.sfs # 768M: attempting to kill init # 1024M: no space left on device,, squashfs temp space # 1024M: no space left on device,, squashfs temp space # 1536M: works guestmount -a /data/libvirt/arch32.qcow2 -m /dev/sda2 --ro /mnt/tmp 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