#1026224 live-build: Option "-b netboot" fails on arm64 architecture

#1026224#5
Date:
2022-12-16 16:43:34 UTC
From:
To:
Dear Maintainer,

lb config -d bookworm --chroot-filesystem squashfs --apt-indices false
--cache-packages false --config
https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/bookworm-fvwm
--archive-areas "main contrib non-free" --apt-recommends false
--firmware-binary false --updates true --backports false --win32-loader
false --loadlin false --security false  --initsystem systemd  -b netboot
--bootappend-live toram live-config
lb build

run through on amd64 architecture, but fails with following error on
arm64:
[2022-12-15 02:11:12] lb binary_netboot
P: Begin building binary netboot image...
mv: cannot stat 'tftpboot': No such file or directory
E: An unexpected failure occurred, exiting...
P: Begin unmounting filesystems...
P: Saving caches...

Best Regards,
Juri Grabowski

#1026224#10
Date:
2024-02-07 20:15:53 UTC
From:
To:
Hi!

This simple patch fixes the issue. I tried opening an MR on Salsa but it
seems Salsa has some issues currently (going to the merge request page
after the push leads to an error 500-something).

Cheers,

Thomas Goirand (zigo)

diff --git a/scripts/build/binary_netboot b/scripts/build/binary_netboot
index c88bc6296..d74a118f2 100755
--- a/scripts/build/binary_netboot
+++ b/scripts/build/binary_netboot
@@ -50,6 +50,7 @@ ROOT_DIR=${LB_MODE}-live
  mv binary ${ROOT_DIR}

  mkdir binary.tmp
+mkdir -p tftpboot
  mv ${ROOT_DIR} tftpboot binary.tmp
  cd binary.tmp

#1026224#21
Date:
2024-11-04 14:51:30 UTC
From:
To:
Hello Juri, Thomas, Andi,

Finally, I've found some time to reproduce your case (using the current
git version of live-build).

I've reduced the command line options to a minimal set:

# Native build on amd64
lb config -d bookworm -b netboot

# Cross-build on arm64
lb config -d bookworm -b netboot --architecture arm64
--bootstrap-qemu-arch arm64 --bootstrap-qemu-static 
/usr/bin/qemu-aarch64-static

Notice the warning at the beginning:
[2024-11-03 22:39:37] lb config -d bookworm -b netboot --architecture
arm64 --bootstrap-qemu-arch arm64 --bootstrap-qemu-static
/usr/bin/qemu-aarch64-static
W: You have specified no bootloaders; I predict that you will experience
some problems!

For arm64 we currently don't activate any bootloader, while for amd64
the BIOS bootloader (syslinux) is defaulted.
If any bootloader is selected, the splash-screen is generated, which in
the case of netboot happens in the tfpboot directory.

I can force the issue without cross-building by disabling all bootloaders.

# You need to patch out the 'exit 1' in configuration.sh first
# Otherwise the fake value 'none' will be rejected
lb config -d bookworm -b netboot --bootloaders none

I haven't tried netbooting for live images yet, though the manual [1]
lists the HOWTO steps.

As for the proper fix, it depends on whether a netboot would require the
splash screen or not.
You are the experts, can you tell me?

With kind regards,
Roland Clobus

[1]
https://live-team.pages.debian.net/live-manual/html/live-manual/the-basics.en.html#236