Subject: Re: How to run sshd on read-only mounted root file system?
To: None <>
From: Ian Zagorskih <>
List: tech-userlevel
Date: 02/24/2006 23:12:55
> makevar_start()
> {
>         echo "Setting up dynamic /var"
>         mkdir -m 0755 -p /var/dev /var/run /var/log /var/db
> /var/chroot/sshd mkdir -m 1777 -p /var/tmp
>  touch /var/log/authlog /var/log/messages /var/log/xferlog /var/log/aculog
>         echo "Setting up dynamic /dev"
>         cd /var/dev && /dev/MAKEDEV maks
>         ln -s /var/run/log /var/dev/log
>         echo "Mount dynamic /dev"
>         mount_null /var/dev /dev
> }

If it's important, MAKEDEV maks looks like this:

case $i in

        makedev std wscons wd0 wd1 md0 md1
        makedev ptm pty0 pty1 tty0 tty1
        makedev bpf random systrace clockctl
#       makedev pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
#       makedev usbs

# As of 2005-03-15, the "init" case must not create more than 1024 entries.

I.e. some minimal sub-set of devices to boot from Compact Flash + login with 
sshd. Note that devices made with the same script on the same system in an 
ordinary /dev mounted r/w allows me to login with SSH just fine i.e. this 
isn't the problem.

// wbr