WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PXE Boot on Pi5  (Read 116 times)

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 313
PXE Boot on Pi5
« on: October 22, 2025, 05:13:28 AM »
Hi There,

I have set up a Debian server for PXE boot and installed TFTP.

I added the following two DHCP options on a windows dhcp Server so that the Pi5 can fetch the data from the boot server:

066 Boot Server Hostname: 192.xx.xx.xx
067 Boot Filename: bootcode.bin

Then, I mounted a ready-made image from an SD card containing my previously configured piCore version (as desired), and copied its contents to /srv/nfs/rpi5-pxe/.
I copied the full tce folder including all required extensions and the onboot.lst from the image and copied it to /srv/nfs/rpi5-pxe.

Code: [Select]
ls -al /srv/nfs/rpi5-pxe/
insgesamt 68776
drwxr-xr-x 6 nobody nogroup     4096 22. Okt 10:24  .
drwxr-xr-x 3 root   root        4096 15. Okt 15:46  ..
-rwxr-xr-x 1 root   root       30349 15. Okt 15:58  bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root   root       30652 15. Okt 15:58  bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root   root       30011 15. Okt 15:58  bcm2708-rpi-b-rev1.dtb
-rwxr-xr-x 1 root   root       29952 15. Okt 15:58  bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root   root       29962 15. Okt 15:58  bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root   root       31829 15. Okt 15:58  bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root   root       32346 15. Okt 15:58  bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root   root       32121 15. Okt 15:58  bcm2709-rpi-cm2.dtb
-rwxr-xr-x 1 root   root       32495 15. Okt 15:58  bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root   root       34687 15. Okt 15:58  bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root   root       35322 15. Okt 15:58  bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root   root       33676 15. Okt 15:58  bcm2710-rpi-cm0.dtb
-rwxr-xr-x 1 root   root       32258 15. Okt 15:58  bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root   root       33664 15. Okt 15:58  bcm2710-rpi-zero-2.dtb
-rwxr-xr-x 1 root   root       33664 15. Okt 15:58  bcm2710-rpi-zero-2-w.dtb
-rwxr-xr-x 1 root   root       56215 15. Okt 15:58  bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root   root       56211 15. Okt 15:58  bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root   root       56732 15. Okt 15:58  bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root   root       39913 15. Okt 15:58  bcm2711-rpi-cm4-io.dtb
-rwxr-xr-x 1 root   root       53502 15. Okt 15:58  bcm2711-rpi-cm4s.dtb
-rwxr-xr-x 1 root   root       78235 15. Okt 15:58  bcm2712d0-rpi-5-b.dtb
-rwxr-xr-x 1 root   root       78187 15. Okt 15:58  bcm2712-rpi-500.dtb
-rwxr-xr-x 1 root   root       78231 15. Okt 15:58  bcm2712-rpi-5-b.dtb
-rwxr-xr-x 1 root   root       78945 15. Okt 15:58  bcm2712-rpi-cm5-cm4io.dtb
-rwxr-xr-x 1 root   root       79011 15. Okt 15:58  bcm2712-rpi-cm5-cm5io.dtb
-rwxr-xr-x 1 root   root       78986 15. Okt 15:58  bcm2712-rpi-cm5l-cm4io.dtb
-rwxr-xr-x 1 root   root       79052 15. Okt 15:58  bcm2712-rpi-cm5l-cm5io.dtb
-rwxr-xr-x 1 root   root       52476 15. Okt 15:58  bootcode.bin
-rwxr-xr-x 1 root   root         293 22. Okt 10:16  cmdline.txt
-rwxr-xr-x 1 root   root        2753 15. Okt 15:58  config.txt
-rwxr-xr-x 1 root   root       18693 15. Okt 15:58  COPYING.linux
-rwxr-xr-x 1 root   root        3233 15. Okt 15:58  fixup4cd.dat
-rwxr-xr-x 1 root   root        5459 15. Okt 15:58  fixup4.dat
-rwxr-xr-x 1 root   root        8457 15. Okt 15:58  fixup4x.dat
-rwxr-xr-x 1 root   root        3233 15. Okt 15:58  fixup_cd.dat
-rwxr-xr-x 1 root   root        7326 15. Okt 15:58  fixup.dat
-rwxr-xr-x 1 root   root       10298 15. Okt 15:58  fixup_x.dat
-rwxr-xr-x 1 root   root     7104352 15. Okt 15:58  kernel61225.img
-rwxr-xr-x 1 root   root     7443792 15. Okt 15:58  kernel61225v7.img
-rwxr-xr-x 1 root   root     7895432 15. Okt 15:58  kernel61225v7l.img
-rwxr-xr-x 1 root   root     9383693 15. Okt 15:58  kernel61225v8.img
-rwxr-xr-x 1 root   root        1594 15. Okt 15:58  LICENCE.broadcom
-rwxr-xr-x 1 root   root     1546644 15. Okt 15:58  modules-6.12.25-piCore.gz
-rwxr-xr-x 1 root   root     1602415 15. Okt 15:58  modules-6.12.25-piCore-v7.gz
-rwxr-xr-x 1 root   root     1619977 15. Okt 15:58  modules-6.12.25-piCore-v7l.gz
-rwxr-xr-x 1 root   root     1739244 15. Okt 15:58  modules-6.12.25-piCore-v8.gz
-rw-r--r-- 1 root   root          66 22. Okt 10:06  nfs.list
drwxr-xr-x 2 root   root       20480 15. Okt 15:58  overlays
-rwxr-xr-x 1 root   root        5362 15. Okt 15:58  README
-rwxr-xr-x 1 root   root    16889367 15. Okt 15:58  rootfs-piCore-16.0.gz
-rwxr-xr-x 1 root   root      814236 15. Okt 15:58  start4cd.elf
-rwxr-xr-x 1 root   root     2264096 15. Okt 15:58  start4.elf
-rwxr-xr-x 1 root   root     3011656 15. Okt 15:58  start4x.elf
-rwxr-xr-x 1 root   root      814236 15. Okt 15:58  start_cd.elf
-rwxr-xr-x 1 root   root     2988256 15. Okt 15:58  start.elf
-rwxr-xr-x 1 root   root     3735368 15. Okt 15:58  start_x.elf
drwxr-xr-x 2 root   root        4096 15. Okt 15:58 'System Volume Information'
drwxr-xr-x 4 root   root        4096 22. Okt 09:25  tce
drwxr-xr-x 2 root   root        4096 22. Okt 10:14  tce-tftp
-rwxr-xr-x 1 root   root         304 15. Okt 15:58  user-data


