LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 09-26-2012, 02:51 PM   #1
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Rep: Reputation: Disabled
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?
 
Old 09-26-2012, 04:04 PM   #2
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
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...
 
Old 09-26-2012, 04:42 PM   #3
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
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...
 
1 members found this post helpful.
Old 09-26-2012, 04:51 PM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Well done! This might be useful for others having the same issue and looking for a solution. Please, mark the report as SOLVED.
 
Old 09-26-2012, 05:03 PM   #5
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
Done...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I pack stage2.img into initrd.img for a PXE linux rescue? real1elmo Red Hat 12 10-14-2009 07:29 PM
How to create new initrd.gz (or initrd.img) file? kkpal Programming 2 12-10-2007 09:38 AM
error: unpacking of archive failed: cpio: read tengun Linux - Software 1 11-10-2007 04:51 PM
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 01:09 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-02-2007 12:24 AM


All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration