2

I am trying to create modify an u-boot filesystem image. At first I tried to extract, modify and then pack it again, but that didn't work, because extracting and repacking seems to mess up the ownerships of the files. So I tried to modify it, without explicit extraction using file-roller. This should work, but sadly file-roller saves the file in the wrong format and doesn't let me change the format.

So is there a way to convert a .cpio to newc-format without extracting it?

Before I used the following commands to extract and pack:

cpio -idv --no-absolute-filenames < ../filesystem.cpio
find . -print | cpio -ov -H newc > ../output.cpio
  • if you extract the cpio as root you will preserve the ownerships. – meuh Jun 29 '15 at 14:51
  • Thanks, that solved my problem! Do you want to put that into an answer so you can get the rep for that? – Dakkaron Jun 29 '15 at 15:58
2

if you extract the cpio as root you will preserve the ownerships.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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