TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: MARKUS ROBERT KESSLER
date: 2019-06-22 08:56:00
subject: Re: Zero-WH, strange SD c

On Fri, 21 Jun 2019 21:13:53 +0100 druck wrote:

> On 21/06/2019 17:14, Markus Robert Kessler wrote:
>> I am running some Raspberries, "Zero Wifi", with Raspbian (Stretch) for
>> getting data out of some BME280 sensors. Every 10 minutes the sensors
>> are queried, the data processed and sent to a (cgi) web interface to
>> store the values on a webserver.
>>
>> For stability aspects I'm doing a reboot once per night via crontab,
>> and,
>> as shown in my router's logfile, this reboot and sign in into Wifi
>> again takes less than one minute. So far, everything ok
>
> I've got 10 Raspberry Pi's doing temperature logging with those and
> similar I2C and 1-wire sensors, and I've never needed to reboot for
> stability. If you are needing to do this, something is very wrong.
>
>> But, every few weeks, the machine doesn't return from reboot.
>>
>> In the internet router's logfile I see that the machine has signed off,
>> but does not sign in again into wifi. It will stay offline / dead.
>
> It will be probably an issue reconnecting to the router. Reboot it again
> and look in /var/log/syslog or /var/log/syslog.1 for the messages logged
> between the last two reboots.
>
> I found one of my Pi Zeros wouldn't reconnect to the router after a
> power failure, but would do after power cycling just the Zero. Not sure
> what the issue was as I re-imagined from one which didn't do this.
>
>> If you remember the discussion I started some weeks ago, see
>>
>>      Subject: "Is Kingston knowingly crappy?"
>
> If you suspect a card failure, do a sudo dmesg -H after boot and look
> for evidence the the filing system is being repaired. But if the
> corruption is bad enough to stop it booting once, it usually wont come
> back up the second time either, without the card having to be repaired
> in another Linux system. Which is why I suspect networking.
>
> So:-
>
> 1) Reboot less 2) Look at the logs to see what happened 3) Compare with
> one that does work
>
> ---druck

Hi there, thanks for all the hints!

A few things I forgot to mention:

- Formerly I had a watchdog running, which forces a hardware reboot if
sshd on localhost is no longer reachable. But this is somehow dangerous
because then the OS may demand for a fsck during next boot. If this
happens, then it is no longer fully non-interactice needed for headless
mode

- I switched to crontab-based reboots because the same machine (RPi Zero
Wifi) is used for taking photos on demand. Therefore I ssh into it and
start a script which accesses a USB webcam via fswebcam and transfers the
photos to a webserver.
This works fine, but from time to time fswebcam suddenly is no longer
able to get data from the webcam for some reason. In this case even a
"USB reset" does not work. So the machine has to be rebooted anyway.

But, back to the Micro SD card in question:

I dont't think that this is a contact problem since I have pulled out and
pushed it back into the RPi several times, prior to inserting it into the
(Linux) PC. Then, after accessing it from the PC and put it back into the
RPi it works instantly. This occurred on two RPi Zeroes and with
different types of Micro SD cards.

B.t.w., I already tried to put the line "fsck -p /dev/mmcblk0p1" into /
etc/rc.local to reset file system's "dirty bit" to prevent it from
demanding for a filesystem check. This seems to have no effect.

So, RPi or the OS, seems to make changes to the filesystem / MBR or what
else, which cannot be recovered by RPi itself, but a "normal" Linux
machine can handle this without even alerting about any trouble.

Best regards,

Markus

--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.