Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: jefferee on June 22, 2017, 11:43:24 AM
-
Pi 3, running piCore 8.1.5.
I'm using copy mode, with copy2fs.flg in /mnt/mmcblk0p2/tce.
Furthermore, in /opt/bootlocal.sh, I have the line
umount /mnt/mmcblk0p2
so that the SD card is unmounted after bootup.
But I am still seeing the green "ACT" light flash when I start up some software on the Pi... does this mean I still have I/O accessing the SD card, or is the ACT light indicating something else?
The software is for industrial control, using TCP sockets and tty ports (tty through a USB/RS-232 dongle) to communicate with external devices.
We really want to ensure that we aren't accessing the SD card at all following boot, to reduce the probability of the SD card being corrupted.
Any ideas? Can I see what processes might be accessing the SD card?
Thanks for your wisdom.
-
I believe the green light indicates general activity and not only µSD read/writes.
Maybe this helps you find out:
Simple disk activity monitor script
http://forum.tinycorelinux.net/index.php/topic,16256.msg96390.html#msg96390
-
I believe the green light indicates general activity and not only µSD read/writes.
Maybe this helps you find out:
Simple disk activity monitor script
http://forum.tinycorelinux.net/index.php/topic,16256.msg96390.html#msg96390
Thanks. I took a look through the script and figured for my purposes just a simple command-line call
cat /proc/diskstats | grep mmc
wold work well enough.
Definitely seeing the ACT light blinking without any changes to the numbers, and I can confirm that the numbers for mmcblk0 and mmcblk0p2 *do* change when I run filetool.sh... So I think this verifies that the ACT light must also show general activity, at least on the Pi 3.
-
Google says you can control it via /sys/class/leds/led0/trigger. What are the default contents (cat that file)?
-
Google says you can control it via /sys/class/leds/led0/trigger. What are the default contents (cat that file)?
Had a look... for my purpose as long as I'm sure the SD card is not being accessed I can cheerfuly ignore the light. 8)
But anyway:
tc@box:/sys/devices/platform/soc/soc:leds/leds/led0$ cat trigger
none kbd-scrollock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock [mmc0] mmc1 timer oneshot heartbeat backlight gpio cpu0 cpu1 cpu2 cpu3 default-on input
so... bunch of stuff in there by default.
-
jefferee,
from what I know, during the bootup, mmcblk0p2 is mounted rw, until umount /mnt/mmcblk0p2 in /opt/bootlocal.sh is executed.
Wouldn't it be nice to let mmcblk0p2 be mounted read-only, to reduce the probability of the SD card being corrupted even further?
(@all - how to accomplish this?)
-
sudo mount -o remount,ro /mnt/mmcblk0p2
-
Misalf,
wouldn't mmcblk0p2 stay mounted rw (at least for some time) before this command runs (from bootlocal.sh I guess)? If yes, could one change it to ro from the very beginning? (/etc/fstab ?)
sudo mount -o remount,ro /mnt/mmcblk0p2
-
Hi xpector
... could one change it to ro from the very beginning? (/etc/fstab ?)
No, /etc/fstab is not persistent. It gets rebuilt from scratch during startup.
-
You'd have to edit rebuildfstab and remaster to have it always mounted ro. But remember that SD cards can corrupt themselves even when mounted read-only.