I was creating a read-only root filesystem for use in an embedded system. I successfully got the system to boot after setting it to read-only initially, but then I needed write access to another file (/etc/hostname). I tried creating a symbolic link, like I did with /etc/fstab and /etc/resolv.conf, but the system fails to boot all the way - I have to boot into recovery mode and undo the change. Does anyone know an alternative to a symbolic link or why the link causes these problems?
Edit: When I boot into recovery mode, I can see two errors right at the end before it allows me to use the command-line:
startpar: service(s) returned failure: hostname.sh udev-mtab ... failed!
sulogin: root account is locked, starting shell
I tried editing /etc/init.d/hostname.sh to read hostname from /var/network/hostname (new location of the actual file), and now it boots to a login screen. This is running CrunchBang Linux, if that makes a difference. Does this help at all?