# Need to change FreeBSD boot menu output from Serial to Video



## terminus (May 18, 2022)

Hi everyone!

I have a strange problem with my FreeBSD desktop. Somehow boot menu settings changed from "Cons: Video" to "Cons: Serial". Now I have to manually change this at every reboot. If I leave it as "Serial" my system is unable to start.
How can I permanently change this setting back to "Cons: Video"?
Looks like "console=" parameter in /boot/loader.conf is not correct answer.

My FreeBSD version is 12.3-RELEASE-p5


----------



## SirDice (May 18, 2022)

terminus said:


> If I leave it as "Serial" my system is unable to start.


It does start, it just doesn't show anything on the screen because it outputs the console to that serial port. That may appear as if it's not doing anything.


----------



## Geezer (May 18, 2022)

terminus said:


> How can I permanently change this setting back to "Cons: Video"?








						loader.conf
					






					www.freebsd.org


----------



## terminus (May 18, 2022)

Geezer said:


> loader.conf
> 
> 
> 
> ...



I already have studied this man page but I am unable to find correct solution 
As I told setting console= to "vidconsole" or "efi" is not enough.

There is one thing in loader.conf man page what confuses me.
How exactly loader determines state used during previous boot stage? Where he stores this information?


> During initialization, *loader* will    probe for a console and    set the
> _console_ variable, or set it to serial console ("comconsole") if the pre-
> vious boot    stage used that.


----------



## SirDice (May 18, 2022)

Old school boots use three stages, loader is the 3rd. 









						Chapter 14. The FreeBSD Booting Process
					

An introduction to the FreeBSD Booting Process, demonstrates how to customize the FreeBSD boot process, including everything that happens until the FreeBSD kernel has started, probed for devices, and started init




					docs.freebsd.org
				




But most of that went out the window with EFI boots. That just loads loader.efi directly, skipping the first and second stages.


----------



## terminus (May 19, 2022)

I was able to resolve this issue by updating my FreeBSD version from 12.3 to 13.1, and by updating UEFI loader to the new version.
Now I have new fancy boot menu with correct Console setting and new cool-looking Console 

My system installed in UEFI only mode. ada0p3 is GELI with ZFS on top of it:


> # gpart show ada0
> =>       40  468862048  ada0  GPT  (224G)
> 40     409600     1  efi  (200M)
> 409640       2008        - free -  (1.0M)
> ...



Update of UEFI loader after upgrade from 12.3 to 13.1:


> mount -t msdosfs /dev/ada0p1 /mnt
> cd /mnt/efi/boot
> mv ./BOOTx64.efi ./BOOTx64-old-12.3
> cp /boot/loader.efi ./BOOTx64.efi
> cd && umount /mnt && shutdown -r now



It would be nice if loader update also would be included (or at least documented) as part of "freebsd-update upgrade" procedure.


----------

