Marek thanks for the "application tip" and for the solution to your problem :-)
The networking bootROMs take time to initialize, or maybe just to display their startup banner. In that vein, I wouldn't be surprised if the network stack gets skipped during Quick Boot for that one reason. As for the path to grub.cfg being relative in the client-side config... It's about security - your server-side placement of the exported TFTP directory (in the server's filesystem tree) is none of the TFTP client's business. It actually seems to be one particular effect of the --secure argument that you're passing to tftpd on startup: it makes its worker process actually chroot into the export directory = the server-side process serving your client cannot actually see outside the export directory (thinks it is serving the filesystem root dir). I wish you good luck and lots of fun on your job :-) Frank Date sent: Wed, 15 Oct 2025 11:08:06 +0200 To: <[email protected]> From: Marek Kozlowski <[email protected]> Subject: Remote grub.cfg - solved > :-) > > Something poorly documented in: > > https://www.gnu.org/software/grub/manual/grub/html_node/index.html > > and even worse in the documentation of your distro ;-) > > that may be useful for some of you, so I summarize my experiments > based on Andrei Borzenkov's proposal and help (thank you very much!). > > The goal: > > Approximately 200 workstations (in different classrooms) with several > systems, typically (Arch)Linux and Windows 10. We want to be able to > remotely decide if the default OS to be booted in a classroom is > Linux, Windows or sth else. Moreover for Linux we want to be able to > remotely change boot parameters. > > Solution: > > Install a simple TFTP server (let's say at: 172.16.1.1) and copy > grub.cfg for workstations to it. On workstations manually create the > grub.cfg as follows: > > insmod efinet > net_dhcp > source (tftp,172.16.1.1)grub.cfg > > The tips: > > 1. First check if it can properly initialize a NIC for a GRUB. As > described in a previous post, on my ThinkPad it requires two settings > in BIOS: in addition to "UEFI IPv4 Network Stack [x]" also the > "[Diagnostic]" mode for booting (I guess it's a bug): > > grub> insmod_efinet > grub> net_ls_cards > > 2. The "source" in the GRUB _shell_ downloads the file and runs it (I > set the "terminus-font" in grub.cfg and it changes) but it doesn't > automatically display a menu, while the above config does. Don't > worry. > > 3. I don't know why, but for the "source" command a relative name of > the grub.cfg must be specified. If the TFTP configuration is as > follows (tftp-hpa): > > $ cat /etc/conf.d/tftpd > TFTPD_ARGS="--secure /srv/tftp/ > > that means, the GRUB config file is: > > /srv/tftp/grub.cfg > > then: > > source (tftp,172.16.1.1)/srv/tftp/grub.cfg > > doesn't work, while: > > source (tftp,172.16.1.1)grub.cfg > > does. > > I hope the above comments may be useful, > best regards, > Marek > >
