Bug 204969

Summary: geom_eli_passphrase_prompt does not recognize input via serial console
Product: Base System Reporter: tok
Component: binAssignee: freebsd-geom (Nobody) <geom>
Status: New ---    
Severity: Affects Some People CC: crest, crest, freebsd
Priority: ---    
Version: 10.2-STABLE   
Hardware: amd64   
OS: Any   

Description tok 2015-12-02 14:00:44 UTC
Situation: GELI disk encryption has been automatically set up by 10.2 installer. Therefore, geom_eli_passphrase_prompt ist set to true in /boot/loader.conf to show the new "early" pre-kernel GELI prompt ("GELI passphrase:").

However, when a serial comconsole is set up and the system is operated via serial console, the pre-kernel GELI passphrase prompt does not recognize any character input and therefore cannot be used to unlock the disk(s).


The serial console is configured via loader.conf:
boot_multicons="YES"
boot_serial="YES"
console="comconsole,vidconsole"

Direct input on video console works, so does any subsequent serial input after the GELI prompt.

Current workaround via serial is to disable geom_eli_passphrase_prompt in order to unlock the disk(s) when prompted after the kernel was loaded.
Comment 1 Jan Bramkamp 2015-12-02 14:08:09 UTC
Thy this loader.conf snippet instead:
# Enable both consoles
console="vidconsole,comconsole"
# Set baudrate
comconsole_speed="115200"
# Set serial port
# ttyu0 / COM1: 0x3F8 (default)
# ttyu1 / COM2: 0x2F8
# ttyu2 / COM3: 0x3E8
# ttyu3 / COM4: 0x2E8
comconsole_port="0x3E8"
Comment 2 tok 2015-12-02 15:01:42 UTC
(In reply to Jan Bramkamp from comment #1)
Jan, thank you for your reply. Unfortunately, your suggested parameters do not solve the problem.

I am not sure if it is a problem of the serial connection itself (regarding speed or port), at least I can see the bootstrap loader output, the "GELI Passphrase:" etc. The connection also works (sort of) bi-directional, because I can use boot options in beastie loader. However, e.g. reboot only works when pressing "4<Enter>", vs. only "4" on the direct console.

Interesting fact regarding the animated pre-kernel GELI prompt: On the direct console, each keystroke animates the bar (/-\|). Via serial, characters do not produce this animation, but only <Enter> does. Is this a hint?

The old/late (post-kernel load) GELI per-disk prompt can be used via serial without problems.
Comment 3 Michael Büker 2021-03-02 10:41:39 UTC
Has this ever been resolved?
Comment 4 crest 2021-03-02 13:43:11 UTC
It's working for me with IPMI serial over LAN, but I haven't used a real serial port for GELI in a while and a lot has changed since FreeBSD 10.2:
* full UEFI support
* GELI support in the old Forth based bootloader (not just an early prompt)
* Reimplementation of the bootloader in Lua (and C)

I think this bug report has been overcome by events, but similar problems are probably lurking in the shadows.
Comment 5 Michael Büker 2021-07-07 10:39:07 UTC
Quarterly reminder that this can be closed as Overcome by Events ;)