From owner-freebsd-current@FreeBSD.ORG Mon Oct 18 06:32:00 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 96BC116A4CE for ; Mon, 18 Oct 2004 06:32:00 +0000 (GMT) Received: from auk1.snu.ac.kr (auk1.snu.ac.kr [147.46.100.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1346343D2F for ; Mon, 18 Oct 2004 06:32:00 +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 2004101815:30:28:820553.15513.2784934832 for ; Mon, 18 Oct 2004 15:30:28 +0900 (KST) Message-ID: <4173635C.5000304@yahoo.com> Date: Mon, 18 Oct 2004 15:31:56 +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 References: <20041013172834.81984.qmail@web54008.mail.yahoo.com> <4172E340.20206@freebsd.org> <41731071.2030405@yahoo.com> <417346BB.3050609@freebsd.org> <41734AFB.2040208@gamersimpact.com> In-Reply-To: <41734AFB.2040208@gamersimpact.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-TERRACE-SPAMMARK: NO (SR:8.22) (by Terrace) Subject: Re: I deleted /stand/, but I need it again for diskless boot... 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: Mon, 18 Oct 2004 06:32:00 -0000 Ryan Sommers wrote: > Tim Kientzle wrote: > >> Two things to check: >> >> 1) ldd /bin/pax >> >> should show you what shared libraries are >> required by /bin/pax. Make sure those are >> all available on the root partition. >> >> 2) From the ordinary command line, try >> >> cat [[one of /conf/$i/*.cpio.gz]] | /rescue/gzip -d | /bin/pax >> >> and check that /bin/pax is correctly >> recognizing the format of the archive. >> >> Of course, it's also worth trying the two changes >> here (/rescue/gzip for /stand/gzip and /bin/pax >> for /stand/cpio) separately, just to isolate >> the problem. > > I'll give you a better patch tomorrow to try. In the meantime, instead > of catting. Try using > > ( cd / ; /rescue/gzip -d $j.cpio.gz | pax -r -p e ) > > I believe this works, if it doesn't try > > ( cd / ; /rescue/gzip -d < $j.cpio.gz | pax -r -p e ) > > Also, in order for pax to work it only needs /lib/libc.so.[56]. If > you're willing to try I also have a patch here in the works that moves I'm willing to try just anything. The problem is that I'm not familiar with the cpio and pax commands. > With pax I noticed sometimes things don't get preserved unless you add > the "-p e", things like permissions and owners. Another thing, if you > created your archives with pax, I would recommend not using the old cpio > way of doing "find -d . | cpio -o >..." using this with pax will often > end up adding files multiple times, which isn't really a bug as much as > a feature gone amiss, instead add the -u flag to pax which boils down to > not including multiple copies of a file. This shouldn't be causing any > errors you are seeing but it's a possibility. I don't understand this, mainly because I'm not familiar with cpio and pax. At present I generate the var.cpio.gz and etc.cpio.gz, as follows: find /etc -type f | cpio -o > /conf/base/etc.cpio find /var -type d | cpio -o > /conf/base/var.cpio gzip /conf/base/etc.cpio gzip /conf/base/var.cpio Would you suggest to replace this by something like: find /etc -type f | pax -[what flags?] > /conf/base/etc.cpio find /var -type d | pax -[what flags?] > /conf/base/var.cpio gzip /conf/base/etc.cpio gzip /conf/base/var.cpio What flags would you suggest here? (then maybe also 's/cpio/pax/' here and in the initdiskless script) Rob.