主题: [ZT] How To: Build A Read-Only Linux System

http://www.logicsupply.com/blog/2009/01 … ux-system/

How To: Build A Read-Only Linux System

Posted on January 27, 2009 by Forest
Filed Under General, Linux

There seem to be a lot of people out there looking to run a custom application
on a Linux-based platform running on a solid-state storage device. From time to
time, we receive questions from customers looking to make their Linux platforms
read-only in order to maximize the longevity of their flash devices. I thought
I’d take the opportunity to create a blog post describing one way to do this.

There are a couple of different approaches to making a Linux system read-only.
Unfortunately, it is usually not as simple as using a conventional filesystem
mounted with the read-only option. Many programs assume that at least some
parts of the system are writable. In some cases, these programs will fail to
run correctly if this turns out not to be the case.

I’ll outline here what I think is the best approach for most applications. It is
similar to that taken by the current generation of live CD distributions.

Live CDs typically have read-only access to a root filesystem, which is often
compressed into a single file to be mounted later using a loopback device.
Knoppix broke new ground with its use of the cloop filesystem for this purpose.
More recent live distributions take this a step further by using a union
filesystem to make the root filesystem writable. This approach is quite useful
for our purposes, as well.

请移步至文章出处阅读全文:
http://www.logicsupply.com/blog/2009/01 … ux-system/