No serial port - Console Access using USB?

Started by Lantern5, August 06, 2024, 03:39:42 AM

Previous topic - Next topic
I meant USB working at the OS level before it fully boots up. The Opnsense image for serial install provides output over serial while reading off a USB storage device? That would mean both serial and USB are recognised by the installer?

Would the serial image be able to provide console output to serial during boot up after I complete the full installation? Or is it limited to the install process only?

Quote from: Lantern5 on August 28, 2024, 11:16:50 PM
I meant USB working at the OS level before it fully boots up. The Opnsense image for serial install provides output over serial while reading off a USB storage device? That would mean both serial and USB are recognised by the installer?

Would the serial image be able to provide console output to serial during boot up after I complete the full installation? Or is it limited to the install process only?

If this will not work, I'll have to install a physical serial port. Bit the problem is that the spare port on the rear panel is taken up by the second NIC and I'll have to rig an extension cable and install the serial port outside the case.

I have attached a photo of the com port header can someone tell me what type of connector it is?


Quote from: Lantern5 on August 28, 2024, 11:16:50 PM
Would the serial image be able to provide console output to serial during boot up after I complete the full installation?
Over a regular serial port, definitely. Don't know about USB serial, I don't use that myself.

As for the connector: nothing in the mainboard manual?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Late to the party but just to be clear: an USB serial port is a serial port presented via US-Bus. It's a device you typically plug into an USB port. Anything that isn't an USB port is not an USB serial. The exception to this rule is that some manufacturers (like Deciso) use a serial port that is only externally presenting USB, but not internally wired as a plain serial port (like shown in the picture).


Cheers,
Franco

This thread is specifically about adding a USB to serial converter to the OPNsense host to use as the console device. See first post. Open question is if it's possible to interact with the boot loader and watch kernel messages that way before configd (?) starts the getty process for login.

Do you happen to know, Franco?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I was mostly commenting on the picture shown...

If we talk USB to serial with USB being plugged into OPNsense and the serial end somewhere else ti view the OPNsense thing:

I don't exactly know.

Checking src.git/stand/usb however, it looks like the (later) boot code could be capable of attaching USB devices similar to ZFS being bootable from there. So in theory it should be possible to see the boot menu at least and all the kernel messages during boot given that the serial console is the primary console.


Cheers,
Franco

Quote from: Lantern5 on August 29, 2024, 12:44:58 AM
I have attached a photo of the com port header can someone tell me what type of connector it is?

Well, looks like 14 pin.  ;D Would need something similar to this, or DIY... https://www.amazon.com/PNGKNYOCN-Serial-Motherboard-Header-Cable%EF%BC%881-8m/dp/B0BGQ96LX5

True story: a user was once asking in IRC why his serial console was wonky. When he finally showed me a picture you could see the bare minimum of actual loose wires dangling from the mainboard into a serial connector matching end "attached" to it. After buying a proper shielded cable the problem was obviously gone he later reported.


Cheers,
Frnaco

The picture - perhaps something like ARM JTAG-14. Motherboard manual for pinout description would be useful.

Quote from: franco on August 29, 2024, 08:22:57 AM
I was mostly commenting on the picture shown...

If we talk USB to serial with USB being plugged into OPNsense and the serial end somewhere else ti view the OPNsense

Two USB-Serial cables connected to each other, so USB at either end, and it works well. Console becomes available
after the login message appears on screen. Would it be possible to get console before the login screen appears so I can view the boot up messages for troubleshooting.

Yeah but you still have a serial converter in there twice ;)

And:

Quote from: franco on August 29, 2024, 08:22:57 AM
So in theory it should be possible to see the boot menu at least and all the kernel messages during boot given that the serial console is the primary console.


Cheers,
Franco

Does EFI support USB serial devices inside it's firmware? That might be the only way I could see a USB serial device working before the OS loads all of the appropriate "stuff" to talk on the interface.

*Update in case someone else has a similar requirement.*

It turns out that the Lenovo M900 Tiny PC I am using is capable of Intel AMT, which provides remote manageability at the BIOS level. After enabling the feature in BIOS, I am able to manage the device using opensource software called Mesh Commander.

The caveat is that Intel AMT works only with Intel 'LM' series NICs which is usually the onobard NIC on these little corporate PCs.

Thanks for your responses everyone.