Enhance network boot setup script and documentation: automate fetching of Raspberry Pi 4 boot files from GitHub, update TFTP root handling, and improve user instructions for setup. Remove manual steps for file retrieval and clarify echo messages in the setup script.

This commit is contained in:
nearxos
2026-02-20 12:28:54 +02:00
parent 499c14580e
commit b99cc2520a
3 changed files with 77 additions and 15 deletions

View File

@@ -42,9 +42,9 @@ The script will:
- Install **dnsmasq** (DHCP + TFTP).
- Configure dnsmasq to listen only on **eth1**, with a DHCP range and TFTP root.
- Create `/srv/tftpboot` and optionally fetch Raspberry Pi boot files (or tell you how).
- Create `/srv/tftpboot` and **fetch Raspberry Pi 4 boot files from GitHub** (raspberrypi/firmware, `boot/` folder) if not already present.
- Enable **IPv4 forwarding** and **NAT** (nftables) so clients on eth1 use eth0 for internet.
- Enable and start the **dnsmasq** and **nftables** (or apply rules) services.
- Enable and start the **dnsmasq** service.
## Proxmox: adding eth1 to the LXC
@@ -74,16 +74,17 @@ Your current LXC already has eth0 (10.130.60.141) and eth1 (10.20.50.1); the set
## TFTP boot files (Raspberry Pi 4 / CM4)
The TFTP root (e.g. `/srv/tftpboot`) must contain the Raspberry Pi firmware boot files, for example:
The setup script **automatically downloads** the official Raspberry Pi firmware `boot/` folder from GitHub (https://github.com/raspberrypi/firmware) into `/srv/tftpboot` when `start4cd.elf` is missing. No manual copy is needed.
- `start4.elf`, `fixup4.dat` (or `start4cd.elf`, `fixup4cd.dat`)
- `config.txt`, `cmdline.txt`
- `kernel8.img` (64-bit) or `kernel7l.img` (32-bit)
To refresh or populate TFTP without re-running the full setup:
You can:
```bash
./chromium-setup/emmc-provisioning/scripts/populate-tftpboot-from-git.sh root@<LXC-IP>
```
- Run the scripts step that downloads the boot files from the official Raspberry Pi firmware repo, or
- Copy them from a Raspberry Pi OS `/boot/firmware` (or `/boot`) into `/srv/tftpboot` on the LXC.
(Remove `/srv/tftpboot/start4cd.elf` on the LXC first if you want a full re-fetch.)
The TFTP root contains e.g. `start4cd.elf`, `fixup4cd.dat`, `config.txt`, `cmdline.txt`, `kernel8.img`, and other boot files. For a custom kernel or initramfs (e.g. for provisioning), add or replace files in `/srv/tftpboot` and adjust `config.txt` / `cmdline.txt` as needed.
## Summary