-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFi Country Code confusion during IIAB installation [IIAB should check for mismatched kernel e.g. if apt updates were applied w/o reboot] #2975
Comments
Not Everyone is running Raspberry Pi OS, but as of today WiFi Country Code is commonly specified in these 4 ways:
It appears we need to sort out how these 4 techniques depend on each other. |
One could very easily test the theory of not using raspi-config contributes to the above mentioned failure, just write the image to the sdcard and proceed directly to the curl stage of the install if you really want to get to the bottom of this issue. I've sorted out the interrelationships, you need to teach yourself what goes where, all the information has been recorded in the various PRs/issues over time. Now you could explain to me what your understanding is and I'll try to clear the fog for you. |
Yes I install OS images to microSD card and then immediately use IIAB's 1-line installer at download.iiab.io very frequently, without problems. Which is why I'd like to start by hearing out others' failures first and foremost. Understanding precise scenarios that are failing. Understanding precisely what steps are being taken. Steps that are (apparently) a bit outside the mainstream — but yet are repeatedly causing quite severe frustration — even among US installations, where Hopefully @darkenvy has time to explain before weekend, or soon! |
Small points:
|
I'm just suggesting trying to duplicate part of darkenvy's environment, from what I see as being something different from your usual test routine. All I picked up on was the stanza that noted the absence of country_code from wpa_supplicant.conf from http://sprunge.us/BMaNQl?en with the other half of the problem environment being the use of a serial console.
Next are the actions to undo the 'out of the box disablement', note 'changed'
Normally these entries are not viewable in a successful install within iiab-diagnostics as the iiab-install.log is only shown with the last 100 lines and might not be shown. Might want to bump that while this is being investigated. The test subject that was used for the go/no_go fate of 2379 never really reported any useful information on the state of the above stanza, just conjecture without being able to review. A pastebin link to the iiab-install.log would be helpful here. |
I've installed IIAB many times in the past without setting a country code as well. I omit the step specifically because it is the default state of raspbian/raspberryos and we should replicate the steps of the uninformed. Anyways here are various install tests and the results. All of these tests are after the 2973 merge. I was able to install IIAB BEFORE the merge successfully. RaspberryOS + user: pi + Serial + Unset Lang Locale + Unset WiFi Locale + Size 0 = Failed on "Restart hostapd" RaspberryOS + user: pi + Ethernet SSH + Unset Lang Locale + Unset WiFi Locale +Size 0 = Failed on "Restart hostapd" RaspberryOS + user: pi + Serial + Unset Lang Locale + Set WiFi Locale + Size 0 = Success! PS: Im setting Lang locale and WiFi locale from Its strange because there is specifically a task called "Put country code (US) in /etc/wpa_supplicant/wpa_supplicant.conf if nec" and it is successful. Does this task do the same as "WLAN Country" setting in |
@darkenvy I just ran
CLARIF: I did NOT set a country code (using raspi-config, or in any other way). I simply installed IIAB onto the fresh/clean OS. What else should I try? Feel free to log in to my Raspberry Pi 4 (10.8.0.58) in case mine might somehow be different from yours!? |
Raspberry Pi OS Lite as above written, apt updated, rebooted:
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $
I'll continue post install. |
@darkenvy call me crazy, but can I ask you to install IIAB using a different ISP — e.g. your cellphone's hotspot — to eliminate any Country Code monkey-business possibly caused by your CenturyLink router? |
From: 21Mxm5?en above, noted the trigger for missing country code did fire with hostapd not failing to start as shown below:
Magic question is why are there intermittent failures with what appears to be the same routine. I hope to know more in a bit when my test install finishes. For @darkenvy, when hostapd does fail to start, before rebooting can you post the output of |
Well that was a bust, I can't reproduce a failure at restarting hostapd http://sprunge.us/YP0cBD pi@raspberrypi:~ $
|
@darkenvy outside of your home, others have not been able to reproduce these IIAB install failures. Which begs the question: Do you have an old laptop kicking around, ideally one where Linux AP mode works (for hostapd) — and if so can you reproduce your IIAB install failures on that one too? (e.g. if you install Debian 11 or any recent version of Ubuntu onto that laptop!) And if all fails...sell the 🏠 ! |
@darkenvy Another thing you could try is this... Connect a freshly-installed RaspiOS to your CenturyLink router (via Ethernet) that has never before connected to the Internet using CenturyLink. Then carefully look for any BEFORE/AFTER changes...in the output of this command:
(Giving it a few minutes for the DHCP handshake [and any other similar handshakes] to take effect — and also reboot the RPi for good measure — to see if any country settings get changed automatically ?) Maybe even do the 'apt update' and 'apt dist-upgrade' steps too?! |
@darkenvy a similar idea is to connect a fresh install of RaspiOS to your phone's Internet hotspot (tethering over USB also works) and then run:
This would allow you to monitor any changes being made within the Raspberry Pi's Instructions are here, if you do choose to use this etckeeper approach: |
With hostapd using bridging under the covers the only thing I can think of that would prevent hostapd from starting when the bridging module is loaded on demand by hostapd would be a mis-matched kernel and on disk kernel modules from installing a kernel update and not rebooting before starting or continuing the iiab install. For reference see #482 |
Isn't MIN_RPI_KERN in iiab-install suppose to catch when a user is not running the latest kernel? Looks a bit outdated and is really the wrong touch point, think that should be in the user's face much sooner maybe in iiab? |
Before merge of PR2973 install succeeded and now sometimes doesn't? Should roll back 2973
The only thing that matters is Set WiFi Locale. How is that done? Btw, what do you mean by serial, terminal over USB? If you wrote raspios to an sdcard and plugged in a keyboard and attached to a monitor with no ethernet and tried to run iiab-install I would expect it to fail as it would have no internet connection. (there would also be no repos or iiab-install), so how is the machine set up before running install on a 'serial' connection. |
It's a great question. @darkenvy please if you clarify how exactly you are burning RaspiOS Lite to the microSD card. So we can completely eliminate this possibility. I'm not saying there are unattended-upgrades on RaspiOS (?) but still we need to be careful — so if @darkenvy can guarantee 100% that he is not (e.g. even accidentally) installing apt upgrades — and then failing to reboot into the new kernel — that will allow us all to focus on what's really happening here. |
Testing a no reboot situation with
post apt upgrade noting the kernel was updated
Guess what... We have a reproducer http://sprunge.us/8RFl83
|
This is really great news. Regardless if that's what is afflicting @darkenvy. We can hopefully now identify a way to test automatically for the failure to reboot after applying apt upgrades. |
That was the whole point of MIN_RPI_KERN the first time this cropped up, just was not maintained or improved. There is an old closed PR to work from, back over to those who can commit code, or teach users. |
Yea confirmed. As long as you reboot after It's humorous because I started doing |
EUREKA! Thanks @darkenvy and everyone for getting to the bottom of this at last. I'll work on an automated mitigation strategy, even if Raspberry Pi OS unfortunately does not support PS The subject line (title) of this ticket probably need to be changed, to reflect the true nature of the underlying problem. |
Proposed fix (insurance policy) is here: |
The released apt kernel packages can be tracked at https://github.com/raspberrypi/firmware/commits/stable, each commit has a extra/uname_string* file that is used to create the banner for uname that contains a shorthand notation of the revision level as the #xxxx value that is displayed. iiab/iiab-factory#189 |
@darkenvy @jvonau please review PR iiab/iiab-factory#188 which has been overhauled to be much more reliable, a lot simpler, and a lot faster too: |
PR iiab/iiab-factory#188 was further cleaned up and merged. Thanks everyone for making IIAB installs increasingly very friendly to newcomers — as we set out to do pretty much exactly 3 years ago — and are now very close to delivering: |
Some IIAB installs fail, and people are left very confused as to what is happening and why. This seems to involve missing and/or contradictory WiFi Country Codes.
TK Kang and @darkenvy have 2-3 examples here:
Essentially this a UX bug, and a serious one, as it can leave people extremely frustrated, not understanding what to do next to recover their IIAB install process.
After we begin to understand better (and make precise) which WiFi Country Code scenarios cause this, we can then instrument a cleaner install process that does not leave people hanging, confused and frustrated.
Related:
The text was updated successfully, but these errors were encountered: