Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Oct 2004 23:47:55 -0500
From:      Ryan Sommers <ryans@gamersimpact.com>
To:        Tim Kientzle <kientzle@freebsd.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: I deleted /stand/, but I need it again for diskless boot...
Message-ID:  <41734AFB.2040208@gamersimpact.com>
In-Reply-To: <417346BB.3050609@freebsd.org>
References:  <20041013172834.81984.qmail@web54008.mail.yahoo.com> <4172E340.20206@freebsd.org> <41731071.2030405@yahoo.com> <417346BB.3050609@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
>
> Cheers,
>
> Tim

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 
gzip to /bin which then will allow you to use it instead of 
/rescue/gzip. It worked on my system, I just need to bundle it up with 
some nice instructions since it also involves moving directories. It's 
just too late to do tonight.

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.

-- 
Ryan Sommers
ryans@gamersimpact.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41734AFB.2040208>