-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharch-install
executable file
·30 lines (23 loc) · 1.07 KB
/
arch-install
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
#!/usr/bin/bash
# https://wiki.archlinux.org/index.php/Installation_guide
set -euox pipefail
rm -rf $1 || true && mkdir -p $1
# TODO Review this and think it through again...
mkdir -p $1/root/.ssh
cp -r /home/vorburger/.ssh/authorized_keys $1/root/.ssh/ ||
cp -r $HOME/.ssh/authorized_keys $1/root/.ssh/ || true
pacstrap $1 base linux openssh syslinux nano which git
# archiso qemu-headless edk2-ovmf linux-firmware
# genfstab -U $1 >> $1/etc/fstab
cat <<EOT >>$1/etc/fstab
/dev/sda1 / ext4 rw,relatime 0 1
EOT
# /dev/sdb1 /tmp ext4 rw,relatime 0 2
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# NB syslinux.cfg must be cp BEFORE syslinux-install_update runs (in arch-install-chroot)
cp $SCRIPT_DIR/arch-install-syslinux.cfg $1/boot/syslinux/syslinux.cfg
cp $SCRIPT_DIR/arch-install-20-ethernet.network $1/etc/systemd/network/
cp $SCRIPT_DIR/arch-install-chroot $1
chmod +x $1/arch-install-chroot
arch-chroot $1 ./arch-install-chroot
rm $1/arch-install-chroot