Changing the console resolution in FreeBSD 12 with UEFI boot
There are many pages on the Web that explain how to change the console
resolution in the FreeBSD boot process, either for BIOS or UEFI boot.
All of them generally agree that the way to do it is to put a line
mode X or, more recently for
gop set X.
With FreeBSD 12, all of that went out the window.
FreeBSD 12 now defaults to the “Lua loader”, that is, the last stage of the boot process is now implemented in Lua rather than Forth. I’m not sure why, but probably because Lua is just the embedded language all the cool kids are using these days.
The thing is, while the manpages on loader(8) and related topics
confidently imply that
loader.rc.local is a platform-independent
source of configuration data, in reality it is
The simplest way to work around the issue is to switch back to the Forth-based loader:
cd /boot ln -f loader_4th.efi loader.efi
This will restore
loader.rc.local to its former glory, i.e. it will
be read and applied.
Do not, as I just did, try to
cp loader_4th.efi loader.efi;
cp overwrites existing destination files and it just so happens that
loader_lua.efi (a hard link), so the
will overwrite the Lua loader with the Forth one.
The alternative is to replace
loader.rc.local with its newfangled
cd /boot/lua cat >local.lua <<<EOF loader.perform("whatever you want") EOF
Put your preferred loader command inside the quotes; if you want to
run multiple commands, each needs its own
loader.perform() call, I
By the way, even though
gop set X works for me on the loader command
line, it does not work in either
mode X command works everywhere.