Bug 292595 - loader.conf.5: "console" setting does not document multi-value possiblity
Summary: loader.conf.5: "console" setting does not document multi-value possiblity
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Osipov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-20 10:27 UTC by Michael Osipov
Modified: 2026-02-05 08:57 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov freebsd_committer freebsd_triage 2026-01-20 10:27:53 UTC
Looking at "man 5 loader.conf" console gives the impression that only one console type can be set, but: ./man/loader.efi.8

$ grep -r -E '" ?console"' .
./common/console.c:     prefconsole = getenv("console");
./common/console.c:             unsetenv("console");            /* we want to replace this */
./common/console.c:             env_setenv("console", EV_VOLATILE, prefconsole, cons_set,
./common/metadata.c:    if (!strcmp(getenv("console"), "comconsole"))
./common/metadata.c:    if (!strcmp(getenv("console"), "nullconsole"))
./efi/loader/bootinfo.c:        console = getenv("console");
./efi/loader/main.c:            setenv("console", "efi,comconsole", 1);
./efi/loader/main.c:    setenv("console", "efi", 1);
./efi/loader/main.c:            setenv("console", "comconsole", 1);
./efi/loader/main.c:    if (strcmp(getenv("console"), "efi") == 0) {
./efi/loader/main.c:                            setenv("console", "comconsole", 1);
./efi/loader/main.c:                            setenv("console", "efi comconsole", 1);
./efi/loader/main.c:                            setenv("console", "comconsole efi", 1);
./efi/loader/main.c:    printf("   Console: %s (%#x)\n", getenv("console"), howto);
./forth/support.4th:    s" console" getenv
./forth/support.4th:                    taddr tlen s" console" setenv
./forth/support.4th:                            taddr swap s" console" setenv
./forth/support.4th:    caddr clen s" console" setenv           \ restore console setup
./forth/support.4th:    s" console" getenv dup -1 <> if
./forth/support.4th:    s" console" getenv
./i386/libi386/bootinfo.c:    string = next = strdup(getenv("console"));
./i386/libi386/comconsole.c:            cons = getenv("console");
./i386/loader/main.c:                   setenv("console", "comconsole vidconsole", 1);
./i386/loader/main.c:                   setenv("console", "vidconsole comconsole", 1);
./i386/loader/main.c:           setenv("console", "comconsole", 1);
./i386/loader/main.c:           setenv("console", "nullconsole", 1);
./lua/core.lua: local c = loader.getenv("console")
./lua/core.lua: local c = loader.getenv("console")
./lua/drawer.lua:       local console = loader.getenv("console")
./lua/drawer.lua:               loader.setenv("console", c)
./lua/drawer.lua:       loader.setenv("console", console)
./userboot/userboot/bootinfo.c:    string = next = strdup(getenv("console"));

$ grep -r -E '".console"' .
./forth/support.4th:    s" console" getenv
./forth/support.4th:                    taddr tlen s" console" setenv
./forth/support.4th:                            taddr swap s" console" setenv
./forth/support.4th:    caddr clen s" console" setenv           \ restore console setup
./forth/support.4th:    s" console" getenv dup -1 <> if
./forth/support.4th:    s" console" getenv

imply that both comma and space separation is supported:
$ grep -r console= --exclude-dir=contrib .
Binary file ./.git/objects/pack/pack-ea4b7946fd8dcbbfdf535a928cb659aac4fef470.pack matches
./cddl/usr.sbin/dwatch/dwatch:  )" -v want="$column" -v console="$CONSOLE" '
./cddl/usr.sbin/dwatch/dwatch:          -v console="$CONSOLE" \
./cddl/usr.sbin/dwatch/dwatch:                  -v console="$CONSOLE" \
./libexec/rc/rc.d/syscons:_sc_console=
./libexec/rc/rc.d/syscons:                              _sc_console="vt"
./libexec/rc/rc.d/syscons:                              _sc_console="syscons"
./release/tools/azure.conf:console="comconsole efi vidconsole"
./release/tools/gce.conf:console="comconsole,vidconsole"
./release/tools/openstack.conf: echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf
./release/tools/basic-ci.conf:console="comconsole,vidconsole"
./release/tools/basic-cloudinit.conf:console="comconsole,vidconsole"
./share/examples/bhyve/vmrun.sh:console=${DEFAULT_CONSOLE}
./share/examples/bhyve/vmrun.sh:                console=${OPTARG}
./share/examples/bhyve/vmrun.sh:                console_opt="-o console=${console}"
./share/man/man4/uart.4:.Dl hw.uart.console="io:0x2f8,br=115200"
./stand/defaults/loader.conf:#console="vidconsole"              # A comma separated list of console(s)
./stand/kboot/README:   -append "console=ttyS0"
./stand/kboot/README:   -append "console=ttyAMA0"
./tests/ci/tools/ci.conf:console="comconsole,vidconsole"
./tools/boot/full-test.sh:hw.uart.console="io:1016,br:115200"
./tools/boot/full-test.sh:          amd64) bin=x64 cons="console=ttyS0,115200" ;;
./tools/boot/full-test.sh:      -append "console=ttyAMA0" \\
./tools/test/stress2/misc/all.sh:console=/dev/console
./tools/test/stress2/misc/all.sh:{ console=/dev/null; kill -9 $pid; }
./tools/tools/nanobsd/pcengines/common.conf:  echo "console=\"comconsole\"" > boot/loader.conf
./tools/tools/nanobsd/rescue/common:#   echo "console=\"comconsole\"" > boot/loader.conf
./usr.sbin/bhyve/bhyve.8:bhyve -c 2 -s 0,hostbridge -s 1,virtio-blk,/my/image -o console=stdio \\

