I have tracked down the issue. Not sure whether this is a PR issue or not...
On 2013-06-06, at 11:18 AM, Polytropon wrote:
> On Thu, 6 Jun 2013 10:24:52 -0300, Andrew Hamilton-Wright wrote:
>>
>> Strangely, it seems that I cannot boot single user, either
>> using "boot -s" from the boot loader, or using the boot menu.
>> When I get to the point where the root filesystem is mounted,
>> it hangs right after printing the message:
>> Trying to mount root from ufs:/dev/ada0s1a
>
> Have you tried hitting the RETURN key several times?
[ ... ]
> It's important to identify if the system is _really_ hanging,
> or if the message "just isn't visible"...
This is indeed the crux of the issue. While hammering on the RETURN key did
not produce a prompt, it turns out that there was a prompt...
At some time in the relatively distant past, I had configured this machine to
allow display to a serial console (long since disconnected) by adding these
lines to /boot/loader.conf
boot_multicons="YES"
boot_serial="YES"
comconsole_speed="19200"
console="comconsole,vidconsole"
My notes say "These came from the serial console setup page, and do work for
vt100", however I did not note exactly which man page they came from,
unfortunately. I do not see these lines on syscons(4), sio(4) or dcons(4).
Similar lines are mentioned in the handbook regarding setting up a serial
console (there is no mention of single-user mode here):
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html
The issue, as it relates to single-user mode, is essentially this: if the
system is configured to boot with multi-console options, then when the single
user prompt is printed, it is only printed on the "second" console (which is
also the only valid source of keyboard input) -- in this case, the configured
but unattached serial port.
I'm not sure what the best strategy is here. Having only one console that is
accepting input for the single-user shell certainly makes sense. The question
is, which of potentially several consoles should it be?
IMO, it would be better/clearer if (for i386/amd64 anyway) the console was the
one associated with the motherboard-based keyboard and video card. An argument
here would be that the [CTRL]-[ALT]-[DEL] sequence is still valid when
associated with this keyboard, so it does seem odd that other input on that
device is ignored.
I can see arguments for other setups, also, mostly revolving around the "why
would you _have_ another console configured if you didn't need it, so the
configured console must therefore be the important one" -- though the FreeBSD
user base is certainly willing enough to experiment that I am sure I am not the
only person who set up multi-console for a "fun" project.
Perhaps the best strategy would be to add a message printed on all consoles (as
the rest of the boot information is) just before the prompt is printed (singly)
to let people know that this is happening? I'm not sure if a way to 100%
predict the desired console is possible.
Thoughts? If figure I will put a PR in, so that at least this is tracked, even
if we don't change anything. I will reference this thread in the PR, but if
anyone has input as to what to suggest, I would appreciate it. At the very
least, the handbook should get updated to indicate that this may happen.
Andrew.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"