Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question
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
    
@alanc please add this as an answer, I will accept it. –  TiCL Dec 18 '12 at 11:04

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.