Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 01-10-2012, 04:54 AM   #1
LQ Newbie
Registered: Jan 2012
Posts: 4

Rep: Reputation: Disabled
Question How to rebuild RedHat 6.2 isolinux/initrd.img?

I want to modify isolinux/initrd.img, which in RedHat 6.2 DVD. I tried many command(gunzip,cpio...), but failed. I run "file initrd.img", and it shows "initrd.img: data". Could anybody help to extract and rebuild it?
Old 01-10-2012, 10:09 PM   #2
John VV
LQ Muse
Registered: Aug 2005
Posts: 15,632

Rep: Reputation: Disabled
did you install RHEL 6 first ?

or are you trying to modify the data that is burned on the install dvd ?

your first step will be to update the system ( otherwise your modified image will be replaced with a kernel update )
 su -
yum update
Old 01-10-2012, 10:24 PM   #3
LQ Newbie
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Actually I install RedHat 6.2 and copy isolinux/initrd.img from DVD to local floder. Currently I can mount it and type "mount -t sysfs initrd.img /mnt/initrd". Now I want to add a file to initrd.img. I don't know how to do it.
Old 01-11-2012, 03:25 AM   #4
LQ Newbie
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I find the solution:

1) Extract
mv initrd.img initrd.img.xz
xz --format=lzma initrd.img.xz --decompress
mkdir initrd-new
cd initrd-new
cpio -ivdum < ../initrd.img

2) Add/delete/modify files

3) Build
find . -print |cpio -o -H newc | xz --format=lzma > ../initrd.img


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 to rebuild initrd-2.6.18-92.el5.img centguy Linux - Software 2 09-02-2010 10:43 PM
Looking for script to generate isolinux/initrd.img Skaperen Slackware 19 05-31-2009 10:32 AM
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
Initrd.img Error...Isolinux: Disk Error 80 bohh Slackware - Installation 1 07-29-2004 12:20 PM

All times are GMT -5. The time now is 03:47 AM.

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