[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is inability to operate with root read-only (and separate /etc, /dev, etc) a bug or design decision?

Daniel Dickinson <cshore@wightman.ca> writes:

> A little while back I tried to setup a system that used a read-only
> root filesystem during regular operation and ran into some problems
> during boot.  The first is that /etc needs to be read-write but init
> scripts break badly if /etc is not on the root filesystem (probably could
> be fixed in initramfs-tools).

Having /etc not on / is a problem becuase /etc/fstab is used to mount
things. You need a skeleton /etc on / with a minimal /etc/fstab and
any other files that are used before /etc is mounted. But I wouldn't
go there. That is the wrong approach.

Instead move the things in etc that need writing to other places:

1) link /etc/mtab to /proc/mounts and create a dummy /proc/mounts on /
   for when /proc isn't mounted (works with quota in current kernels).
2) Link /etc/resolv.conf to /var or install resolvconf package.
3) Link /etc/network/run to /dev/shm/

and so on.

A read-only / needs some configuring but it must be possible. If
anything blindly writes to /etc without provision of using some other
place or following a link then please file a bug.


Reply to: