byersjab at gmail.com
Sat Jul 10 22:22:25 UTC 2010
> Ty for reply,
> but i dont need the system /sbin/init
> i need the source code of /sbin/init from initrd.img
> if you unpack the initrd.img from Fedora 8 CD-ROM
> you will find a binary called init, what is a sym link from /sbin/init
> from initrd.img.
> but i already find what i need
> on fedora 8 anaconda installer create this init from your compilation,
> and when you install anaconda on the CD he copy you initrd to /cdrom/isolinux/initrd.img
> so now i can do what i want.
It sounds like you might have solved your problem.
If not, the following might help.
Your English is causing me some trouble in understanding what you want to do.
I _think_ you might be trying to modify the init file which is
embedded inside the initrd.gz.
This file is not a "binary" but is an "executable script".
You need to do a 3 step process
1) unpack the initrd.gz
2) edit the init file
3) repack with the modified init file
Following is from some old notes from a long time ago:
I have used (not recently) this prescription and it works.
8. Modifying an Existing Initial Ram Disk
briefly describes how an initrd_usb.gz file may be unscrambled, modified and
put back together again.
8.2 Detailed Instructions
cd go to root's home dir
mkdir clean; cd clean make and go somewhere clean
cp /boot/initrd_usb.gz . cp initrd_usb.gz to clean dir
gunzip -c initrd_usb.gz | cpio -i gunzip and expand
This unpacks a complete directory structure
- the vital file is init, edit as required.
Remember to move the original file first or it will be incorporated
in the new initrd image!!
mv initrd_usb.gz ~
find . | cpio -c -o | gzip -9 > ~/initrd_usb_modified.gz
The file can then be relocated to /boot and grub.conf modified to match.
I hope this helps
More information about the users