LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to make ReadOnly FS on HD SUSE 10 (https://www.linuxquestions.org/questions/linux-general-1/how-to-make-readonly-fs-on-hd-suse-10-a-524819/)

FrankRizzo 02-01-2007 07:46 PM

How to make ReadOnly FS on HD SUSE 10
 
Evening gents. I'm working on a consumer device that will lose power, and be turned off with no regards to the OS, or FS being dirty. That being the case, I'd like to make the OS stuff read-only, so that it can't be corrupted. (I'd LOVE to put it on a USB stick, or a CF card, but can't.) So my question is, "What do I have to do to get a working system with a RO file system?"

I've set RO in grub, and then modified /etc/init.d/autofs to mount the root (/) as read-only, but the system doesn't seem to like that, since the only things showing up as mounted are /proc and /udev. This causes some problems like when I run any of my apps (text mode apps of course), they immediately seg fault. I'm hoping that someone here has done this, and can point me to a page that discusses it, or can just tell me what you did to make it work. (I have another partition on the driver with will contain the stuff that gets modified, I.E. the user's data, but I want the boot/system partition to be RO to avoid corruption).

Thanks!
Frank

Junior Hacker 02-02-2007 11:18 PM

Most systems need to write log files, dmesg etc., that is probably why that option is not liked. And during boot-up, things need to be executed, if you want to do anything, you will have to execute.

wildar 02-02-2007 11:40 PM

What about running from a LiveCD?

FrankRizzo 02-03-2007 11:03 AM

For all intents and purposes, I don't have a CD drive available for a LiveCD. (Unless there is a way to put the image on the HD, and make it boot from it).

JH: Could I used unionfs or something to make a small ramdisk and let it do it's writing to there? If so, what directories/files do I need to have there to make it happy?

Junior Hacker 02-03-2007 02:16 PM

Quote:

Originally Posted by FrankRizzo

JH: Could I used unionfs or something to make a small ramdisk and let it do it's writing to there? If so, what directories/files do I need to have there to make it happy?

That's over my head.

Have you tried chown & chmod on / to owner, chances are owner is root already, for permissions:

chmod -R 700 /

To give owner full permissions, no permissions for group and others. Power outages are not un-common, operating systems recover from this.


All times are GMT -5. The time now is 03:50 AM.