Solved Installing FreeBSD 12.1 via PXE Encounters "LUA ERROR: Can not open /boot/lua/loader.lua: no such file or directory"


New Member

Messages: 1

Hello SMEs,

I have learned from a Pluralsight course on how to PXE install Linux Distributions, e.g. CentOS7.2. And I succeeded following the guideline of the course, i.e. by setting up a DHCP, TFTP server, and FTP server, then configure the pxelinux.0 file as needed. The process is pretty neat and clear.

However, my problem is: with the posts in this forum that I could refer to, I want to PXE install a FreeBSD in my Virtualbox. But it seems to have failed in its very last step, and I can't find any more posts that could help.

Background: using a CentOS Linux 7 as the PXE server, I want to install FreeBSD-12.1-RELEASE-amd64-bootonly.iso in my Virtualbox client (Version 6.1.6 r137129 (Qt5.6.2).

DHCP worked fine with below configuration(/etc/dhcp/dhcpd.conf):

subnet netmask {
  filename "pxelinux.0";

host master {
  hardware ethernet 08:00:27:BF:8A:1B;
  filename "pxefreebsd.0";
The subnet section is aimed at PXE installing Linux Distributions. Specifically, I want to install a FreeBSD for master.

NFS worked also fine with below configuration(/etc/exports):
After all these configurations, when I start the master, it goes into the below error:
LUA ERROR: Can not open /boot/lua/loader.lua: no such file or directory
(this error message was displayed on the screen during master boots, nearly no different compared to the below screenshot)

And after a long while of googling solutions, nothing worked.

Among those, two useful posts came and I tried.

I followed the two guides to change the FreeBSD release from 12.1 to 11.2, it gives a different error message, but almost the same as the last one:


I really need to know what is going on through this process. It seemed it has worked for an expert who wrote a post ten years ago, using FreeBSD 8 or so ( I followed his post):

Experts thank you for giving any suggestions. Best wishes.