I created a folder called tce-tftp under /srv/nfs/rpi5-pxe with the following contents:
Code: [Select]
ls -al tce-tftp/
total 360
drwxr-xr-x 2 root   root      4096 Oct 22 10:14 .
drwxr-xr-x 6 nobody nogroup   4096 Oct 22 10:24 ..
-rw-r--r-- 1 root   root     73728 Jan  1 1970 libtirpc.tcz
-rw-r--r-- 1 root   root        47 Jan  1 1970 libtirpc.tcz.md5.txt
-rw-r--r-- 1 root   root    233472 Jan  1 1970 nfs-utils.tcz
-rw-r--r-- 1 root   root        13 Jan  1 1970 nfs-utils.tcz.dep
-rw-r--r-- 1 root   root        48 Jan  1 1970 nfs-utils.tcz.md5.txt
-rw-r--r-- 1 root   root     32768 Jan  1 1970 rpcbind.tcz
-rw-r--r-- 1 root   root        13 Jan  1 1970 rpcbind.tcz.dep
-rw-r--r-- 1 root   root        46 Jan  1 1970 rpcbind.tcz.md5.txt


And created nfs.list like this:
Code: [Select]
cat /srv/nfs/rpi5-pxe/nfs.list
tce-tftp/rpcbind.tcz
tce-tftp/libtirpc.tcz
tce-tftp/nfs-utils.tcz


