Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #38307 > unrolled thread

Are Pi Zeros more fussy about SD cards than other Pis?

Started byChris Green <cl@isbd.net>
First post2026-08-03 15:45 +0100
Last post2026-08-11 12:49 +0000
Articles 20 on this page of 35 — 11 participants

Back to article view | Back to comp.sys.raspberry-pi


Contents

  Are Pi Zeros more fussy about SD cards than other Pis? Chris Green <cl@isbd.net> - 2026-08-03 15:45 +0100
    Re: Are Pi Zeros more fussy about SD cards than other Pis? John R Walliker <jrwalliker@gmail.com> - 2026-08-03 18:05 +0100
      Re: Are Pi Zeros more fussy about SD cards than other Pis? Theo <theom+news@chiark.greenend.org.uk> - 2026-08-03 18:23 +0100
      Re: Are Pi Zeros more fussy about SD cards than other Pis? "s|b" <me@privacy.invalid> - 2026-08-03 22:48 +0200
    Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-03 18:29 +0100
      Re: Are Pi Zeros more fussy about SD cards than other Pis? "s|b" <me@privacy.invalid> - 2026-08-03 22:48 +0200
        Re: Are Pi Zeros more fussy about SD cards than other Pis? Chris Green <cl@isbd.net> - 2026-08-04 10:15 +0100
          Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-04 11:10 +0100
          Re: Are Pi Zeros more fussy about SD cards than other Pis? Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> - 2026-08-04 11:23 +0000
            Re: Are Pi Zeros more fussy about SD cards than other Pis? Chris Green <cl@isbd.net> - 2026-08-04 17:53 +0100
              Re: Are Pi Zeros more fussy about SD cards than other Pis? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-05 00:46 +0000
              Re: Are Pi Zeros more fussy about SD cards than other Pis? Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> - 2026-08-05 08:30 +0000
                Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-05 11:37 +0100
                Re: Are Pi Zeros more fussy about SD cards than other Pis? Chris Green <cl@isbd.net> - 2026-08-05 12:45 +0100
                  Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-05 13:22 +0100
          Re: Are Pi Zeros more fussy about SD cards than other Pis? "s|b" <me@privacy.invalid> - 2026-08-04 14:56 +0200
            Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT] "s|b" <me@privacy.invalid> - 2026-08-04 15:09 +0200
              Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT] The Natural Philosopher <tnp@invalid.invalid> - 2026-08-04 15:11 +0100
                Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT] "s|b" <me@privacy.invalid> - 2026-08-05 20:25 +0200
              Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT] Chris Green <cl@isbd.net> - 2026-08-04 17:55 +0100
                Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT] Andy Burns <usenet@andyburns.uk> - 2026-08-04 18:08 +0100
                Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT] "s|b" <me@privacy.invalid> - 2026-08-05 19:50 +0200
            Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-04 15:10 +0100
          Re: Are Pi Zeros more fussy about SD cards than other Pis? druck <news@druck.org.uk> - 2026-08-08 00:29 +0100
            Re: Are Pi Zeros more fussy about SD cards than other Pis? Chris Green <cl@isbd.net> - 2026-08-08 08:59 +0100
              Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-08 12:27 +0100
              Re: Are Pi Zeros more fussy about SD cards than other Pis? druck <news@druck.org.uk> - 2026-08-10 19:06 +0100
                Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-10 19:21 +0100
                Re: Are Pi Zeros more fussy about SD cards than other Pis? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-11 00:03 +0000
                  Re: Are Pi Zeros more fussy about SD cards than other Pis? Jim Jackson <jj@franjam.org.uk> - 2026-08-11 07:33 +0000
                    Re: Are Pi Zeros more fussy about SD cards than other Pis? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-12 01:25 +0000
                      Re: Are Pi Zeros more fussy about SD cards than other Pis? Jim Jackson <jj@franjam.org.uk> - 2026-08-13 16:55 +0000
                        Re: Are Pi Zeros more fussy about SD cards than other Pis? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-08-13 23:29 +0000
            Re: Are Pi Zeros more fussy about SD cards than other Pis? The Natural Philosopher <tnp@invalid.invalid> - 2026-08-08 12:25 +0100
    Re: Are Pi Zeros more fussy about SD cards than other Pis? Stephan Elinghaus <seli@spamgourmet.com> - 2026-08-11 12:49 +0000

Page 1 of 2  [1] 2  Next page →


#38307 — Are Pi Zeros more fussy about SD cards than other Pis?

FromChris Green <cl@isbd.net>
Date2026-08-03 15:45 +0100
SubjectAre Pi Zeros more fussy about SD cards than other Pis?
Message-ID<m4m6km-ina2.ln1@q957.zbmc.eu>
I have a Pi Zero 2 W logging data once an hour, it's a 1Mb database
that gets updated each hour.  It has killed its SD card twice in less
than a year and I'm wondering why.

I have a similar logging system using a venerable Pi 2 that's been
running for much longer and writing somewhat more data without any
problems.

The Pi Zero 2 W replaced a Beaglebone Black that had run for several
years without any problems.

Is the Pi Zero 2 W more fussy about its SD card, does it work the card
harder. or have I just been unlucky?

I'd welcome any recommendations for cards that last well.

