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 root@192.168.1.7
. 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.
Leave a Reply