How can I perform a network install without a keyboard?
I'm working with the following configuration:
- Raspberry Pi 4 model B
- Bootloader version is capable of network install (Apr 2022)
- Blank SD card inserted
- No keyboard / mouse can be connected
As I understand it, performing a network install is as follows:
- Power on the aforementioned Pi
- See this screen; I've discovered this screen only appears once a keyboard is detected
- Hold shift key
- Wait for imager tool to download
- Use mouse/kb to use the tool to create and install image
This process cannot be completed without a keyboard, as far as I can tell.
Trying to get any ssh access seems to require manually loading ssh info via SD/USB-MSD, but I'm trying not to load any type of media to SD/USB-MSD as I'm trying to automate the installation process over a whole cluster on the network.
2 Answers 2
The default boot order will try SD Card, USB and then Network Boot and then reboot to go through the boot order again.
So as I understand it you should be able to do a PXE boot, but it could be that you need to update the boot loader.
Check https://warmestrobot.com/blog/2021/6/21/raspberry-pi-network-boot-guide as it is quite comprehensive.
-
Thanks, this does indeed seem to allow for full setup without having to interface with a Pi, if my understanding is correct that once the first Pi is manually setup to boot from NAS, with one burned SD card, the rest can be automated without the need for SDs or Pi interaction. I will have to get a hold of a NAS and try it out.A__– A__2022年11月08日 20:06:23 +00:00Commented Nov 8, 2022 at 20:06
-
@A__ Please mark this as an answer if it cheks out.MatsK– MatsK2022年11月08日 22:31:43 +00:00Commented Nov 8, 2022 at 22:31
-
Okay, I was going to try it out first, but I guess this working in theory is good enoughA__– A__2022年11月09日 14:48:37 +00:00Commented Nov 9, 2022 at 14:48
After Format microSD and install OS raspberrypi imager https://www.raspberrypi.com/software/ Setup wifi: Then create a text file called wpa_supplicant.conf, and place it in the root directory of the microSD card. File like;
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
scan_ssid=1
ssid="your_wifi_ssid"
psk="your_wifi_password"
}
Enable SSH: Create an Empty File Named SSH in the root directory of the microSD card.
Connect to raspberrypi from your computer using ssh application Host Name: raspberrypi.local Port: 22 user: pi password:raspberry
to start configuration run sudo raspi-config
-
What you're describing seems to involve burning an SD card before inserting into each Pi, no? Which is exactly what I'm trying to avoid :). But this is still illuminating info for what it is, so thanks.A__– A__2022年10月18日 21:25:22 +00:00Commented Oct 18, 2022 at 21:25
-
1@A__ Well if the firmware on the Raspberry Pi needs to be updated to support the network boot feature, thats the only way. There is a Raspberry Pi OS fork that has a firstboot feature that you could benefit from, github.com/nmcclain/raspberian-firstbootMatsK– MatsK2022年11月13日 12:32:33 +00:00Commented Nov 13, 2022 at 12:32
-
1Thanks @MatsK . I reached out to Raspberry Pi and the batches they've been producing for the past few months at least are up-to-date enough that netboot is supported out of the box. So for future readers: no firmware update is necessary for new Pis.A__– A__2022年12月20日 16:29:31 +00:00Commented Dec 20, 2022 at 16:29