1

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:

  1. Power on the aforementioned Pi
  2. See this screen; I've discovered this screen only appears once a keyboard is detected
  3. Hold shift key
  4. Wait for imager tool to download
  5. 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

1

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.

3
  • 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__
    Nov 8, 2022 at 20:06
  • @A__ Please mark this as an answer if it cheks out.
    – MatsK
    Nov 8, 2022 at 22:31
  • Okay, I was going to try it out first, but I guess this working in theory is good enough
    – A__
    Nov 9, 2022 at 14:48
1

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

3
  • 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__
    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-firstboot
    – MatsK
    Nov 13, 2022 at 12:32
  • 1
    Thanks @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__
    Dec 20, 2022 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.