Can't get serial console working on 2.6.0, tried the usual.
-
Hi all,
I'm trying to set up pfSense on a new build with an ASRock Rack C236 WS motherboard and can't get a working serial console after the system is booted, either booting off a flash drive or off of the completed installation I did using the VGA console.
I know my serial connection is good because I have console redirection throughout the boot process, from POST through the pfSense boot options menu. After pfSense begins booting however, output disappears and appears only on the VGA console. Keyboard input does not work either. This happens regardless of whether I have the console set to Serial or Dual (Serial Primary) in the boot options.
I have made sure I am using 115200/8/N/1 in PuTTY, I have tried a different null modem cable, I double checked that I am using the memstick-serial image, and I have tried disabling the BIOS' serial console redirection in case it was interfering with pfSense. Nothing I do will get any console output out of pfSense.
Does anyone have any ideas what else I could try? I really would like to run this firewall headless with serial console access for emergencies.
-
J jimp moved this topic from Problems Installing or Upgrading pfSense Software on
-
What com port does the BIOS show it's using for serial redircet?
pfSense uses com1 (cuau0/ttyu0) by default.
Steve
-
@stephenw10 BIOS shows COM1, but setting BIOS redirection to turn off after POST or turning it off completely didn't get any output out of pfSense.
-
Like you see no output at all if redirection is disabled?
That implies pfSense is not the comport at all and it was all redirected. Did the bios have 'redircet after boot' enabled?
Steve
-
@stephenw10 That's exactly right, pfSense does not seem to be on the com port at all, the only console output I have is from BIOS redirection. Under the console redirection settings in the BIOS I currently have "Redirection After BIOS POST" set to "BootLoader" instead of "Always Enable."
The only other options I see in the BIOS for serial are to enable it or disable it (it is enabled of course) or to set the address to "2F8h/IRQ3" vs "2E8h/IRQ3."
I am booting UEFI if that is relevant. My /etc/ttys looks like this:
console none unknown off secure ttyv0 "/usr/libexec/getty al.Pc" xterm onifexists secure ttyu0 "/usr/libexec/getty al.3wire" vt100 onifconsole secure ttyu1 "/usr/libexec/getty al.3wire" vt100 onifconsole secure ttyu2 "/usr/libexec/getty al.3wire" vt100 onifconsole secure ttyu3 "/usr/libexec/getty al.3wire" vt100 onifconsole secure xc0 "/usr/libexec/getty al.Pc" xterm onifexists secure
-
Just played a little as admin (ssh)
Have no idea of this is any helpdmesg | grep -i cons uart0: console (115200,n,8,1) Dual Console: Serial Primary, Video Secondary
dmesg | grep -i uart uart0: <16950 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (115200,n,8,1) uart1: <16950 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
I can't redirect uart as "Bios" console on this model (bios vers).
But i have a working pfSense console, after boot/Bingo
-
Mmm, my first guess here would be that the com port is at a non-standard address.
Check the boot log.
Check /boot/loader.conf and /boot/loader.conf.local (if you have that).
Steve
-
I figured it out. @bingo600 helped get me pointed in the right direction. After running those same grep commands, dmesg did not display any lines for uart0. This helped me realize that while they are on the same physical port, the motherboard seems to reserve COM0 for console redirection no matter what, with COM2 (0x2f8) or COM4 (0x2e8) presented to the operating system depending on whether "2F8h/IRQ3" or "2E8h/IRQ3" is selected in the BIOS, regardless of whether console redirection is enabled.
After some research I was able to figure out that I could change the COM port to COM2 on by pressing 3 at the "Welcome to pfSense" screen to escape to the loader prompt and entering:
set comconsole_port=0x2f8 set hint.uart.0.flags=0x0 set hint.uart.1.flags=0x10
I decided to do a fresh installation with this knowledge. After the installation was finished I opened a shell in the new installation and put those same parameters in /boot/loader.conf.local to make them permanent.
echo 'comconsole_port="0x2f8"' >> /boot/loader.conf.local echo 'hint.uart.0.flags=0x0' >> /boot/loader.conf.local echo 'hint.uart.1.flags=0x10' >> /boot/loader.conf.local
The only problem remaining now is that every character and input on the "Welcome to pfSense" screen is duplicated because the motherboard is redirecting the output to the serial port at the same time pfSense is using the serial port itself.
I was hoping there would be a way to only open the serial port once the system begins actually booting but I couldn't find one. At least I have a working system.
-
You can probably disable 'Redirection After BIOS POST' in the BIOS to prevent that but it's quite common to see and usually doesn't present much of an issue.
Steve
-
@stephenw10 Thanks, good to know it's somewhat normal. I tried that but unfortunately it didn't seem to have an effect. I guess I can either live with it or turn of BIOS redirection, unless anyone has any particularly clever ideas.