-- 
Chris Green
·

[toc] | [next] | [standalone]


#38308

FromJohn R Walliker <jrwalliker@gmail.com>
Date2026-08-03 18:05 +0100
Message-ID<114qhp1$1gf07$1@dont-email.me>
In reply to#38307
On 03/08/2026 15:45, Chris Green wrote:
> I have a Pi Zero 2 W logging data once an hour, it's a 1Mb database
> that gets updated each hour.  It has killed its SD card twice in less
> than a year and I'm wondering why.
> 
> I have a similar logging system using a venerable Pi 2 that's been
> running for much longer and writing somewhat more data without any
> problems.
> 
> The Pi Zero 2 W replaced a Beaglebone Black that had run for several
> years without any problems.
> 
> Is the Pi Zero 2 W more fussy about its SD card, does it work the card
> harder. or have I just been unlucky?
> 
> I'd welcome any recommendations for cards that last well.

Samsung and Sandisk sell high endurance SD cards intended for
security camera and dashcam applications.  These are not
particularly fast, but are designed to survive continuous
writing of data.
John

[toc] | [prev] | [next] | [standalone]


#38309

FromTheo <theom+news@chiark.greenend.org.uk>
Date2026-08-03 18:23 +0100
Message-ID<hhc*QodNA@news.chiark.greenend.org.uk>
In reply to#38308
John R Walliker <jrwalliker@gmail.com> wrote:
> On 03/08/2026 15:45, Chris Green wrote:
> > I have a Pi Zero 2 W logging data once an hour, it's a 1Mb database
> > that gets updated each hour.  It has killed its SD card twice in less
> > than a year and I'm wondering why.
> > 
> > I have a similar logging system using a venerable Pi 2 that's been
> > running for much longer and writing somewhat more data without any
> > problems.
> > 
> > The Pi Zero 2 W replaced a Beaglebone Black that had run for several
> > years without any problems.
> > 
> > Is the Pi Zero 2 W more fussy about its SD card, does it work the card
> > harder. or have I just been unlucky?
> > 
> > I'd welcome any recommendations for cards that last well.
> 
> Samsung and Sandisk sell high endurance SD cards intended for
> security camera and dashcam applications.  These are not
> particularly fast, but are designed to survive continuous
> writing of data.

+1.  There are also 'industrial' grade cards which are a step above 'high
endurance' - better designed to handle things like power glitches or
unplanned power outages.  I think they use more robust flash (MLC not TLC,
or TLC not QLC) which makes them more expensive per GB - but if you can get
by with 4 or 8GB then it doesn't matter.

Theo

[toc] | [prev] | [next] | [standalone]


#38311

From"s|b" <me@privacy.invalid>
Date2026-08-03 22:48 +0200
Message-ID<ndcd3vFdf7U1@mid.individual.net>
In reply to#38308
On Mon, 3 Aug 2026 18:05:37 +0100, John R Walliker wrote:

> Samsung and Sandisk sell high endurance SD cards intended for
> security camera and dashcam applications.  These are not
> particularly fast, but are designed to survive continuous
> writing of data.

+1 on SanDisk and Samsung. I use the SanDisk High Endurance microsd*,
same as in my dashcam. Funny thing Theo mentioning industrial, because I
just checked the dashcam's manufacturer, Viofo, and they now sell (what
they call) industrial microsd cards.

<https://www.viofo.com/products/viofo-industrial-grade-microsd-card-u3-a2-v30-high-speed-memory-card-with-adapter-support-ultra-hd-4k-video-recording32-64-128-256>

I haven't tried these myself, but these cards are meant to go on and on
since the dashcam is recording in time slots of 5 mins and it loops when
the card is full.




*
<https://www.sandisk.com/en-ie/products/memory-cards/microsd-cards/sandisk-high-endurance-uhs-i-microsd?sku=SDSQQNR-064G-GN6IA>

-- 
s|b

[toc] | [prev] | [next] | [standalone]


#38310

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-08-03 18:29 +0100
Message-ID<114qj6j$1gsmp$1@dont-email.me>
In reply to#38307
On 03/08/2026 15:45, Chris Green wrote:
> I have a Pi Zero 2 W logging data once an hour, it's a 1Mb database
> that gets updated each hour.  It has killed its SD card twice in less
> than a year and I'm wondering why.
> 
> I have a similar logging system using a venerable Pi 2 that's been
> running for much longer and writing somewhat more data without any
> problems.
> 
> The Pi Zero 2 W replaced a Beaglebone Black that had run for several
> years without any problems.
> 
> Is the Pi Zero 2 W more fussy about its SD card, does it work the card
> harder. or have I just been unlucky?
> 
> I'd welcome any recommendations for cards that last well.
> 
in the true 'if i wanted to go there i wouldn't be starting from here' 
tradition if its a 2W why not send its data to somewhere more 
interesting  and secure?

My Pi zero W never writes to its SD car at all unless i change 
configurations,. Everything that writes is either stopped from writing 
or writes to ram discs.

Some SD cards are better than others, I am not interested in finding out 
which

-- 
The higher up the mountainside
The greener grows the grass.
The higher up the monkey climbs
The more he shows his arse.

Traditional

