How to capture an OpenBSD install console

consoleopenbsd

So.. How can I save the text that is based on Q/A's when installing an OpenBSD 5.3? Or I only have the choice to manually type the texts down? or an OCR software using printscreens?

Best Answer

One often-overlooked easy way is to do the install over a serial port. That assumes the machine has a serial port, which is not always the case.

I know, you will say "but my machine doesn't do a serial port console". That doesn't matter. There are two ways to tell OpenBSD to use a serial console, the first, most useful in doing a fresh install from a CD is to use the boot loader:

>> OpenBSD/amd64 BOOT 3.23
boot> stty com0 9600

com0: 9600 baud
boot> set tty com0
switching console to com0
>> OpenBSD/amd64 BOOT 3.23
boot> boot

The second is to put these same parameters in /etc/boot.conf.

# cat /etc/boot.conf
stty com0 9600
set tty com0

Then you can just log your terminal to a file, or cut and paste from putty, etc. I have some machines that "don't do serial consoles" booting this way, and unless there is a boot failure on the BIOS level, it works great.

If you are using tip, you can start recording a session by setting the variable script. You set a variable in tip by issuing ~ s.

kellogg# tip tty03
connected
~[set] script

The default file name is tip.record. You can change that name by setting the record variable. The default recording includes non-printable characters, you can stop tip from doing that by setting the beautify variable.

You can also create a .tiprc file in your home directory to set these variables for you on any tip session.

set script
set beautify
set record=/tmp/tip.txt
Related Question