From owner-freebsd-current@FreeBSD.ORG Sun Oct 17 11:12:12 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EA9816A4CE for ; Sun, 17 Oct 2004 11:12:12 +0000 (GMT) Received: from auk1.snu.ac.kr (auk1.snu.ac.kr [147.46.100.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76DFE43D3F for ; Sun, 17 Oct 2004 11:12:11 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: from [147.46.44.181] (spamrefuse@yahoo.com) by auk1.snu.ac.kr (Terrace Internet Messaging Server) with ESMTP id 2004101720:10:55:969671.15513.2830777264 for ; Sun, 17 Oct 2004 20:10:55 +0900 (KST) Message-ID: <4172538A.9080906@yahoo.com> Date: Sun, 17 Oct 2004 20:12:10 +0900 From: Rob User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041017 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ryan Sommers , freebsd-current@freebsd.org References: <4171D3AE.8010601@yahoo.com> <4171EACE.4020602@gamersimpact.com> In-Reply-To: <4171EACE.4020602@gamersimpact.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-TERRACE-SPAMMARK: NO (SR:3.27) (by Terrace) Subject: Re: 5.3-Beta7 diskless boot: it boots but has empty /var (on/dev/md1) !? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2004 11:12:12 -0000 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. Great! Thank you. This works very well. What I have done is putting only the directories in the var.cpio.gz, as follows: find /var -type d | cpio -o > /conf/base/var.cpio gzip /conf/base/var.cpio to regenerate the directory tree for /var on the diskless PC, assuming that individual files will be created as the system boots. The latter is indeed the case with files like /var/run/dmesg.boot /var/run/sshd.pid /var/run/syslog.pid /var/run/syslogd.sockets and so forth. However, /var/log/ is empty and remains empty !?!? Any idea why that is? I need to inspect files like /var/log/auth.log, /var/log/messages and so on. Why are these log files not generated? syslogd is running: # ps awux | grep syslog root 231 0.0 2.7 1316 760 ?? Ss 6:20PM 0:00.13 /usr/sbin/syslogd -ss rob 677 0.0 1.1 476 312 p2 R+ 8:09PM 0:00.01 grep syslog Thanks! Rob.