[toc] | [prev] | [next] | [standalone]


#38312

From"s|b" <me@privacy.invalid>
Date2026-08-03 22:48 +0200
Message-ID<ndcd4qFdf7U2@mid.individual.net>
In reply to#38310
On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:

> in the true 'if i wanted to go there i wouldn't be starting from here' 
> tradition if its a 2W why not send its data to somewhere more 
> interesting  and secure?
> 
> My Pi zero W never writes to its SD car at all unless i change 
> configurations,. Everything that writes is either stopped from writing 
> or writes to ram discs.
> 
> Some SD cards are better than others, I am not interested in finding out 
> which

This is helpful.

-- 
s|b

[toc] | [prev] | [next] | [standalone]


#38314

FromChris Green <cl@isbd.net>
Date2026-08-04 10:15 +0100
Message-ID<h6n8km-nik2.ln1@q957.zbmc.eu>
In reply to#38312
s|b <me@privacy.invalid> wrote:
> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
> 
> > in the true 'if i wanted to go there i wouldn't be starting from here' 
> > tradition if its a 2W why not send its data to somewhere more 
> > interesting  and secure?
> > 
> > My Pi zero W never writes to its SD car at all unless i change 
> > configurations,. Everything that writes is either stopped from writing 
> > or writes to ram discs.
> > 
> > Some SD cards are better than others, I am not interested in finding out 
> > which
> 
> This is helpful.
> 
What would be more helpful would be some guidance on how to implement
it! :-)

E.g.  how do you stop systemd's logging from writing to 'hard' disk? 
It would need a **lot** of reconfiguration before it would use a
reasonable amount of space such as is available on a RAM drive.

Maybe there are versions of the OS that are optimised for minimal disk
writing, if so I'd like to know about them.

-- 
Chris Green
·

[toc] | [prev] | [next] | [standalone]


#38315

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-08-04 11:10 +0100
Message-ID<114sdpv$21l1h$1@dont-email.me>
In reply to#38314
On 04/08/2026 10:15, Chris Green wrote:
> s|b <me@privacy.invalid> wrote:
>> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
>>
>>> in the true 'if i wanted to go there i wouldn't be starting from here'
>>> tradition if its a 2W why not send its data to somewhere more
>>> interesting  and secure?
>>>
>>> My Pi zero W never writes to its SD car at all unless i change
>>> configurations,. Everything that writes is either stopped from writing
>>> or writes to ram discs.
>>>
>>> Some SD cards are better than others, I am not interested in finding out
>>> which
>>
>> This is helpful.
>>
> What would be more helpful would be some guidance on how to implement
> it! :-)
> 
> E.g.  how do you stop systemd's logging from writing to 'hard' disk?
> It would need a **lot** of reconfiguration before it would use a
> reasonable amount of space such as is available on a RAM drive.
> 
> Maybe there are versions of the OS that are optimised for minimal disk
> writing, if so I'd like to know about them.
> 
Here is my 'if I ever have to reproduce this' cheat file
HEATING CONTROLLER
==================
user: admin
password: fuckU
file /etc/dhcpcd.conf
---------------------
set static IP address 192.168.0.201
set gateway 192.168.0.254
set name-server 192.168.0.100

apt-get update
apt-get upgrade -y

# web server
#============
apt-get install apache2
chown -R www-data /var/www
chgrp -R www-data /var/www
chmod -R 775 /var/www/
chmod g+s /var/www
usermod -aG www-data me
usermod -aG www-data admin
mkdir /var/www/data
chmod 775 /var/www/data
# create an area to share data between processes...
mkdir /var/www/data/volatile
chmod 777 /var/www/data/volatile
# create ram disks
echo  "tmpfs /var/www/data/volatile tmpfs 
nodev,nosuid,noexec,nodiratime,size=1M   0 	0" >> /etc/fstab
echo  "tmpfs /var/ramlog tmpfs 
nodev,nosuid,noexec,nodiratime,size=25M,mode=0755   0 	0" >> /etc/fstab




## fuck with shitsemd
sed -i "s/#Storage=auto/Storage=volatile/" /etc/systemd/journald.conf
sed -i "s/#RuntimeMaxUse=/RuntimeMaxUse=25M/" /etc/systemd/journald.conf
sed -i "s/#ForwardToConsole=yes/ForwardToConsole=no/" 
/etc/systemd/journald.conf
sed -i "s/#ForwardToWall=yes/ForwardToWall=no/" //etc/systemd/journald.conf


Then it is a question of making sure the SD card filesystem is mounted 
with minimal write
more /etc/fstab

proc            /proc           proc    defaults          0       0
PARTUUID=b8c9fbb7-01  /boot           vfat    defaults          0       2
PARTUUID=b8c9fbb7-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
tmpfs /var/www/data/volatile tmpfs 
nodev,nosuid,noexec,nodiratime,size=1M   0 	0
tmpfs /var/ramlog tmpfs 
nodev,nosuid,noexec,nodiratime,size=25M,mode=0755   0 	0

and picking through everything that might write to the logs to make it 
send data to the ramdisk...I though that I had included that in this 
guide, but looks like I didnt,. E.g. Apache log files go to the ram disk


