LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   cpio complains when unpacking initrd.img (https://www.linuxquestions.org/questions/red-hat-31/cpio-complains-when-unpacking-initrd-img-4175429163/)

PeterSteele 09-26-2012 01:51 PM

cpio complains when unpacking initrd.img
 
I want to modify initrd.img but when I run cpio against it, I get several errors, e.g.

[root@bryce initrd-new]# cpio -id <../initrd.img
cpio: ../firmware: Cannot symlink to `lib/firmware': Operation not permitted
cpio: ../modules: Cannot symlink to `lib/modules': Operation not permitted
cpio: sbin: Cannot symlink to `bin': Operation not permitted
cpio: /sbin/init: Cannot symlink to `init': Operation not permitted
...
cpio: ../../tmp: Cannot symlink to `var/lib/xkb': Operation not permitted
cpio: modules/2.6.32-279.el6.x86_64/kernel/net/netfilter/xt_rateest.ko.gz not created: newer or same age version exists

This is the same cpio command I've seem documented in various examples. It looks as if the extracted files are being confused through issues related to relative and absolute paths. I'm running this command in a temp directory. How can I extract and avoid these errors?

PeterSteele 09-26-2012 03:04 PM

I figured this out. I was doing the extract operation under a mount point for a USB drive where the initrd.img I wanted to update lived. When I created my temp directory elsewhere, cpio was happy. Not exactly sure what the explanation for this is, but I have a solution...

PeterSteele 09-26-2012 03:42 PM

I just realized the reason these links failed was because my USB stick was in vfat format and that doesn't support symbolic links. As always, user error...

colucix 09-26-2012 03:51 PM

Well done! This might be useful for others having the same issue and looking for a solution. Please, mark the report as SOLVED.

PeterSteele 09-26-2012 04:03 PM

Done...


All times are GMT -5. The time now is 12:04 AM.