Bug 287538 - Installer error on setting regdomain
Summary: Installer error on setting regdomain
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 14.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Bjoern A. Zeeb
URL:
Keywords:
Depends on:
Blocks: PRs, net80211
  Show dependency tree / graph
 
Reported: 2025-06-14 13:51 UTC by Tom Weustink
Modified: 2025-07-22 13:46 UTC (History)
6 users (show)

See Also:
bz: mfc-stable14+


Attachments
Photo from the adapter (184.96 KB, image/jpeg)
2025-06-14 14:07 UTC, Tom Weustink
no flags Details
Photo from the error message (131.35 KB, image/jpeg)
2025-06-14 14:07 UTC, Tom Weustink
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Weustink 2025-06-14 13:51:33 UTC
Trying to install 14.3-RELEASE on my laptop using a USB Realtek 802.11ac WLAN Adapter, and setting regdomain fails.

Error while applying chosen (unknown regdomain Expected
eval: Use: not found

First I thought this might be an issue with NL (my country, Netherlands) but after ignoring and continuing, selecting my SSID (which is finds fine) it can't retrieve a DHCP address (no clue if that is related to regdomain).

So, I restarting and just used the default (US) but is gives the same error.
Comment 1 Tom Weustink 2025-06-14 14:07:04 UTC
Created attachment 261261 [details]
Photo from the adapter
Comment 2 Tom Weustink 2025-06-14 14:07:31 UTC
Created attachment 261262 [details]
Photo from the error message
Comment 3 Amedeo Trotta 2025-06-21 15:26:26 UTC
I have encountered the same problem, although I'm installing on a laptop using iwlwifi and trying to set UK as the region.
Comment 4 ykla 2025-06-23 22:08:50 UTC
Actually, selecting any option will result in an error. This is not related to any specific option. The code here might be written incorrectly.

-------
Error while applying chosen settings  
(unknown regdomain Expected  
eval: Use: not found)
---------
Comment 5 ykla 2025-06-23 22:29:01 UTC
There are only two commits for the script main/usr.sbin/bsdinstall/scripts/wlanconfig that caused the issue: [https://reviews.freebsd.org/D47491](https://reviews.freebsd.org/D47491) and [https://reviews.freebsd.org/D45271](https://reviews.freebsd.org/D45271). I am not sure which one it is.
Comment 6 Bjoern A. Zeeb freebsd_committer freebsd_triage 2025-07-02 23:28:56 UTC
(In reply to ykla from comment #5)

The problem is likely in the wlanlist script and in neither of the two reviews you quoted.

My best guess is that it's a parse bug when a country name on that line as a space in it but that's a wild guess.

So random question: what happens if people in Europe choose DE?
Comment 7 ykla 2025-07-03 03:19:15 UTC
(In reply to Bjoern A. Zeeb from comment #6)
I randomly tested several countries and regions, including the DE you mentioned. The error was the same in all cases.
Comment 8 Mark Phillips freebsd_triage 2025-07-03 09:26:06 UTC
I can confirm the same folks. Tried lots of different countries at random, all the same error.
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-07-15 18:06:13 UTC
A commit in branch main references this bug:

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

commit 5a1e2927d63ed6394b767088eb2d66676f275467
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-07-14 18:32:53 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-07-15 17:53:21 +0000

    bsdinstall: wlanconfig: properly format regdomain dialog input

    Without the extra '\n' the dual-column ('REGD' '') are not properly
    separated for dialog which leads to an [misleading] error hidden on
    the command line:
            Error: --menu bad arguments items number.
    [Writing this I wonder why the dual-column input is needed].

    It is still unclear as to where the error message quoted in PR287538
    suddenly came from for 14.3-RELEASE given the code was broken since 2016
    (or noone ever noticed or reported).

    Looking at manual ifconfig output:
        ifconfig wlan0 country GB regdomain Expected
        -> ifconfig: unknown regdomain Expected
    and "ifconfig: " gets stripped by the script, which means the regdomain
    variable would have to be set to "Expected" or more likely to
    "Expected eval: Use: not found" which looks like a concatination of
    errors.

    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
    Fixes:          95ee591e83a91
    PR:             287538
    Reviewed by:    emaste, thj
    Differential Revision: https://reviews.freebsd.org/D51313

 usr.sbin/bsdinstall/scripts/wlanconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 10 ykla 2025-07-16 02:24:05 UTC
(In reply to Bjoern A. Zeeb from comment #6)
I can confirm that this dialog box works correctly in 14.2-RELEASE.
Comment 11 commit-hook freebsd_committer freebsd_triage 2025-07-22 13:36:58 UTC
A commit in branch stable/14 references this bug:

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

commit a94dd3955a9f7ae51da152c31a4565c1a040c83c
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-07-14 18:32:53 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-07-22 08:21:46 +0000

    bsdinstall: wlanconfig: properly format regdomain dialog input

    Without the extra '\n' the dual-column ('REGD' '') are not properly
    separated for dialog which leads to an [misleading] error hidden on
    the command line:
            Error: --menu bad arguments items number.
    [Writing this I wonder why the dual-column input is needed].

    It is still unclear as to where the error message quoted in PR287538
    suddenly came from for 14.3-RELEASE given the code was broken since 2016
    (or noone ever noticed or reported).

    Looking at manual ifconfig output:
        ifconfig wlan0 country GB regdomain Expected
        -> ifconfig: unknown regdomain Expected
    and "ifconfig: " gets stripped by the script, which means the regdomain
    variable would have to be set to "Expected" or more likely to
    "Expected eval: Use: not found" which looks like a concatination of
    errors.

    Sponsored by:   The FreeBSD Foundation
    Fixes:          95ee591e83a91
    PR:             287538
    Reviewed by:    emaste, thj
    Differential Revision: https://reviews.freebsd.org/D51313

    (cherry picked from commit 5a1e2927d63ed6394b767088eb2d66676f275467)

 usr.sbin/bsdinstall/scripts/wlanconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 12 Bjoern A. Zeeb freebsd_committer freebsd_triage 2025-07-22 13:46:38 UTC
While the problem is fixed it will not help any 14.3-REL install media.
The next snapshot images for stable/14 should be usable again however.

I believe it should be possible to skip over the wifi installation and then configure it manually or otherwise after the reboot (unless you have no other means to get firmware onto the device).

As a last resort one could in-place edit the memstick image before writing the installer image to disk/flash.

If someone is entirely stuck and desperately needs a 14.3 solution please drop me an email to bz@ before the end of the month.