# Dual console configuration?



## `Orum (Jan 26, 2020)

I'm trying to get a system set up to use a dual console at all times, i.e. to start showing output on the serial console as well as the video console from as early as possible until as late as possible/shutdown.  Reading through the handbook page on the topic has left me a little confused, as there are two configuration files they mention editing: /boot.config, and /boot/loader.conf.

My understanding is that to get the console on the serial port ASAP, I need to edit /boot.config to add -Dh -S[speed], but it sounds like once that stage of the boot process finishes, it's handed over to the loader which is governed by /boot/loader.conf.  This in turn appears to, by default, go back to a single console, selecting either the serial console or the video console depending on the presence of -h in /boot.config.  However, it looks like you can continue to use a dual console by setting console="comconsole,vidconsole" in /boot/loader.conf, and then the presence/absence of -h in  /boot.config is irrelevant.  Is my understanding correct, in that both files need to be present and edited accordingly?

Also, it's unclear if I need to set the speed again in /boot/loader.conf, if I've already set it in /boot.config.


----------



## Phishfry (Jan 26, 2020)

This is the critical line for dual console after loader:
/boot/loader.conf
console="comconsole,vidconsole"

For EFI installs it changes to:
console="comconsole,efi"

Speed is less relevant as it is baked into the kernel. at 115200 baud via 'BOOT_COMCONSOLE_SPEED' setting.
So unless you have a slower device connected it is not needed.

Checkout line 891 for BSDRP settings for dual console.








						BSDRP/BSDRP.nano at master · ocochard/BSDRP
					

BSD Router Project. Contribute to ocochard/BSDRP development by creating an account on GitHub.




					github.com
				




They mirror what the manual shows for boot.config


----------



## `Orum (Jan 26, 2020)

Phishfry said:


> This is the critical line for dual console after loader:


Okay, so I do need both configuration files edited.



Phishfry said:


> Speed is less relevant as it is baked into the kernel.


I don't want to bake this into the kernel as I don't want to have to recompile it every time I need to change the speed.  I'll set it in every config file, as I don't think it will hurt to put it in more than one place.


----------



## Phishfry (Jul 8, 2022)

Since this thread is not that old I thought I would update it.

On Minnowboard Turbot it was booting up Dual Console with Serial Console and HDMI was being ignored.

```
Dual Console: Serial Primary, Video Secondary
```
I tried the boot.config trick using -P to detect keyboard. That didn't work.
I had to edit my /boot/loader.conf entry.

```
boot_multicons="YES"
boot_serial="NO"
comconsole_speed="115200"
console="efi,comconsole"
```
So setting boot_serial="NO" allows dual console boot with VGA first.

```
Dual Console: Video Primary, Serial Secondary
```


----------

