Re: r/o root filesystem?
In article <firstname.lastname@example.org>,
Greg Stark <email@example.com> wrote:
>The files edited in /etc seem to be /etc/motd and /etc/nologin. Either we move
>these files to /var or we accept that DELAYLOGIN and EDITMOTD are implicitly
>false when / is read-only and just hide the errors with 2>/dev/null.
Why. If you setup your system to have a read-only root, which is
already non-standard, it's not really much extra work to edit
/etc/default/rcS and set DELAYLOGIN and EDITMOTD yourself.
>The trickier stuff are the various places that assume /dev is writable. I'm
>not sure these are all solvable. Things like xterm will never work properly if
>they can't set the owner of the pty.
xterm uses Unix98 ptys under /dev/pts, so that should be no problem.
In fact anything should be using that.
>But it still seems odd to me that boot
>scripts are going around doing mknod and chmod on devices.
># Create mountpoint and multiplexor device.
>[ -d /dev/pts ] || mkdir --mode=755 /dev/pts
>[ -c /dev/ptmx ] || mknod --mode=666 /dev/ptmx c 5 2
That's not a problem - they should be present anyway, and if they
are, nothing is going to happen.
># Set pseudo-terminal access permissions.
>if [ ! -c /dev/.devfsd ] && [ -c /dev/ttyp0 ]
> chmod 666 /dev/tty[p-za-e][0-9a-f]
> chown root:tty /dev/tty[p-za-e][0-9a-f]
That is really needed for old-style ptys to function correctly, but
I guess the errors could be suppressed for a read-only filesystem.
Adding '-f' would solve it. Or, you just remote /dev/tty[p-za-e][0-9a-f]
and /dev/pty[p-za-e][0-9a-f] from /dev and make sure everything
uses Unix98 style pseudo ttys. Everything should, by now.
Anyone who is capable of getting themselves made President should
on no account be allowed to do the job -- Douglas Adams.