Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: onelife on May 31, 2020, 04:16:42 AM
-
Greetings all,
Hope you are safe and well - I've been trying to find a way to remotely run fsck on p2, the TCE / TCZ directory.
I run a network of remote machines and it seems often I get a corrupt p2 partition - I know I can umount p3 easily and run fsck BUT how can this be done on p2 - If at all?
As I say, this needs to be remotely done without removing the SD card from the machine and mounting into another machine.
Any ideas :)
Many Thanks!
-
If you set the copy2fs flag, you should be able to unmount mmcblk0p2 after reboot
-
I’ve been toying with adding fsck to tc-config..... and allowing a boot code to force fsck.
-
Thank you Juanito,
Appreciate the quick answer - But I have been trying to set this boot option without luck :(
I actually don't even see the option "copy2fs" on the boot options? Maybe that's not the exact option I need to a add to cmdline3.txt?
I have tried to add the option, but still I can not umount p2 - Any idea how I can check this further?
I have another question I would like to ask as well, but will start a new thread as not exactly the same topic.
Many Thanks.
-
You need to either use the apps gui to set the copy2fs flag or:
$ touch /etc/sysconfig/tcedir/copy2fs.flg
-
Hi onelife
Do you have persistent /home or /opt directories ? I don't know for sure, but if you do, you might need to unmount them before
trying to unmount p2.
-
THANK YOU! Setting that flag file did the trick to allow me to fsck p2.
I assume I did this right in that you have to set this flag, store the flag file in /opt/.filetool.lst and then make a new backup and only after reboot does the boot process then copy fs as such and this allows you to umount it?
That is what I did and seemed to work even though from what I understand I have persistent /opt/ and /home/xxx.
My question now would be, what is the difference between keeping a system like this by default? Besides using more RAM I guess? What are the ups or downs of setting this flag? Sorry for my ignorance, but never used this flag before and maybe just maybe it will help with the case where my p2 gets corrupt?
Thank you so much.
-
The copy2fs flag is on permanent storage (/mnt/mmcblk0p2/tce/optional unless you changed it), so no need to add to your backup.
Reading the tinycore book will help with your other questions:
http://tinycorelinux.net/book.html