Skip to main content
2 of 2
added 1977 characters in body
Dims
  • 175
  • 1
  • 8

How to netboot Raspberry Pi 3 B+ from Linux?

I would like to boot Raspberry Pi 3 B+ from network but not from other Raspberry Pi. I have several machines in my LAN including x86 Linux with DHCP, TFTP and so on. Are there any instructions on how to netboot Raspi in this environment?

When I am turning on my Raspi without SD card it apparently does nothing. Only red LED is lighting. No any LEDs from ethernet card or display messages on HDMI appear. Is this correct?


I was able to netboot Raspberry Py B 3+ with the steps following. Not all problems solved but it boots.

No SD card in a slot. No preconfiguration of Rasperry Pi was required. Only one Raspberry Pi device is required.

Based on https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md

  1. Download Raspberry Pi OS Lite image from official site. Mount it on Linux with loopback filesystem and extract all files from two partitions (boot and root). Keep symlinks, ownerships and permissions.

  2. TFTP server configured in the LAN

    a) it serves /tftpboot directory

    b) /tftboot directory contains all files from boot partition

    c) /tftpboot/cmdline.txt changed to point to NFS share of root partition

  3. NFS server configured in the LAN

    a) it serves /tftboot and /srv/raspi001 directories

    b) /tftpboot contains files from boot partition of Raspi image

    c) /srv/raspi001 contains files from root partion of Raspi image

    d) /srv/raspi001/etc/fstab is cleaned from origianl filesystems and an etry which points to NFS share with boot partition added

  4. DHCP server configured

    a) tftpserver entry set pointing to TFTP server IP


Files:

$cat /etc/exports /srv/raspi001 -network MYLAN_IP_ADDRESS/24 -maproot=root /tftpboot -network MYLAN_IP_ADDRESS/24 -maproot=root $ cat /tftpboot/cmdline.txt console=serial0,115200 console=tty1 root=/dev/nfs nfsroot=NFSSERVER_IP_ADDRESS:/srv/raspi001,vers=3,proto=tcp rw ip=dhcp elevator=deadline rootwait $ cat /srv/raspi001/etc/fstab proc /proc proc defaults 0 0 NFSSERVER_IP_ADDRESS:/tftpboot /boot nfs defaults,vers=3,proto=tcp 0 0 

Current problems

  1. Don't know how to identify hardware. Would like to boot different devices with different filesystems

  2. /boot directory not mounting

  3. Each new boot the device is obtaining new IP address

Dims
  • 175
  • 1
  • 8