Bug 291048 - FAQs 6.3 gives incorrect instructions for booting into single user mode
Summary: FAQs 6.3 gives incorrect instructions for booting into single user mode
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
URL: https://docs.freebsd.org/en/books/faq...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-16 21:43 UTC by B.S.
Modified: 2025-11-18 09:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description B.S. 2025-11-16 21:43:18 UTC
To reset a forgotten root password, according to the FAQs:
https://docs.freebsd.org/en/books/faq/#forgot-root-pw
https://github.com/freebsd/freebsd-doc/blob/main/documentation/content/en/books/faq/_index.adoc?plain=1

> Restart the system, type `boot -s` at the `Boot:` prompt
> to enter single-user mode.
> At the question about the shell to use, hit kbd:[Enter]
> which will display a # prompt.
> ...

However, nowadays restarting the system should not present the user with a `Boot:` prompt?

Rather than instructing the user on how to reach a prompt where they can use `boot -s`, surely it would be better to give similar instructions to the Handbook for entering single-user mode:

https://docs.freebsd.org/en/books/handbook/basics/#consoles-singleuser
https://github.com/freebsd/freebsd-doc/blob/main/documentation/content/en/books/handbook/basics/_index.adoc?plain=1

> The FreeBSD boot menu provides an option labelled as "Boot Single User".
> If this option is selected, the system will boot into a special mode
> known as "single user mode".
> This mode is typically used to repair a system that will not boot or to 
> reset the `root` password when it is not known.

Arguably a technical how-to like "How to reset a forgotten root password?" belongs in the Handbook not FAQs anyway, to avoid duplication and ensure its content is more likely to be reviewed for staleness. Perhaps this and much else of FAQs Section 6 ("Miscellaneous Questions") should simply be removed. But while the Handbook does mention booting into single-user mode is often done to reset a root password, it doesn't specify the complete procedure for doing so - this suggests some FAQ content may be worth moving into the Handbook.

Otherwise, the incorrect information in the FAQs about a `Boot:` prompt should be replaced by something like:

> Restart the system and select "Boot Single User" in the FreeBSD boot menu
> to enter single-user mode.
> At the question about the shell to use, hit kbd:[Enter]
> which will display a # prompt.
> ...
Comment 1 Graham Perrin 2025-11-17 01:51:28 UTC
Thanks. 

<https://old.reddit.com/r/freebsd/comments/1manjj4/boot_prompt/n76nf0s/?context=1> might help to put boot -s in context.  

>> I stumbled into a lowercase boot: prompt, at which 
>> boot -s is not recognised. 
>> 
>> Is boot: different from Boot: (uppercase B)?
>>
>> (Screenshot provided.)
> 
> That's boot2. It's not where you want to boot single user from. 
> It's what loads /boot/loader which gives a menu. From there, hit 
> escape and type boot -s at the ok prompt... all boot2 knows is how to 
> load /boot/loader, the kernel 20 years ago lost the ability to boot 
> from boot2... it's path syntax is super weird..
Comment 2 Graham Perrin 2025-11-17 02:05:18 UTC
Re: comment 0

A possible complication – I don't know whether this is a bug, or something is not yet documented. Abstracted from <https://www.reddit.com/r/freebsd/comments/1oyok37/bsdconfig_vt_keymap/>: 

- when booting up to single user mode, the vt key map seems to be wrong for 
  (at least) uk.kbd for a United Kingdom keyboard.

Keying # results in
       \ 
       and so on. 

Not reproducible when dropping down from multi-user mode to single user mode, however if (for example) the operator has forgotten the password, then the operator can not login to run: 

    shutdown now
Comment 3 B.S. 2025-11-17 02:46:18 UTC
(In reply to Graham Perrin from comment #2)
I can reproduce this. Fortunately the given commands can still be typed as normal on a UK keyboard after booting into single-user mode. While several special (i.e. non-alphanumeric) characters like "£" and #" would be affected, "/" and "-" are fine:

> mount -urw /
> mount -a
> passwd root
> exit

Also unaffected is ";" which appears in the suggested variant
> mount /dev/ada0p1 /mnt; chroot /mnt`

But this all results in an insidious problem - typing these commands gives no indication of a different keymap, and passwords are not echoed, so anyone who includes an affected special character as part of their new root password may be mystified that it doesn't work once they return to multi-user mode, even though they press exactly the same keys!!

Keyboards designed for other languages will pose their own challenges here but at least in some cases the issue might be more obvious.

This behavior clearly deserves to be documented as part of the "resetting a forgotten root password" procedure.
Comment 4 B.S. 2025-11-17 03:29:41 UTC
Separate to the single-user issue but worth considering in any rewrite:

> Run `passwd root` to change the `root` password
> then run man:exit[1] to continue booting.

Is there a reason to recommend typing `passwd root` rather than just `passwd`? Specifying user is optional here, see passwd(1):

https://man.freebsd.org/cgi/man.cgi?query=passwd&sektion=1

Perhaps `passwd root` is better "defensive documentation" in that it makes it very clear to the reader which password is being changed. There's likely a non-zero number of readers arriving here via search engine after forgetting their *regular* user password and only skim-reading the section for commands to type...

Also, would "man:exit[1]" be better as "`exit`"? The latter formatting is more consistent with the previous commands and makes it more obvious `exit` needs to be typed. There's nothing obviously relevant for the reader in the man page for shell built-ins that the former links to, while the more relevant passwd(1) and mount(8) were not linked:

https://man.freebsd.org/cgi/man.cgi?query=exit&sektion=1
Comment 5 Graham Perrin 2025-11-18 09:12:22 UTC
> would "man:exit[1]" be better as "`exit`"? 

Yes. Don't make things unnecessarily verbose or complicated :-)

<https://people.freebsd.org/~grahamperrin/style/writing/tips/>

> Perhaps `passwd root` is better "defensive documentation" …

It's a useful hint that a username can be specified.