1

I made a CPIO archive with following command on Solaris 11 (SPARC):

 find .  | cpio -ov >/tmp/myarchive.cpio

I copied it to Intel based Solaris 11 machine and tried to extract using the following command

cpio -icvdu < myarchive.cpio

It gives me following error:

cpio: Not a cpio file, bad header.
1 errors

The MD5SUM hash matches and I can extract it on another SPARC machine.

My question, does CPIO produce platform dependant output? Is there any way to convert it?

I cannot use TAR at this moment, because the directory I am archiving has long symbolic links that are skipped by TAR command

TiCL
  • 329
  • 4
  • 11
  • 1
    Is your copy & paste correct in that you didn't create the archive with the "-c" option (use ASCII portable format) but you are telling it to expect that format for reading the archive? – alanc Dec 17 '12 at 20:59

2 Answers2

3

If the quoted commands are copy and pasted correctly, this seems to be a mistake in the choice of flags - you didn't create the archive with the "-c" option (use ASCII portable format) but you are telling it to expect that format for reading the archive.

alanc
  • 1,500
  • 9
  • 12
1

I resolved the issue by using GNU CPIO and with -c (use old ASCII portable format) option during creation of archive. I assume the -c option also works for Solaris CPIO.

TiCL
  • 329
  • 4
  • 11