LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Read only OS (https://www.linuxquestions.org/questions/linux-general-1/read-only-os-875325/)

themanwhowas 04-16-2011 10:01 AM

Read only OS
 
Hey guys.

If i wanted my Linux install to act as non persistent, as in I boot from the hard drive as normal but any changes i make won't save, is it as simple as changing the filesystems to 'r' in fstab? Would I have to have some partitions rw, /var perhaps? I imagine read only /var would throw me tons of errors. Any other partitions I need?

Thanks

Snark1994 04-16-2011 10:30 AM

Quote:

Originally Posted by themanwhowas (Post 4326347)
I boot from the hard drive as normal but any changes i make won't save

I think the point here is that you won't be able to make changes... IMO a better way would be to have a script that "restores" the computer's state from a separate backup partition when you boot it up

themanwhowas 04-16-2011 12:17 PM

This is a good point, but i was thinking more like a live cd. You can install stuff, create files etc. Perhaps i could somehow unpack a live cd iso to a hard drive?

elliott678 04-16-2011 04:19 PM

Look into Tinycore, the base system loads into RAM from the initrd. Any changes won't survive a reboot unless you use the backup tool.

themanwhowas 04-16-2011 09:46 PM

Thanks, I'll give it a look see

anomie 04-16-2011 10:01 PM

In addition to TinyCore, for some variety check out Slax, Slitaz, and DSL. But - yes - if you want to start from a clean slate upon reboot, a live environment (probably CD) is a good way to go.

jefro 04-17-2011 03:53 PM

Every live cd/dvd could be usually made to do what you want. That is to use the image of the live cd and save it to your hard drive. The problem is that the normal way is set to root and allows read/write to local disks. You could fix that.

Simply using grub4dos would allow many iso's to be run directly. Almost every how to at pendrivelinux would work too for a hard drive as it does for a usb.

XavierP 04-17-2011 06:06 PM

http://kiosk.mozdev.org/
http://www.internetling.com/2008/04/...-distribution/
http://www.ehartwell.com/InfoDabble/...efox_and_Linux
The links above discuss creating a kiosk setup with Linux - this gives you the ability to restore settings on reboot and is designed for internet cafes and libraries. It may be an easier way to do this.

I found these links by putting "Linux kiosk" (minus the quotes) into Google.

themanwhowas 04-18-2011 08:19 PM

Thanks guys

enine 04-18-2011 08:38 PM

I did a read only setup a few years ago. Just kept looking through the init scripts until I found the place where it remounted root as r/w and commented that out.
I found there was a few things, mostly in var that needed to write so I did a search on how to create a ram drive, set that up early in the init and then would link the files there and touch them in the init so they were created in the ramdisk each time. was actually pretty easy.


All times are GMT -5. The time now is 02:53 PM.