ls -l /var/ramlog
total 944
-rw-r----- 1 root adm  119044 Aug  4 10:55 auth.log
-rw-r----- 1 root adm   55711 Aug  1 23:59 auth.log.1
-rw-r----- 1 root adm  118243 Aug  4 10:47 daemon.log
-rw-r----- 1 root adm   86611 Aug  2 00:00 daemon.log.1
-rw-r----- 1 root adm       0 Aug  2 00:00 debug
-rw-r----- 1 root adm    3111 Jul 31 20:41 debug.1
-rw-r----- 1 root adm     241 Aug  4 00:00 error.log
-rw-r----- 1 root adm     528 Aug  4 00:00 error.log.1
-rw-r----- 1 root adm   81192 Aug  3 00:00 error.log.2.gz
-rw-r----- 1 root adm     446 Aug  2 00:00 error.log.3.gz
-rw-r--r-- 1 root root    347 Aug  1 00:00 error.log.4.gz
-rw-r----- 1 root adm       0 Aug  2 00:00 kern.log
-rw-r----- 1 root adm   31371 Jul 31 20:40 kern.log.1
-rw-r----- 1 root adm    5111 Aug  2 13:02 mail.info
-rw-r----- 1 root adm   14189 Aug  1 23:02 mail.info.1
-rw-r----- 1 root adm    5111 Aug  2 13:02 mail.log
-rw-r----- 1 root adm   14189 Aug  1 23:02 mail.log.1
-rw-r----- 1 root adm     159 Aug  2 00:10 messages
-rw-r----- 1 root adm   30557 Jul 31 20:40 messages.1
-rw-r----- 1 root adm  190719 Aug  4 10:55 syslog
-rw-r----- 1 root adm  163421 Aug  2 00:00 syslog.1


Its not 100% complete, but its very close

I've still got data going to /var/log that I ought to symlink to files 
in /var/ramlog

ls -l /var/log
total 288
-rw-r--r-- 1 root root    653 Sep  6  2023 alternatives.log
drwxr-xr-x 2 root root   4096 Nov 18  2025 apt
-rw-rw---- 1 root utmp   8832 Jun 10 12:00 btmp
-rw-r--r-- 1 root root      0 Nov 19  2025 dpkg.log
-rw-r--r-- 1 root root   2400 Nov 18  2025 dpkg.log.1
-rw-r--r-- 1 root root    464 Oct 16  2025 dpkg.log.2.gz
-rw-r--r-- 1 root root    778 Sep  6  2023 dpkg.log.3.gz
-rw-r--r-- 1 root root    584 Aug 11  2023 dpkg.log.4.gz
-rw-rw-r-- 1 root utmp 292292 Aug  4 10:47 lastlog
drwx------ 2 root root   4096 May  3  2023 private
drwxr-xr-x 4 root root   4096 Aug  4  2023 runit
drwxr-xr-x 2 root root   4096 Feb  2  2021 sysstat
-rw-rw-r-- 1 root utmp 230016 Aug  4 10:47 wtmp


... lastlog and wtmp. I dont mind upgrade history being there tho
A lazy way might be to just mount the ramdisk on /var/log, but I wasn't 
sure what I wanted volatile and what needed to be written to the SD card

To date this has been utterly reliable for nearly 3 years now. Always 
reboots after a power cut.

In practice various (Pi PICO W) units talk to it via its wifi TCP/IP 
connection - thermostats, the oil sensor.. and it controls the central 
heating system via some mains relays. Information and configuration is 
via a custom web interface.

If I wanted to store a lot of changing data I would (probably) NFS mount 
the house server and stream data to that instead of locally. Or write 
some proprietary network code.



-- 
Microsoft : the best reason to go to Linux that ever existed.

[toc] | [prev] | [next] | [standalone]


#38316

FromIan <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
Date2026-08-04 11:23 +0000
Message-ID<slrn1173ite.3j0.${send-direct-email-to-news1021-at-jusme-dot-com-i@vm46.home.jusme.com>
In reply to#38314
On 2026-08-04, Chris Green <cl@isbd.net> wrote:
> s|b <me@privacy.invalid> wrote:
>> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
>> 
>> > in the true 'if i wanted to go there i wouldn't be starting from here' 
>> > tradition if its a 2W why not send its data to somewhere more 
>> > interesting  and secure?
>> > 
>> > My Pi zero W never writes to its SD car at all unless i change 
>> > configurations,. Everything that writes is either stopped from writing 
>> > or writes to ram discs.
>> > 
>> > Some SD cards are better than others, I am not interested in finding out 
>> > which
>> 
>> This is helpful.
>> 
> What would be more helpful would be some guidance on how to implement
> it! :-)
>
> E.g.  how do you stop systemd's logging from writing to 'hard' disk? 
> It would need a **lot** of reconfiguration before it would use a
> reasonable amount of space such as is available on a RAM drive.
>
> Maybe there are versions of the OS that are optimised for minimal disk
> writing, if so I'd like to know about them.

Wot I do:

Replace /sbin/init with a shell script that sets up the minimal necessary
for the application. That script runs with the root filesystem mounted
read-only, so the SD card is never written to in noral operation. To
modify the config:

  mount -o remount,rw /dev/root /

