Closed jk987 closed 2 years ago
Meanwhile I'm studying how the overlay file system should work and if I try simple experiment then it works:
root@realtimepi:/home/pi# mkdir lower
root@realtimepi:/home/pi# mkdir upper
root@realtimepi:/home/pi# echo low > lower/low.txt
root@realtimepi:/home/pi# echo up > upper/up.txt
root@realtimepi:/home/pi# mkdir work
root@realtimepi:/home/pi# mkdir merge
root@realtimepi:/home/pi# mount -t overlay overlay -o lowerdir=lower,upperdir=upper,workdir=work merge
... check that in merge is both low.txt and up.txt ...
root@realtimepi:/home/pi# echo m > merge/m.txt
... upper/m.txt is created ...
root@realtimepi:/home/pi# rm merge/up.txt
root@realtimepi:/home/pi# rm merge/low.txt
... lower/low.txt stays untouched, in upper stays only m.txt and some weird low.txt ...
I guess that now I should try to understand how to mount root this way on boot.
Does it work for you on normal Rpi OS?
Yes, I tried something called 2022-09-22-raspios-bullseye-armhf-lite.img and it worked.
Do you think I could try to mix somehow your realtime image with standard raspbian?
I'm still sort of linux beginner so I don't know very well eg. what the initrd image is for and whether I could take offical initrd image and put it into your system.
That image is newer than the released version of RealtimePi 0.5.0 that uses 2021-05-07.\
I can build a nightly image for to test. You can also just install the latest realtime kernel, but I did not test it: https://github.com/kdoren/linux/releases/tag/rpi_5.15.65-rt49
Sorry for the delay.
I found this solution: http://wiki.psuter.ch/doku.php?id=solve_raspbian_sd_card_corruption_issues_with_read-only_mounted_root_partition And it works pretty well for me. One executable script in /sbin and calling this script from /boot/cmdline.txt For me it is nice simple solution.
No worries thanks for sharing, does it work now for you? Should I close the issue?
Like I said. It works fine. You can close it.
If I try to switch on overlay file system in raspi-config (in Performance Options) then everything seems to be ok. It is generating new initrd image, cmdline.txt contains "boot=overlay", script /etc/initramfs-tools/scripts/overlay exists... But if I try to write something on disk after reboot then it is still there after next reboot. I tried 2021-05-07-realtimepi-buster-armhf-lite-0.5.0.img
Any ideas?