View previous topic :: View next topic |
Author |
Message |
eddy89 Apprentice
Joined: 01 Feb 2006 Posts: 180 Location: /world/Italy/Torino
|
Posted: Mon Oct 03, 2011 8:09 am Post subject: Mounting root readonly to protect flash in embedded system |
|
|
Hi all! I've installed gentoo on an embedded ARM board, all went successfully and works good.
Now, as the root fs stays on a micro SD, i would like to reduce writes as possible.
Actually I don't need to save logs or similar, I just want the system to start every time in the same way.
I thought to edit fstab to mount / readonly, and mount some dirs as tmpfs (the board has 512Mb of ram so it's ok).
The question is: wich directories needs to be writable to start correctly the system?
Thank you. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Mon Oct 03, 2011 8:31 pm Post subject: |
|
|
eddy89,
You need to make /etc/mtab a symlink to /proc/mounts to keep mount happy on a read only root.
/tmp needs to be writable
Parts of /var need to be writable too, .e.g. /var/log/... /var/run/... /var/lock/... They can all be in RAM as long as you don't mind throwing away logs at power off.
Exactly what depends on installed programs. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|