5.3-Beta7 diskless boot: it boots but has empty /var (on /dev/md1) !?

Brooks Davis brooks at one-eyed-alien.net
Mon Oct 18 07:52:52 PDT 2004


On Sat, Oct 16, 2004 at 10:45:18PM -0500, Ryan Sommers wrote:
> Rob wrote:
> 
> >However, on the diskless PC, /var is on a memory
> >disk, but that directory is completely empty:
> >
> >  disklessPC# ls -a /var
> >  .       ..      .snap
> >
> >  disklessPC# mount
> >  192.168.123.254:/ on / (nfs, read-only)
> >  devfs on /dev (devfs, local)
> >  /dev/md0 on /etc (ufs, local, soft-updates)
> >  procfs on /proc (procfs, local)
> >  /dev/md1 on /var (ufs, local, soft-updates)
> >  192.168.123.254:/usr on /usr (nfs, read-only)
> >  192.168.123.254:/home on /home (nfs)
> >  /dev/md2 on /tmp (ufs, local, soft-updates)
> >
> >This has serious consequences on the diskless PC.
> >For example, sshd cannot start because /var/empty
> >is not there. There is no information in /var/run,
> >/var/log etc.
> >
> >Is something missing in the /etc/rc.d/initdiskless script,
> >or have I forgotten something?
> >
> >Thanks,
> >Rob.
> 
> The /var memory disk needs to be populated with a base structure. This 
> is handled in initdiskless by templates (see 
> /etc/rc.d/initdiskless:285). You can either have them as subdirectories 
> in your /conf/ or as dir.cpio.gz cpio'gzip archives that are then extracted.

/var is typically expected to be created by /etc/rc.d/var not
initdiskless.  However, if you want to do that, you need mtree,
newsyslog, and touch which are in /usr so /usr needs to be mounted.
Using a unified root without all this separate mounting of /usr
nonsense we currently document will make this all work and save you main
in many cases.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20041018/55f5d7be/attachment.bin


More information about the freebsd-current mailing list