Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

rpm2cpio - extracting rpm contects : cannot re-open payload

paul_634
Occasional Contributor

rpm2cpio - extracting rpm contects : cannot re-open payload

I need to extract the contents of an rpm without installing the software. I have been trying to use
rpm2cpio | cpio -idv
as well as other combinations. However it keeps failing with the error :
----------------------------
cannot re-open payload:
End of volume
errno: 25, Can't read input
----------------------------
I have worked out the rpm2cpio is either not creating a correct cpio header or cpio is not working correctly.

Can you help with the correct command or an alternative way to extract the rpm please ?

thanks
5 REPLIES
Stephen Keane
Honored Contributor

Re: rpm2cpio - extracting rpm contects : cannot re-open payload

Try

rpm2cpio file.rpm > file.cpio

Then try various cpio options against file.cpio. If you can successfuly create file.cpio then the cpio command is probably to blame.
paul_634
Occasional Contributor

Re: rpm2cpio - extracting rpm contects : cannot re-open payload

Hi thanks,

I have been able to create the cpio file but when i use cpio is gives the error
------------------------------
bash-2.05b# cpio -id < a.cpio
Out of phase--get help
Perhaps the "-c" option should be used
------------------------------
I used the c,b,s options to see if the file format was different but I am still stuck.
Stephen Keane
Honored Contributor

Re: rpm2cpio - extracting rpm contects : cannot re-open payload

You could try -R flag for cpio (autoresync). Can you verify that the original RPM is OK?

You could try

# rpm -i --test file.rpm



paul_634
Occasional Contributor

Re: rpm2cpio - extracting rpm contects : cannot re-open payload

The cpio command with the -R option, gave the following error:
--------------------------------------------cpio -idR < a.cpio
cpio: Out of phase; resyncing.
cpio: Re-synced after skipping 5622042 bytes.
Archive file is incorrect or pathname exceeds MAXPATHLEN
--------------------------------------------
I have not been able to work out the error. Is it related to the rpm size ? the rpm is 768MB but well within the 2gb limit.

I also tried the rpm -i --test file.rpm command, it only advised I would need 603MB of space to install the rpm.

Stephen Keane
Honored Contributor

Re: rpm2cpio - extracting rpm contects : cannot re-open payload

Not sure why cpio is upset. You can list the contents of the RPM using

# rpm -qlp file.rpm

(from memory - I don't have access to a Linux box at present). Check for unusually long file names, or Unicode or something unusual that might upset cpio?