Re: Simplist way to boot only to a shell

Donald Teed <[email protected]>
Newsgroups gmane.linux.pxes.devel
Message-ID <[email protected]>
Yes, you are right.  I'm able to reproduce the problem
from cpio with this line:

/bin/sh -c "(cd $from; find -depth -print | cpio -pdum $to >
/tmp/base.log 2> /tmp/base.err)"

The version of cpio causing problems is 2.6.  If I change the
above command to use the cpio I have buried under
a KNOPPIX mastering area (which is cpio 2.5),
then the sym links are copied nicely.

There is an option -L for cpio that would cause no symlinks 
to be copied but the full files instead.  It seems as
if that is now assumed by cpio version 2.6 by default.

I tried adding the -l switch there to force it to use links.
That worked OK for a the command line above
run at a shell prompt, when copying bin from /opt area
to a /tmp/fun location.  When I make the same change
of adding (letter) -l switch to the cpio command in
PxesconfigModel.pm it doesn't solve the problem.
Now I get lots of errors like these:

cpio: cannot link ./bin/pmonitor to /tmp/pxes/./bin/pmonitor: Invalid
cross-device link
cpio: cannot link ./bin/esd to /tmp/pxes/./bin/esd: Invalid cross-device link

Likewise for --link option

Perhaps it could be rewritten with tar.  I gave it a try
but I found the checks of $tmpbase files were making
a lot of noise.  I'm not clear on what they are doing.

Here is my tar attempt:

$r = system("/bin/sh -c \"( (cd $from; tar -cf - * ) | ( cd $to ; tar
-xf - ) > $tmpbase.log 2> $tmpbase.err)\"");

I tried with and without the v to make it report information.
I think the checks following it need a change to work with tar.

We are getting close to the end of this...

--Donald Teed

On Sat, 12 Feb 2005 00:27:35 -0300, Diego Torres Milano <[email protected]> wrote:
> Probably cpio is affected, or at least its command line.
> Find the cpio line in PxesconfigModel.pm, add some debug, print it, and
> reproduce it manually.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.