It also means you can safely "pull the plug" at any time without risk of
corruption (useful for PoE devices).


Here's an example for debian 9.4 (stretch):

-----------------------------------------------------------------------
#!/bin/bash

clear
echo "Running ${0}..."


#
# Config...
#

source /etc/ro-config

export OUR_BC="${OUR_IP%.*}.255"
export OUR_GW="${OUR_IP%.*}.1"


#
# Need to set these so we can prime PS1 for bash...
# (see nonsense in /etc/bash.bashrc)...
#

export SUDO_USER=0
export SUDO_PS1="-"


#
# Mount tmpfs filesystems on /run and /tmp,
# as these need to be rw...
#

mount -t tmpfs -o size=256m tmpfs /run
mount -t tmpfs -o size=10m tmpfs /tmp

mkdir /run/lock
mkdir /run/log


#
# Need /dev/pts for ssh...
#

mkdir /dev/pts
mount -t devpts devpts /dev/pts


#
# Need loopback...
#

ifconfig lo up


#
# Need /proc...
#

mount -t proc none /proc


#
# Pop a shell here while we set up the network...
#

#PS1="TEMP-SHELL% " /bin/bash 


#
# Set host name and domain name...
#

hostname "${OUR_HOSTNAME}"
domainname "${OUR_HOSTNAME#*.}"


#
# If wifi, set up the wireless interface...
#

[ "${WIRED}" != "1" ] && /ro/init-wifi


#
# Wait for interface to appear before
# configuring it...
#

while [ ! -d "/proc/sys/net/ipv4/conf/${OUR_IF}/" ]
do
  echo "Waiting for interface \"${OUR_IF}\"..."
  sleep 1
done


#
# Bring the interface up...
#

ip link set "${OUR_IF}" up


#
# Check if the MAC address matches the config. If not, don't
# bring up the network, just pop up a shell to allow the config
# to be updated (allows cloning of the image)...
#

real_eth="$(ip addr list ${OUR_IF} | awk '/link\/ether/ {print $2}')"

if [ "${real_eth^^}" != "${OUR_ETH^^}" ]
then
    echo "This MAC address (${real_eth^^}) doesn't match config (${OUR_ETH^^})"
    echo ""
    echo "Please edit config and reboot..."
    echo ""

    cd /ro
    ./rw

   PS1="RW-SHELL \h:\w# " /bin/bash 

   reboot -f
fi


#
# Set the IP address and default route...
#

echo "Setting IP address for ${OUR_IF}: ${OUR_IP}/24, gw: ${OUR_GW}"

ip addr add "${OUR_IP}/24" brd "${OUR_BC}" dev "${OUR_IF}"
ip route add 0/0 via "${OUR_GW}"


#
# Wait for network, check by pinging our default gateway...
#

while ! ping -c 1 -q -w 1 "${OUR_GW}" > /dev/null 2>&1
do
    echo "Waiting for network, ping gw (${OUR_GW})..."
    sleep 1
done


#
# Pop up a shell here before we start the applications
# while debugging...
#

#PS1="TEMP-SHELL% " /bin/bash


#
# Start ntpd to get the time...
#

echo "Starting ntpd..."

/usr/sbin/ntpd -g

echo "Waiting for time sync..."
ntp-wait -n 30 -s 1
date


#
# Start sshd
#

echo "Starting sshd..."

mkdir /run/sshd
/usr/sbin/sshd


#
# Now start application screen sessions...
#

echo "Starting applications..."

cd /ro

./start-screens


#
# Shell for testing...
#

while true
do
    PS1="RO-SHELL \h:\w# " /bin/bash
done


#
# We can't exit from init (causes kernel panic), so force a reboot if we get here...
#

reboot -f

-----------------------------------------------------------------------


Wifi requires some kernel modules, this is init-wifi:

-----------------------------------------------------------------------
#!/bin/bash

#
# Start wifi...
#

echo "Loading modules for WiFi..."

kernel="$(uname -r)"

for module in   net/rfkill/rfkill.ko \
                net/wireless/cfg80211.ko \
                drivers/net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko \
                drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko \
                drivers/input/touchscreen/rpi-ft5406.ko \
                drivers/input/evdev.ko
do
    insmod /lib/modules/${kernel}/kernel/${module}
done 

echo "Starting wpa_supplicant..."

find /usr > /dev/null  # Generate some entropy

/sbin/wpa_supplicant -B -dd -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 

-----------------------------------------------------------------------



-- 
Ian

"Tamahome!!!" - "Miaka!!!"

[toc] | [prev] | [next] | [standalone]


#38324

