View previous topic :: View next topic |
Author |
Message |
slick Bodhisattva
Joined: 20 Apr 2003 Posts: 3495
|
Posted: Tue Sep 29, 2009 7:34 am Post subject: |
|
|
JoHo42 wrote: | Also eigentlich sollte das /var Verzeichnis weiter beschreibbar sein.
Kann ich einfach alles Readonly mounten und nur das /var Verzeichnis
read write geht das wuerde das was bringen oder bekomme ich dann immer noch
Probleme beim booten? |
Ich hab das vor kurzem für einen kleinen VPN-Client gemacht. Prinzipiell hab ichs so gelöst das ich / readonly mounte (durch Eingriff in /sbin/init), dann jeweils eine Ramdisk für die beschreibbaren Verzeichnisse anlege und die Inhalte vom Orginalverzeichnis (oder nur die Verzeichnisstruktur, z.B. bei /var/log) in die Ramdisk kopiere. Anschliessend noch /etc/mtab "gefaked" und fertig. Ein "Rückkopieren" von der Ramdisk findet nie statt.
In etwa hier beschrieben, nur umgesetzt statt mit Unionfs mit Kopien der benötigen Verzeichnisse direkt in der Ramdisk (meine Verzeichnisse sind (unvollständig): /etc, /tmp, /root und einige aus /var (nicht /var komplett!))
http://www.gentoo-wiki.info/HOWTO_Read-only_root_filesystem#Unionfs_Method
Bei der kleinen Maschine liegen somit nur knappe 5MB vom Filesystem im Ram und das reicht bei mir völlig. Das ganze habe ich mit ext2 auf einer CF-Card, mit tune2fs noch fsck deaktiviert. (wie auch in der /etc/fstab) |
|
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
|
|