# headless console USB-to-USB



## fwabi9 (May 12, 2019)

Hi all,

I use an HP Pavilion laptop without screen (torn off) as a headless home server.
I access it either on the console, plugging in an external VGA monitor, or via ssh.
Lately I got locked out because: 1. i915kms was deprecated and blacklisted in /boot/loader.conf, 2. I messed up with pf.conf.
Which got me thinking:

  would it be possible to connect another PC to one of the USB ports and access the console ?

I read about a few potential trails (1), and suspect it might be possible to use 2 USB-to-Serial cables + 1 Null-modem, as USB-Serial-NullCable-Serial-USB. I would be interested to hear about experiences with such a setup.

Cheers

(1)








						Chapter 27. USB Device Mode / USB OTG
					

This chapter covers the use of USB Device Mode and USB On The Go (USB OTG) in FreeBSD




					www.freebsd.org
				











						Chapter 28. Serial Communications
					

This chapter covers some of the ways serial communications can be used on FreeBSD




					www.freebsd.org
				







__





						3.12. Advanced Installation Guide
					





					docs.freebsd.org


----------



## D-FENS (May 12, 2019)

Theoretically you should be able to boot in single user mode and attach the VGA monitor, or boot from an installation USB device or CD-ROM. Have you tried that?


----------



## fwabi9 (May 12, 2019)

roccobaroccoSC thanks for your suggestions.



> boot in single user mode and attach the VGA monitor


 how can I do that without any monitor and thus without seeing anything ?


> boot from an installation USB device


 I tried that with a modified memstick installer: enabling i915kms in /boot/loader.conf which failed. I wasn't aware that the module was blacklisted, so at this point I removed the hard drive and mounted it to another host. I agree this should work though if I'd override module_blacklist or install the i915kms package and  and enable it in /etc/rc.conf in the installer. BTW I did exactly that afterwards on the headless server and it works. But I'm missing early boot messages.

I'm not sure these workarounds would help me solving ZFS issues at boot though, or debug my pf rules live.


----------



## D-FENS (May 13, 2019)

When the computer starts, there is the boot menu. Try to restart it and press 3 .. 3 .. 3 .. 3 .. 3. At some point you should be somewhere in the boot menu. The VGA monitor should be showing some kind of signal.
Press Backspace to clear the unnecessary 3-s and then type "boot -s".
Sorry, it's quite a tricky situation.

Also, there is another workaround but it requires meddling with the hardware.
Unscrew your hard disk and insert it into another machine. Then boot from a rescue/install medium, mount the HDD and modify your loader.conf.


----------



## fwabi9 (Jul 2, 2019)

Answering my own question: yes, connect to the  freebsd server console via USB is definitely possible using a serial console. I'm using 2 Prolific PL2303 cables and a null modem in between.


----------