FromChris Green <cl@isbd.net>
Date2026-08-04 17:53 +0100
Message-ID<52i9km-mhr2.ln1@q957.zbmc.eu>
In reply to#38316
Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
> > s|b <me@privacy.invalid> wrote:
> >> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
> >> 
> >> > in the true 'if i wanted to go there i wouldn't be starting from here' 
> >> > tradition if its a 2W why not send its data to somewhere more 
> >> > interesting  and secure?
> >> > 
> >> > My Pi zero W never writes to its SD car at all unless i change 
> >> > configurations,. Everything that writes is either stopped from writing 
> >> > or writes to ram discs.
> >> > 
> >> > Some SD cards are better than others, I am not interested in finding out 
> >> > which
> >> 
> >> This is helpful.
> >> 
> > What would be more helpful would be some guidance on how to implement
> > it! :-)
> >
> > E.g.  how do you stop systemd's logging from writing to 'hard' disk? 
> > It would need a **lot** of reconfiguration before it would use a
> > reasonable amount of space such as is available on a RAM drive.
> >
> > Maybe there are versions of the OS that are optimised for minimal disk
> > writing, if so I'd like to know about them.
> 
> Wot I do:
> 
> Replace /sbin/init with a shell script that sets up the minimal necessary

So you don't run systemd? While that may be a 'good idea' in some ways
it does require a **lot** of customisation.

... and current stable Debian is 13, I don't think I want to go back
as far as you are! :-)

-- 
Chris Green
·

[toc] | [prev] | [next] | [standalone]


#38326

FromLawrence D’Oliveiro <ldo@nz.invalid>
Date2026-08-05 00:46 +0000
Message-ID<114u15k$2iv3s$7@dont-email.me>
In reply to#38324
On Tue, 4 Aug 2026 17:53:57 +0100, Chris Green wrote:

> Ian
> <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
> wrote:
>>
>> Replace /sbin/init with a shell script that sets up the minimal
>> necessary
>
> So you don't run systemd? While that may be a 'good idea' in some
> ways it does require a **lot** of customisation.

Not really. Mount the right filesystems, make sure you can find the
right executables on your $PATH and that those executables can find
the right shared libraries ... what more do you need?

[toc] | [prev] | [next] | [standalone]


#38328

FromIan <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com>
Date2026-08-05 08:30 +0000
Message-ID<slrn1175t4o.3j0.${send-direct-email-to-news1021-at-jusme-dot-com-i@vm46.home.jusme.com>
In reply to#38324
On 2026-08-04, Chris Green <cl@isbd.net> wrote:
> Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
>> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
>> > s|b <me@privacy.invalid> wrote:
>> >> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
>> >> 
>> >> > in the true 'if i wanted to go there i wouldn't be starting from here' 
>> >> > tradition if its a 2W why not send its data to somewhere more 
>> >> > interesting  and secure?
>> >> > 
>> >> > My Pi zero W never writes to its SD car at all unless i change 
>> >> > configurations,. Everything that writes is either stopped from writing 
>> >> > or writes to ram discs.
>> >> > 
>> >> > Some SD cards are better than others, I am not interested in finding out 
>> >> > which
>> >> 
>> >> This is helpful.
>> >> 
>> > What would be more helpful would be some guidance on how to implement
>> > it! :-)
>> >
>> > E.g.  how do you stop systemd's logging from writing to 'hard' disk? 
>> > It would need a **lot** of reconfiguration before it would use a
>> > reasonable amount of space such as is available on a RAM drive.
>> >
>> > Maybe there are versions of the OS that are optimised for minimal disk
>> > writing, if so I'd like to know about them.
>> 
>> Wot I do:
>> 
>> Replace /sbin/init with a shell script that sets up the minimal necessary
>
> So you don't run systemd? While that may be a 'good idea' in some ways
> it does require a **lot** of customisation.

Absolutely not :)

It's not a general-purpose computer, it's a device that runs a single program
(wot I wrote), and it isn't going to change, ever. Yes, figuring out how to
get things like wifi and sshd to run took a few iterations, but now that's a
solved problem.


> ... and current stable Debian is 13, I don't think I want to go back
> as far as you are! :-)

This was created many moons ago. It works, it isn't accessible from any public
network, and I have no reason to keep chasing the dragon updating it "just because".
Ultimately it may be replaced, but that will be a complete replacement with
something else, not an update.

Something very similar should be possible with later versions, unless they've
finally integreted systemd into the kernel!


-- 
Ian

"Tamahome!!!" - "Miaka!!!"

[toc] | [prev] | [next] | [standalone]


#38329

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-08-05 11:37 +0100
Message-ID<114v3p8$2spu9$2@dont-email.me>
In reply to#38328
On 05/08/2026 09:30, Ian wrote:
> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
>> Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
>>> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
>>>> s|b <me@privacy.invalid> wrote:
>>>>> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
>>>>>
>>>>>> in the true 'if i wanted to go there i wouldn't be starting from here'
>>>>>> tradition if its a 2W why not send its data to somewhere more
>>>>>> interesting  and secure?
>>>>>>
>>>>>> My Pi zero W never writes to its SD car at all unless i change
>>>>>> configurations,. Everything that writes is either stopped from writing
>>>>>> or writes to ram discs.
>>>>>>
>>>>>> Some SD cards are better than others, I am not interested in finding out
>>>>>> which
>>>>>
>>>>> This is helpful.
>>>>>
>>>> What would be more helpful would be some guidance on how to implement
>>>> it! :-)
>>>>
>>>> E.g.  how do you stop systemd's logging from writing to 'hard' disk?
>>>> It would need a **lot** of reconfiguration before it would use a
>>>> reasonable amount of space such as is available on a RAM drive.
>>>>
>>>> Maybe there are versions of the OS that are optimised for minimal disk
>>>> writing, if so I'd like to know about them.
>>>
>>> Wot I do:
>>>
>>> Replace /sbin/init with a shell script that sets up the minimal necessary
>>
>> So you don't run systemd? While that may be a 'good idea' in some ways
>> it does require a **lot** of customisation.
> 
> Absolutely not :)
> 
> It's not a general-purpose computer, it's a device that runs a single program
> (wot I wrote), and it isn't going to change, ever. Yes, figuring out how to
> get things like wifi and sshd to run took a few iterations, but now that's a
> solved problem.
> 
> 
>> ... and current stable Debian is 13, I don't think I want to go back
>> as far as you are! :-)
> 
> This was created many moons ago. It works, it isn't accessible from any public
> network, and I have no reason to keep chasing the dragon updating it "just because".
> Ultimately it may be replaced, but that will be a complete replacement with
> something else, not an update.
> 
> Something very similar should be possible with later versions, unless they've
> finally integreted systemd into the kernel!
> 
> 

