Is there any way to perform headless installation of arch on raspberry pi 3 using SSH

As raspberry pi has rpi-imager , during installing os img into sd card it does all configuration of ssh and wifi configs, so as soon as we insert sd card and power pi it automatically gets connected to wifi and we can ssh into pi using other devices connected to same network, so i am planning to do the same but with arch linux arm img file, but rpi-imager doesnt support this os , so i manually did sd card preparation and did some changes in boot folder to somehow get pi connected to wifi and i can ssh into pi so that i can perform installation , but to my surprise there is no such way we can do it atleast in this case (arch linux arm) , i went through almost all references on internet, but didnt worked

Have you asked in the Arch Linux ARM forums? There’s no thread topic related to this in the forum now (as far as I could grep) and creating one would act as a reference for more tinkerers in the future.

1 Like

These instructions on setting up wifi on a pinebook ALARM rootfs microsd might be helpful.

Ultimately, since this is a rootfs, there is no “installation”, you setup your system once, then take a disk image and use it further. Or alternatively, mount the rootfs on a ARM system once, chroot into it, setup your changes (cloud-init, wifi-menu etc), and then unmount.

Ignore the below, I wrote that before finding out that ALARM ships a rootfs, not a archiso. Still linking, in case you want to try out cloud-init, which you should be able to enable on the rootfs by extracting and packaging it back.

Have you looked at Install Arch Linux via SSH - ArchWiki

With cloud-init, you can write a small configuration patch (with iwd), and use xorrisofs to patch the archlinuxarm ISO with the cloud-init-config. Once the system boots, it will automatically pick pick up the configuration.

Alternatively, the cloud-init wiki suggests you can just burn the cloud-init config to a separate ISO.

cloud-init is included in the archinstall boot image: Add cloud-init support to releng (!115) · Merge requests · Arch Linux / archiso · GitLab, but since ALARM doesn’t ship a archiso, you will have to manually enable cloudinit on the rootfs.

NoCloud - cloud-init 24.2 documentation

It is unclear from your screenshot what all have you tried so far? Is the wpa_supplicant package installed on the rootfs? How are you automatically starting wpa_supplicant on boot?

Can’t we do this all in RPI-Imager or Rufus by selecting “other customized ISO” and load the required ISO file and enable the ssh bootable option in settings in the imager application?

Can’t we do this all in RPI-Imager

Short answer: No. Long answer:

You can check the source for RPI Imager to check what it does with that feature. This is the commit: Shift+Ctrl+X for advanced users that likes to customize the image · raspberrypi/rpi-imager@86f8933 · GitHub.

It mentions: “Allows one to set certain options on RPI OS images”. ALARM is not a RPI OS derivative, and thus does not work.

If you look more closely, it is just generating and copying the relevant config.txt, cmdline.txt, firstrun.sh files: Shift+Ctrl+X for advanced users that likes to customize the image · raspberrypi/rpi-imager@86f8933 · GitHub

This is a RPI OS specific thing, as described in their documentation: https://www.raspberrypi.com/documentation/computers/config_txt.html#what-is-config-txt

ALARM doesn’t even have a ISO, so I am not sure if RPI Imager even supports ALARM at all.

1 Like