I modified cmdline.txt as follows:
Code: [Select]
cat cmdline.txt
nfsroot=192.xx.xx.xx:/srv/nfs/rpi5-pxe,vers=4.1,proto=tcp ip=dhcp dwc_otg.fiq_fsm_mask=0xF dwc_otg.lpm_enable=0 console=/dev/null root=/dev/ram0 rootwait quiet tftplist=192.xx.xx.xx:/nfs.list tce=nfs nortc loglevel=3 noembed lang=de_DE.UTF-8 kmap=de tz=utc-2 waitusb=5 logo.nologo=1 vga=795

Currently, the Pi5 successfully boots from the server, but only with the standard kernel, and does not load any of the TCE extensions.

What am I doing wrong?

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 792
Re: PXE Boot on Pi5
« Reply #1 on: October 22, 2025, 05:37:31 AM »
Long time ago i was booting raspberry pi with uboot and nfs, you could look at my prev post, maybe you can find some ideas how to solved your problem.

First of all, you specify the initramfs file in the config.txt file, that have to be read by the bootcode with nfs.
And what I can find in my prev post i was using the path in tce.

You have forgotten to add to correct path i think, so i think it should be like this
Code: [Select]
tce=nfs/rpi5-pxeI was also Expose the hole path to the export


And was using like this :nfsmount=192.168.1.10:/srv/nfs/rpi5-pxe

And my prev posts:
https://forum.tinycorelinux.net/index.php/topic,21356.msg133663.html
« Last Edit: October 22, 2025, 06:03:00 AM by patrikg »

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 313
Re: PXE Boot on Pi5
« Reply #2 on: October 22, 2025, 06:58:42 AM »
I have now modified cmdline.txt as follows, but it still didn't work.
Code: [Select]
cat cmdline.txt
nfsroot=10.210.10.222:/srv/nfs/rpi5-pxe,vers=4.1,proto=tcp ip=dhcp dwc_otg.fiq_fsm_mask=0xF dwc_otg.lpm_enable=0 console=/dev/null root=/dev/ram0 rootwait quiet tce=/tce nortc loglevel=3 noembed lang=de_DE.UTF-8 kmap=de tz=utc-2 waitusb=5 logo.nologo=1 vga=795
tce=/tce (because the path is relative to the previously specified nfsroot path)

if i add the option tftplist=192.xx.xx.xx:/nfs.list

i can see:

Code: [Select]
sudo find / -name *tcz
/tmp/tce/optional/nfs-utils.tcz
/tmp/tce/optional/libtirpc.tcz
/tmp/tce/optional/rpcbind.tcz


I noticed that bootcode.bin is not available during boot.
while booting i see "tftp 1 : file not found"
but then config.txt is loaded from the path /srv/nfs/rpi5-pxe.

However, bootcode.bin is already located in both /srv/nfs/rpi5-pxe and /srv/tftp.

Code: [Select]
ls -al /srv/tftp/
total 60
drwxr-xr-x 2 root nogroup  4096 Oct 22 12:51 .
drwxr-xr-x 4 root root     4096 Oct 15 15:46 ..
-rwxr-xr-x 1 root root    52476 Oct 15 15:58 bootcode.bin

ls -al /srv/nfs/rpi5-pxe/bootcode.bin
-rwxr-xr-x 1 root root 52476 Oct 15 15:58 /srv/nfs/rpi5-pxe/bootcode.bin

Code: [Select]
ls -al /srv/tftp/
total 60
drwxr-xr-x 2 root nogroup  4096 Oct 22 12:51 .
drwxr-xr-x 4 root root     4096 Oct 15 15:46 ..
-rwxr-xr-x 1 root root    52476 Oct 15 15:58 bootcode.bin

ls -al /srv/nfs/rpi5-pxe/bootcode.bin
-rwxr-xr-x 1 root root 52476 Oct 15 15:58 /srv/nfs/rpi5-pxe/bootcode.bin



Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 792
« Last Edit: October 22, 2025, 07:15:25 AM by patrikg »

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 313
Re: PXE Boot on Pi5
« Reply #4 on: October 22, 2025, 05:38:35 PM »
Thank you! I will look into that