I think this is very clear and relevant info: you don't need to install 
a whole distros cruft just to get an IOT working. Neither does it need 
upgrading for 'security reasons' if its inside a private network

Plenty of people just use a busybox superstructure...


-- 
No Apple devices were knowingly used in the preparation of this post.

[toc] | [prev] | [next] | [standalone]


#38330

FromChris Green <cl@isbd.net>
Date2026-08-05 12:45 +0100
Message-ID<6bkbkm-lv33.ln1@q957.zbmc.eu>
In reply to#38328
Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
> > Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
> >> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
> >> > s|b <me@privacy.invalid> wrote:
> >> >> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
> >> >> 
> >> >> > in the true 'if i wanted to go there i wouldn't be starting from here' 
> >> >> > tradition if its a 2W why not send its data to somewhere more 
> >> >> > interesting  and secure?
> >> >> > 
> >> >> > My Pi zero W never writes to its SD car at all unless i change 
> >> >> > configurations,. Everything that writes is either stopped from writing 
> >> >> > or writes to ram discs.
> >> >> > 
> >> >> > Some SD cards are better than others, I am not interested in finding out 
> >> >> > which
> >> >> 
> >> >> This is helpful.
> >> >> 
> >> > What would be more helpful would be some guidance on how to implement
> >> > it! :-)
> >> >
> >> > E.g.  how do you stop systemd's logging from writing to 'hard' disk? 
> >> > It would need a **lot** of reconfiguration before it would use a
> >> > reasonable amount of space such as is available on a RAM drive.
> >> >
> >> > Maybe there are versions of the OS that are optimised for minimal disk
> >> > writing, if so I'd like to know about them.
> >> 
> >> Wot I do:
> >> 
> >> Replace /sbin/init with a shell script that sets up the minimal necessary
> >
> > So you don't run systemd? While that may be a 'good idea' in some ways
> > it does require a **lot** of customisation.
> 
> Absolutely not :)
> 
> It's not a general-purpose computer, it's a device that runs a single program
> (wot I wrote), and it isn't going to change, ever. Yes, figuring out how to
> get things like wifi and sshd to run took a few iterations, but now that's a
> solved problem.
> 
Ah, that's a bit different from my situation, I need a familiar OS on
the system in question.

-- 
Chris Green
·

[toc] | [prev] | [next] | [standalone]


#38331

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-08-05 13:22 +0100
Message-ID<114v9u8$2v0oq$3@dont-email.me>
In reply to#38330
On 05/08/2026 12:45, Chris Green wrote:
> Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
>> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
>>> Ian <${send-direct-email-to-news1021-at-jusme-dot-com-if-you-must}@jusme.com> wrote:
>>>> On 2026-08-04, Chris Green <cl@isbd.net> wrote:
>>>>> s|b <me@privacy.invalid> wrote:
>>>>>> On Mon, 3 Aug 2026 18:29:55 +0100, The Natural Philosopher wrote:
>>>>>>
>>>>>>> in the true 'if i wanted to go there i wouldn't be starting from here'
>>>>>>> tradition if its a 2W why not send its data to somewhere more
>>>>>>> interesting  and secure?
>>>>>>>
>>>>>>> My Pi zero W never writes to its SD car at all unless i change
>>>>>>> configurations,. Everything that writes is either stopped from writing
>>>>>>> or writes to ram discs.
>>>>>>>
>>>>>>> Some SD cards are better than others, I am not interested in finding out
>>>>>>> which
>>>>>>
>>>>>> This is helpful.
>>>>>>
>>>>> What would be more helpful would be some guidance on how to implement
>>>>> it! :-)
>>>>>
>>>>> E.g.  how do you stop systemd's logging from writing to 'hard' disk?
>>>>> It would need a **lot** of reconfiguration before it would use a
>>>>> reasonable amount of space such as is available on a RAM drive.
>>>>>
>>>>> Maybe there are versions of the OS that are optimised for minimal disk
>>>>> writing, if so I'd like to know about them.
>>>>
>>>> Wot I do:
>>>>
>>>> Replace /sbin/init with a shell script that sets up the minimal necessary
>>>
>>> So you don't run systemd? While that may be a 'good idea' in some ways
>>> it does require a **lot** of customisation.
>>
>> Absolutely not :)
>>
>> It's not a general-purpose computer, it's a device that runs a single program
>> (wot I wrote), and it isn't going to change, ever. Yes, figuring out how to
>> get things like wifi and sshd to run took a few iterations, but now that's a
>> solved problem.
>>
> Ah, that's a bit different from my situation, I need a familiar OS on
> the system in question.
> 
Yes. having e.g,. Apache and PHP on my zeros is essential. Those ware 
wheels I dont want to reinvent

