At last, I have found that "fabste" is the SSID of the network of my neighbour. How did this get here ?
The bug occurs only on Orange Pi Zero boards ... which need to perform wifi scan. Does not happen on boards that operate as WIFI AP, or use ethernet. The wifi scan is required to connect to the AP. The scan seem to produce a temp file somewhere (maybe in /tmp, not sure).
Then, later, /etc/init.d/armhwinfo runs this, which is very suspicious to me:
read USBQUIRKS <${TMPFILE}
sed -i '/^usbstoragequirks/d' /boot/armbianEnv.txt
echo "usbstoragequirks=${USBQUIRKS}" >>/boot/armbianEnv.txt
and if this is followed by a power failure, you end up with a corrupted file:
It's a rare issue from Google point of view; but it's known, and it makes most of my opi0 unusable. Sooner or later, it affects 100% of my opi0 that work as wifi clients.
It rendends my pis unusable because I need very specific features which are set in /boot/armbianEnv.txt , usually w1-gpio. When the file is corrupted, and after reboot, I loose control over my 1W devices, and the whole project got broken.
I am not sure how to fix this at the distribution level:
- use something different than sed in armhwinfo to alter /boot/armbianEnv.txt
- perform a sync
- change ext4 features
- change mount options
For now, I am trying to write a personnal fix: record a backup copy of /boot/armbianEnv.txt and restaure it if critical words like "overlay_prefix=sun8i-h3" disappear.
Note that, when the file is heavily broken, for all 3 examples above, the pi can boot, establish network connexion, and remains reachable, mostly. I only loose the 1W or GPIO feature. There seem to be very good default settings set as fallback somewhere else.
I am not sure why one has an empty line. But in both case, the usbstoragequirks line is doubled, and identical to my eyes. This means, /etc/init.d/armhwinfo tries to add already existing data. This script lacks checks !!!
Question
DoubleHP
Took me over a year to isolate this bug.
Randomly, I have found that /boot/armbianEnv.txt had unconsistent content.
Examples:
.tty1tty1LOGIN.8 ¹[fU7ttyS0tyS0LOGINusbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
network={ ssid="Demaine_40_Grd_Rue_Chambre-BP" #psk="1234567890" psk=693d195a3bf2ab6defbcc0b54604ced4286a067996138db6dc793d8648f67d79 } usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
network={ ssid="fabste" #psk="1234567890" psk=95342031a4b28398045e1761f9c64f8454902e80d37102e5476fa79abd59e144 } 2 } usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
At last, I have found that "fabste" is the SSID of the network of my neighbour. How did this get here ?
The bug occurs only on Orange Pi Zero boards ... which need to perform wifi scan. Does not happen on boards that operate as WIFI AP, or use ethernet. The wifi scan is required to connect to the AP. The scan seem to produce a temp file somewhere (maybe in /tmp, not sure).
Then, later, /etc/init.d/armhwinfo runs this, which is very suspicious to me:
read USBQUIRKS <${TMPFILE} sed -i '/^usbstoragequirks/d' /boot/armbianEnv.txt echo "usbstoragequirks=${USBQUIRKS}" >>/boot/armbianEnv.txt
and if this is followed by a power failure, you end up with a corrupted file:
https://lists.denx.de/pipermail/u-boot/2018-June/332375.html
https://github.com/ConnectBox/connectbox-pi/issues/220
It's a rare issue from Google point of view; but it's known, and it makes most of my opi0 unusable. Sooner or later, it affects 100% of my opi0 that work as wifi clients.
It rendends my pis unusable because I need very specific features which are set in /boot/armbianEnv.txt , usually w1-gpio. When the file is corrupted, and after reboot, I loose control over my 1W devices, and the whole project got broken.
Here is my fstab, in case it matters:
UUID=ebe9dacf-124f-486c-b6c1-08749e209374 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0
I am not sure how to fix this at the distribution level:
- use something different than sed in armhwinfo to alter /boot/armbianEnv.txt
- perform a sync
- change ext4 features
- change mount options
For now, I am trying to write a personnal fix: record a backup copy of /boot/armbianEnv.txt and restaure it if critical words like "overlay_prefix=sun8i-h3" disappear.
Note that, when the file is heavily broken, for all 3 examples above, the pi can boot, establish network connexion, and remains reachable, mostly. I only loose the 1W or GPIO feature. There seem to be very good default settings set as fallback somewhere else.
Here are unaffected opis:
verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=cir usbhost2 usbhost3 w1-gpio param_w1_pin=PA15 rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
verbosity=1 logo=disabled console=both disp_mode=1920x1080p60 overlay_prefix=sun8i-h3 overlays=usbhost2 usbhost3 w1-gpio param_w1_pin=PA15 rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
I am not sure why one has an empty line. But in both case, the usbstoragequirks line is doubled, and identical to my eyes. This means, /etc/init.d/armhwinfo tries to add already existing data. This script lacks checks !!!
.
Link to comment
Share on other sites
13 answers to this question
Recommended Posts