Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Can't get serial console working on 2.6.0, tried the usual.

    Scheduled Pinned Locked Moved Hardware
    10 Posts 3 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      august125
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • jimpJ jimp moved this topic from Problems Installing or Upgrading pfSense Software on
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        What com port does the BIOS show it's using for serial redircet?

        pfSense uses com1 (cuau0/ttyu0) by default.

        Steve

        A 1 Reply Last reply Reply Quote 0
        • A
          august125 @stephenw10
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            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

            A bingo600B 2 Replies Last reply Reply Quote 0
            • A
              august125 @stephenw10
              last edited by

              @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
              
              
              1 Reply Last reply Reply Quote 0
              • bingo600B
                bingo600 @stephenw10
                last edited by

                @stephenw10

                Just played a little as admin (ssh)
                Have no idea of this is any help

                 dmesg | 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

                If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                pfSense+ 23.05.1 (ZFS)

                QOTOM-Q355G4 Quad Lan.
                CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

                A 1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  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

                  1 Reply Last reply Reply Quote 0
                  • A
                    august125 @bingo600
                    last edited by

                    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.

                    pfSense_splash-bad.png

                    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.

                    1 Reply Last reply Reply Quote 1
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      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

                      A 1 Reply Last reply Reply Quote 1
                      • A
                        august125 @stephenw10
                        last edited by

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.