This is just a draft. Still Working-In-Progress. Many bugs!

another PC run nginx Then we have mirror: 10.100.100.34/$arch/$repo

    server {
        listen       [::]:80;
        listen       80;
        #server_name  localhost;
    root /var/www/html;
        index  index.html index.htm;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location /aarch64 {
        proxy_pass https://mirror.tuna.tsinghua.edu.cn/archlinuxarm/aarch64;
        }
......

android chroot:

prepare root.

mount -t proc /proc proc/
mount -o bind /sys sys/
mount -o bind /dev dev/
# Maybe we should bind every mountpoint manually. Write a script, or copy from debian-arm blog. 
chroot /path/to/.../root/

inside: /bin/bash

export PATH=/usr/bin
export LD_LIBRARY_PATH=/usr/lib

# we should run `pacman-key --init` and `pacman-key --populate archlinuxarm`. But I failed. 
vi /etc/pacman.conf # Set Siglevel to Never

# I don't know why DNS is still not working. Modify mirrorlist to use our repo. 
rm /etc/resolv.conf
echo 10.100.100.1 > /etc/resolv.conf

I bought a cheap motherboard and realized that, I have no cable for 10pin(motherboard) to 15pin vga. And things went worse after I realized that my USB2TTL cable is not working for RS232 serial port.

Then... I have to install archlinux WITHOUT monitor. But, fortunately, I have a KEYBOARD!

ArchISO

I was too lazy to modify ArchISO. I just plug the ARCHISO usb stick and a blank harddisk, and boot, then a new client appears on my router. The dhcpcd is working out-of-box!

The router told me the IP: 192.168.1.7

Then I type the following characters on my keyboard:

curl https://recolic.cc/setup/ | bash
systemctl start sshd

recolic.org is my self-hosted website, and I can access the nginx access.log to confirm that the command above has succeeded. The setup script will download my public key, and put it into /root/.ssh/authorized_keys, and configure the permission bits to make sshd happy.

Now try ssh [email protected]. It works.

Installaion

It's too simple to install an arch linux. archfi made it easy.

Post-installaion

AFter shutdown the machine, remove the harddisk from motherboard, and use another WORKING linux laptop to mount this harddisk. Do the following things:

mount BOOT partition and ROOT partition to /mnt
arch-chroot into it
install openssh, dhcpcd
systemctl enable sshd, dhcpcd
Modify /etc/ssh/sshd_config to allow RootLogin.
Set root password if you're not already done.
put your public key into /root/.ssh/authorized_keys and set the permission properly.
done

Good. Plug the harddisk into the headless machine, it should boot and be ready for ssh-into.

Question

Q: Why not plug the harddisk into another machine, and install the Archlinux OS?

A: Then you need to boot from archiso, and perform grub-install, to allow booting the new OS. Then you have to do everything I have done.