d8e4e29732b994178d7c34ad76faaa523005982c
2 # Copyright (C) 2019 Ian Kelling
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4 if [[ -s ~
/.bashrc
]];then . ~
/.bashrc
;fi
9 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
13 Usage: ${0##*/} [-h|--help] HOSTNAME
14 install arch after it's been booted into it's setup env
23 echo "error: expect a hostname in \$1 "
29 scp
-o StrictHostKeyChecking
=false
-o UserKnownHostsFile
=/dev
/null \
30 /p
/c
/machine_specific
/$host/filesystem
/etc
/ssh
/* root@
$host:/etc
/ssh
32 if [[ -e /var
/cache
/pacman
/pkg
]]; then
33 darkhttpd
/var
/cache
/pacman
/pkg
&
34 mirror
=http
://$HOSTNAME:8080
37 rsync
-rlpthvi --relative /a
/bin
/fai
/ root@
$host:/
38 rsync
/a
/bin
/fai
/ root@
$host:/a
/bin
/fai
/
39 sudo scp
-r /q
/root
/luks
/q
/root
/shadow root@
$host:
40 # creating shadow file string:
41 # on debian, you can use mkpasswd -m sha-512 to generate a pass.
42 # arch doesn't have this program. instead, you can do passwd,
43 # and extract it from the shadow file.
44 ssh root@
$host bash
-x /a
/bin
/fai
/arch-init
$host $mirror
46 ssh root@
$host reboot ||
[[ $?
== 255 ]]
48 # next up is sync data, then
49 # ssh $host /a/bin/distro-begin
51 if [[ -e /var
/cache
/pacman
/pkg
]]; then
54 # todo: this doesn't work. figure out why.