Manpage has to be changed. I struggled with this yesterday on a machine I wanted to access via Serial-over-LAN.
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2026-01-20 10:30:13 UTC
I can provide a review for this easily.
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-01-28 08:54:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=240c614d48cb0484bfe7876decdf6bbdcc99ba73

commit 240c614d48cb0484bfe7876decdf6bbdcc99ba73
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-23 20:26:24 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-01-28 08:53:52 +0000

    loader.conf.5: "console" setting does not document multi-value possiblity

    PR:             292595
    Approved by:    ziaee, dab, imp, tsoome
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D54843

 stand/defaults/loader.conf   | 2 +-
 stand/defaults/loader.conf.5 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-01-29 08:46:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=56970c3c4b0bc61d972837661a31cc2b9e8e8d7c

commit 56970c3c4b0bc61d972837661a31cc2b9e8e8d7c
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-28 09:02:33 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-01-29 08:44:45 +0000

    loader: Prefer comma-separated list of values for "console"

    PR:             292595
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54923

 release/tools/azure.conf     | 2 +-
 release/tools/openstack.conf | 2 +-
 stand/efi/loader/main.c      | 4 ++--
 stand/i386/loader/main.c     | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-01-31 17:30:12 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=39812c74519c3a3bfcc5d88247255acee5326dcf

commit 39812c74519c3a3bfcc5d88247255acee5326dcf
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-23 20:26:24 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-01-31 17:29:25 +0000

    loader.conf.5: "console" setting does not document multi-value possiblity

    PR:             292595
    Approved by:    ziaee, dab, imp, tsoome
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D54843

    (cherry picked from commit 240c614d48cb0484bfe7876decdf6bbdcc99ba73)

 stand/defaults/loader.conf   | 2 +-
 stand/defaults/loader.conf.5 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-01-31 17:31:13 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e58f90157c9b947c13e205fb0062411168fdab11

commit e58f90157c9b947c13e205fb0062411168fdab11
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-23 20:26:24 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-01-31 17:30:27 +0000

    loader.conf.5: "console" setting does not document multi-value possiblity

    PR:             292595
    Approved by:    ziaee, dab, imp, tsoome
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D54843

    (cherry picked from commit 240c614d48cb0484bfe7876decdf6bbdcc99ba73)

 stand/defaults/loader.conf   | 2 +-
 stand/defaults/loader.conf.5 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-01-31 17:35:14 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=c0053a940e27b1ed970316516647117050db6317

commit c0053a940e27b1ed970316516647117050db6317
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-23 20:26:24 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-01-31 17:32:32 +0000

    loader.conf.5: "console" setting does not document multi-value possiblity

    PR:             292595
    Approved by:    ziaee, dab, imp, tsoome
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D54843

    (cherry picked from commit 240c614d48cb0484bfe7876decdf6bbdcc99ba73)

 stand/defaults/loader.conf   | 2 +-
 stand/defaults/loader.conf.5 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2026-02-05 08:47:12 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8514035b0a6c3b17700eb8d37bb4f23c404dfb61

commit 8514035b0a6c3b17700eb8d37bb4f23c404dfb61
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-28 09:02:33 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-02-05 08:46:29 +0000

    loader: Prefer comma-separated list of values for "console"

    PR:             292595
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54923

    (cherry picked from commit 56970c3c4b0bc61d972837661a31cc2b9e8e8d7c)

 release/tools/azure.conf     | 2 +-
 release/tools/openstack.conf | 2 +-
 stand/efi/loader/main.c      | 4 ++--
 stand/i386/loader/main.c     | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-02-05 08:48:13 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=edde7a7a9313c0590d8a371d9336ae2cc7369e62

commit edde7a7a9313c0590d8a371d9336ae2cc7369e62
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-28 09:02:33 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-02-05 08:47:13 +0000

    loader: Prefer comma-separated list of values for "console"

    PR:             292595
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54923

    (cherry picked from commit 56970c3c4b0bc61d972837661a31cc2b9e8e8d7c)

 release/tools/azure.conf     | 2 +-
 release/tools/openstack.conf | 2 +-
 stand/efi/loader/main.c      | 4 ++--
 stand/i386/loader/main.c     | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2026-02-05 08:57:14 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=93fbf353b62c02cebd42e08e1ed97225fe526447

commit 93fbf353b62c02cebd42e08e1ed97225fe526447
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2026-01-28 09:02:33 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-02-05 08:55:28 +0000

    loader: Prefer comma-separated list of values for "console"

    PR:             292595
    Reviewed by:    imp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D54923

    (cherry picked from commit 56970c3c4b0bc61d972837661a31cc2b9e8e8d7c)

 release/tools/azure.conf     | 2 +-
 release/tools/openstack.conf | 2 +-
 stand/efi/loader/main.c      | 4 ++--
 stand/i386/loader/main.c     | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)