Skip to content

Instantly share code, notes, and snippets.

@recolic
Created April 10, 2020 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save recolic/34661c156952d628a01fc5738f4207ef to your computer and use it in GitHub Desktop.
Save recolic/34661c156952d628a01fc5738f4207ef to your computer and use it in GitHub Desktop.
Install ArchLinux without MONITOR

Install ArchLinux without MONITOR and SERIAL

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.org/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment