LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-10-2004, 06:11 PM   #1
rootyard
Member
 
Registered: Aug 2003
Posts: 167

Rep: Reputation: 30
How to decompress initrd.img to a directory


Does anyone know how I can decompress initrd.img to a directory, make my changes in this directory and then create a new initrd.img with the data in this directory?
 
Old 07-10-2004, 10:09 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
i have this here about changing a module
perhaps it is usefull perhaps not.......
i hope it doesn't take you in a wrong direction
i don't use initrd.img so i have never tried to used this
but it does seem to make sense based on what i know about boot image

cp ./initrd.img /tmp/
gzip -dc /tmp/initrd.img > /tmp/initrd.unc.img
mkdir /tmp/imagemount
mount -o loop /tmp/initrd.unc.img /tmp/imagemount
gzip -dc /tmp/imagemount/modules/modules.cgz > /tmp/modules.cpio
mkdir /tmp/modules
cd /tmp/modules
cpio -idumv < ../modules.cpio
cd x.x.xBOOT(whatever the directory is)
rm <whateverModule>
cp /usr/src/linux-x.x/whatever/whatever/<whateverModule> ./<WhateverModule>
cd ..
find . -type f | cpio -ocO /tmp/newmods.cpio
cd ..
gzip -c newmods.cpio > imagemount/modules/modules.cgz
umount /tmp/imagemount
gzip -c initrd.unc.img > initrd.img
cp initrd.img <to wherever it goes>
 
1 members found this post helpful.
  


Reply



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
Initrd.img spaguzz Slackware 4 12-16-2004 03:35 AM
Initrd.img spaguzz Linux - Software 1 12-09-2004 03:21 PM
Kernel initrd.img? microsoft/linux Debian 15 10-29-2004 12:35 PM
What's an initrd.img? hotel-lima Linux - Newbie 2 06-11-2004 05:50 PM
initrd.img php_rocks Linux - Newbie 1 08-31-2003 11:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:18 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
Open Source Consulting | Domain Registration