You are not logged in.

#1 2009-02-15 02:19:21

xirtyllo
Member
Registered: 2009-02-15
Posts: 7

I want to mount my root (/) partition Read-Only

I have Arch installed on my Acer Aspire One... and it works great on this little machine!

The Acer One has no hard disk, but uses SSD, so to reduce writes to disk i use EXT2, I have my /home on a separate SD card, and I mounted log and temp directories on tmpfs:
/var/log, /var/tmp, /tmp, /var/cache/pacman/pkg .

now i would like to mount the root partition (/) read only.
the reason is that i want that filesystem (EXT2) to be safe in case of improper power-off or any other disaster cool ...

this guide for Opensuse shows how to take care of resolv.conf and mtab files (which are, I suppose, the only files that need to be writable, after i moved the log and temp directoryes in tmpfs and the home on SD card)
http://en.opensuse.org/How-To_Make_the_ … _read-only
but then the guide advises to change some configuration files, so that the sistem doesn't remount the root partition read-write after fsck.
unfortunately the files named in the gyuide are related to Suse, and i didn't find them in Arch...:/
In fact i tried to add the "ro" option to the / partition in my /etc/fstab and i rebooted the system, but as root i can still write to the partitions..

  Ideas and Info ..?!

THX
xirtyllo

Offline

#2 2009-02-15 04:02:04

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: I want to mount my root (/) partition Read-Only

xirtyllo wrote:

In fact i tried to add the "ro" option to the / partition in my /etc/fstab and i rebooted the system, but as root i can still write to the partitions..

because, as the suse guide notes:

After the fsck the script remounts the root file system as read-write.

while suse does that in /etc/init.d/boot.rootfsck, every distro (afaik) does that *somewhere*

try

grep -R remount /etc/

to find the arch linux equivalent, and then

Find every line that remounts and change it like this:

as the guide suggests.

hope that helps!


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#3 2009-07-22 14:39:15

xirtyllo
Member
Registered: 2009-02-15
Posts: 7

Re: I want to mount my root (/) partition Read-Only

big_smile

Kludge,
Thank you very much for your answer!

I'm sorry i didn't reply before but i completely forgot!


At the end I did it! and had my Acer One completely read only!

Offline

Board footer

Powered by FluxBB