summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README30
-rwxr-xr-xarchauto.sh60
m---------archblocks0
-rw-r--r--tftproot/pxelinux.cfg/01-52-54-00-12-34-562
4 files changed, 87 insertions, 5 deletions
diff --git a/README b/README
index 8f238ff..b793120 100644
--- a/README
+++ b/README
@@ -14,8 +14,9 @@ sed 's/SigLevel = PackageRequired/SigLevel = Never/g' pacman.conf
./build.sh -v build single
mkdir -p /mnt/archiso
-mount -o loop,ro out/archlinux-2013.02.14-x86_64.iso /mnt/archiso
-darkhttpd /mnt/archiso/ --port 8080
+mount -o loop,ro archlive/out/archlinux-2013.02.14-dual.iso /mnt/archiso
+ln -s /mnt/archiso .
+darkhttpd . --port 8080
cp /mnt/archiso/arch/boot/x86_64/vmlinuz tftproot/boot/x86_64/
cp /mnt/archiso/arch/boot/x86_64/archiso.img tftproot/boot/x86_64/
@@ -29,7 +30,8 @@ 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
+ -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)
@@ -43,14 +45,32 @@ systemctl start sshd
# - 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
-sgdisk
+
+qemu-system-x86_64 -hda arch.img -net nic \
+ -net user \
+ -m 386 -display curses \
+ -machine accel=kvm -redir tcp:222::22
+
+# via cfengine
+
+# packages net-tools gdisk
+# pacman -S libedit ntp
+# ntpdate 0.pool.ntp.org, systemctl enable ntpd
# Links:
# https://wiki.archlinux.org/index.php/Archiso
@@ -66,3 +86,5 @@ sgdisk
# 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
diff --git a/archauto.sh b/archauto.sh
new file mode 100755
index 0000000..40ad7f7
--- /dev/null
+++ b/archauto.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+INSTALL_DRIVE=/dev/sda
+PARTITION_BOOT=1
+PARTITION_SWAP=2
+PARTITION_ROOT=3
+LABEL_BOOT=BOOT
+LABEL_SWAP=SWAP
+LABEL_ROOT=ROOT
+MOUNT_PATH=/mnt
+
+echo "Installing minimalistic base system.."
+
+sgdisk -Z ${INSTALL_DRIVE}
+sgdisk -a 2048 -o ${INSTALL_DRIVE}
+
+sgdisk -n ${PARTITION_BOOT}:0:+100M ${INSTALL_DRIVE}
+sgdisk -t ${PARTITION_BOOT}:ef02 ${INSTALL_DRIVE}
+sgdisk -c ${PARTITION_BOOT}:"${LABEL_BOOT}" ${INSTALL_DRIVE}
+
+sgdisk -n ${PARTITION_SWAP}:0:+900M ${INSTALL_DRIVE}
+sgdisk -t ${PARTITION_SWAP}:8200 ${INSTALL_DRIVE}
+sgdisk -c ${PARTITION_SWAP}:"${LABEL_SWAP}" ${INSTALL_DRIVE}
+
+sgdisk -n ${PARTITION_ROOT}:0:0 ${INSTALL_DRIVE}
+sgdisk -t ${PARTITION_ROOT}:8300 ${INSTALL_DRIVE}
+sgdisk -c ${PARTITION_ROOT}:"${LABEL_ROOT}" ${INSTALL_DRIVE}
+
+sgdisk -G ${INSTALL_DRIVE}
+
+mkswap ${INSTALL_DRIVE}${PARTITION_SWAP}
+swapon ${INSTALL_DRIVE}${PARTITION_SWAP}
+mkfs.ext4 ${INSTALL_DRIVE}${PARTITION_ROOT}
+
+mkdir -p ${MOUNT_PATH}
+mount ${INSTALL_DRIVE}${PARTITION_ROOT} ${MOUNT_PATH}
+
+export http_proxy=http://192.168.1.12:3128
+
+pacstrap ${MOUNT_PATH} base base-devel
+
+arch-chroot /mnt pacman --noconfirm -S grub-bios
+arch-chroot /mnt grub-install --target=i386-pc --recheck ${INSTALL_DRIVE}
+cp /mnt/usr/share/locale/en@quot/LC_MESSAGES/grub.mo /mnt/boot/grub/locale/en.mo
+sed 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/GRUB_CMDLINE_LINUX_DEFAULT="modprobe.blacklist=cirrus"/g' /mnt/etc/default/grub
+sed 's/GRUB_GFXMODE=auto/GRUB_GFXMODE=text/g' /mnt/etc/default/grub
+sed 's/#GRUB_TERMINAL_OUTPUT=console/GRUB_TERMINAL_OUTPUT=console' /mnt/etc/default/grub
+
+arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
+
+genfstab -p /mnt >> /mnt/etc/fstab
+
+ln -s /usr/share/zoneinfo/Europe/Zurich /mnt/etc/localtime
+arch-chroot /mnt hwclock --systohc --utc
+
+echo "archiso" > /mnt/etc/hostname
+
+arch-chroot /mnt sh -c "echo 'root:xx' | chpasswd"
+
+arch-chroot /mnt systemctl enable dhcpcd@enp0s3.service
diff --git a/archblocks b/archblocks
deleted file mode 160000
-Subproject f79b856d4fab0f8b95bb01755a54873c2440469
diff --git a/tftproot/pxelinux.cfg/01-52-54-00-12-34-56 b/tftproot/pxelinux.cfg/01-52-54-00-12-34-56
index a0450cd..510c906 100644
--- a/tftproot/pxelinux.cfg/01-52-54-00-12-34-56
+++ b/tftproot/pxelinux.cfg/01-52-54-00-12-34-56
@@ -13,5 +13,5 @@ ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) (HTTP)
LINUX boot/x86_64/vmlinuz
INITRD boot/x86_64/archiso.img
-APPEND archisobasedir=arch archiso_http_srv=http://192.168.1.12:8080/ ip=dhcp modprobe.blacklist=cirrus
+APPEND archisobasedir=archiso/arch archiso_http_srv=http://10.0.2.2:8080/ ip=dhcp modprobe.blacklist=cirrus
IPAPPEND 3