Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mounting root readonly to protect flash in embedded system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
eddy89
Apprentice
Apprentice


Joined: 01 Feb 2006
Posts: 180
Location: /world/Italy/Torino

PostPosted: Mon Oct 03, 2011 8:09 am    Post subject: Mounting root readonly to protect flash in embedded system Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54317
Location: 56N 3W

PostPosted: Mon Oct 03, 2011 8:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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