-- 
When plunder becomes a way of life for a group of men in a society, over 
the course of time they create for themselves a legal system that 
authorizes it and a moral code that glorifies it.

  Frédéric Bastiat

[toc] | [prev] | [next] | [standalone]


#38317

From"s|b" <me@privacy.invalid>
Date2026-08-04 14:56 +0200
Message-ID<nde5skF8u7pU1@mid.individual.net>
In reply to#38314
On Tue, 4 Aug 2026 10:15:29 +0100, Chris Green wrote:

> s|b <me@privacy.invalid> wrote:
>
> > This is helpful.

> What would be more helpful would be some guidance on how to implement
> it! :-)

Exactly my point.
 
> E.g.  how do you stop systemd's logging from writing to 'hard' disk? 
> It would need a **lot** of reconfiguration before it would use a
> reasonable amount of space such as is available on a RAM drive.
> 
> Maybe there are versions of the OS that are optimised for minimal disk
> writing, if so I'd like to know about them.

Maybe he's just 'not interested' in explaining.

-- 
s|b

[toc] | [prev] | [next] | [standalone]


#38319 — Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT]

From"s|b" <me@privacy.invalid>
Date2026-08-04 15:09 +0200
SubjectRe: Are Pi Zeros more fussy about SD cards than other Pis? [OT]
Message-ID<nde6ktF90e4U2@mid.individual.net>
In reply to#38317
On Tue, 04 Aug 2026 14:56:57 +0200, s|b wrote:

> On Tue, 4 Aug 2026 10:15:29 +0100, Chris Green wrote:

That's weird, neither Chris's posting as Philo's were shown when I
posted my follow-up. They're both using ES as a newsserver while I'm
using NIN. Another ES hickup?

-- 
s|b

[toc] | [prev] | [next] | [standalone]


#38321 — Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT]

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2026-08-04 15:11 +0100
SubjectRe: Are Pi Zeros more fussy about SD cards than other Pis? [OT]
Message-ID<114sruu$273v0$3@dont-email.me>
In reply to#38319
On 04/08/2026 14:09, s|b wrote:
> On Tue, 04 Aug 2026 14:56:57 +0200, s|b wrote:
> 
>> On Tue, 4 Aug 2026 10:15:29 +0100, Chris Green wrote:
> 
> That's weird, neither Chris's posting as Philo's were shown when I
> posted my follow-up. They're both using ES as a newsserver while I'm
> using NIN. Another ES hickup?
> 
Quite likely

Out of order threads were very common back in the days of UUCP over 
modems :-)

-- 
The difference bweteen a psychopath and a saint is that the psychpoath 
takes what he can and gives only what he must, but the saint gives 
everything he can and takes only what he needs.


[toc] | [prev] | [next] | [standalone]


#38337 — Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT]

From"s|b" <me@privacy.invalid>
Date2026-08-05 20:25 +0200
SubjectRe: Are Pi Zeros more fussy about SD cards than other Pis? [OT]
Message-ID<ndhdglF2qalU1@mid.individual.net>
In reply to#38321
On Tue, 4 Aug 2026 15:11:42 +0100, The Natural Philosopher wrote:

> On 04/08/2026 14:09, s|b wrote:
>
> > That's weird, neither Chris's posting as Philo's were shown when I
> > posted my follow-up. They're both using ES as a newsserver while I'm
> > using NIN. Another ES hickup?

> Quite likely

First time in a long time that I've noticed this.
 
> Out of order threads were very common back in the days of UUCP over 
> modems :-)

I used a 56K and had to ask my mom if she wasn't planning on phoning
anyone.

<https://www.youtube.com/shorts/t-lEezejkPM>

-- 
s|b

[toc] | [prev] | [next] | [standalone]


#38323 — Re: Are Pi Zeros more fussy about SD cards than other Pis? [OT]

FromChris Green <cl@isbd.net>
Date2026-08-04 17:55 +0100
SubjectRe: Are Pi Zeros more fussy about SD cards than other Pis? [OT]
Message-ID<t4i9km-mhr2.ln1@q957.zbmc.eu>
In reply to#38319
s|b <me@privacy.invalid> wrote:
> On Tue, 04 Aug 2026 14:56:57 +0200, s|b wrote:
> 
> > On Tue, 4 Aug 2026 10:15:29 +0100, Chris Green wrote:
> 
> That's weird, neither Chris's posting as Philo's were shown when I
> posted my follow-up. They're both using ES as a newsserver while I'm
> using NIN. Another ES hickup?
> 
I use both ES and NIN, via leafnode running on my desktop machine. NIN
is stopping in September though isn't it?

-- 
Chris Green
·

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.raspberry-pi


csiph-web