Discussion:
extract and modify initrd
James Tremblay
2007-07-12 00:52:59 UTC
Permalink
Hey everyone,
I need to extract an initrd, some secret CPIO command, and modify the
scripts it runs. The initrd I want is the one used in the "mini" bootcd
for 10.2 , can anyone help?
--
James Tremblay
Director of Technology
Newmarket School District
Newmarket,NH
http://en.opensuse.org/Education
"let's make a difference"
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
Rajko M.
2007-07-12 02:26:26 UTC
Permalink
Post by James Tremblay
Hey everyone,
I need to extract an initrd, some secret CPIO command, and modify the
scripts it runs. The initrd I want is the one used in the "mini" bootcd
for 10.2 , can anyone help?
Hi James,

initrd is gzip archive that has one file that is cpio archive.

You need empty directory as in initrd is compressed few directories.
mkdir test
cd test
cp /boot/initrd-* ./initrd.cpio.gz
gunzip initrd.cpio.gz
cpio -iI initrd.cpio
rm initrd.cpio

which will extract file with all subdirectories and remove initrd.cpio leaving
you with content of initrd in current directory.

Manual for cpio is best readable in Konqueror.
Type in Location: "info:cpio" and you can read it.
You will need it to package initrd after editing.
--
Regards,
Rajko.
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
James Tremblay
2007-07-12 10:27:15 UTC
Permalink
Post by Rajko M.
Post by James Tremblay
Hey everyone,
I need to extract an initrd, some secret CPIO command, and modify the
scripts it runs. The initrd I want is the one used in the "mini" bootcd
for 10.2 , can anyone help?
Hi James,
initrd is gzip archive that has one file that is cpio archive.
You need empty directory as in initrd is compressed few directories.
mkdir test
cd test
cp /boot/initrd-* ./initrd.cpio.gz
gunzip initrd.cpio.gz
cpio -iI initrd.cpio
rm initrd.cpio
which will extract file with all subdirectories and remove initrd.cpio leaving
you with content of initrd in current directory.
Manual for cpio is best readable in Konqueror.
Type in Location: "info:cpio" and you can read it.
You will need it to package initrd after editing.
Rajko,

I'm in there and the 'init" script has been compiled rather than be just
a script, is there some magic there you can share or am I looking for\at
the wrong file?
--
James Tremblay
Director of Technology
Newmarket School District
Newmarket,NH
http://en.opensuse.org/Education
"let's make a difference"
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
Rajko M.
2007-07-12 13:39:04 UTC
Permalink
Post by James Tremblay
Rajko,
I'm in there and the 'init" script has been compiled rather than be just
a script, is there some magic there you can share or am I looking for\at
the wrong file?
The source for init is sysvinit-2.86-47.src.rpm

What about taking another approach; perl script initrd-install?

You can find both in directory
.... /opensuse/distribution/10.2/repo/src-oss/suse/src/

From description initrd-install:"
You can create an initrd for installation. Useful, for example, to set
up a UML or XEN environment."
--
Regards,
Rajko.
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
James Tremblay
2007-07-13 00:45:16 UTC
Permalink
Post by Rajko M.
Post by James Tremblay
Rajko,
I'm in there and the 'init" script has been compiled rather than be just
a script, is there some magic there you can share or am I looking for\at
the wrong file?
The source for init is sysvinit-2.86-47.src.rpm
What about taking another approach; perl script initrd-install?
You can find both in directory
.... /opensuse/distribution/10.2/repo/src-oss/suse/src/
From description initrd-install:"
You can create an initrd for installation. Useful, for example, to set
up a UML or XEN environment."
--
Regards,
Rajko,

Have you done anything with KIWI? KIWI will eventually be the premier
way to build all images from openSUSE, if you have talents with initrd's
and the kernel-default environment, we could use some help with building
the kernel description for the netboot process, it mostly would be
knowing what things to remove from the kernel to make a light weight
initrd, the LTSP5 initrd in Ubuntu is only 4 MB I can only get ours down
to 16 from 61.

if so the guys are there usually in #opensuse-kiwi @ freenode from
early AM EST to around 12 noon EST
--
James Tremblay
Director of Technology
Newmarket School District
Newmarket,NH
http://en.opensuse.org/Education
"let's make a difference"
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
Rajko M.
2007-07-13 04:02:43 UTC
Permalink
On Thursday 12 July 2007 19:45, James Tremblay wrote:
...
Post by James Tremblay
Rajko,
Have you done anything with KIWI?
No yet..
Right now I'm reading one of the links on the http://en.opensuse.org/KIWI that
gave me idea why you expected that init is a script. It can be, as it is in
10.2 /boot/initrd-xyz, but it can be any executable, as it is in mini iso.
Post by James Tremblay
KIWI will eventually be the premier
way to build all images from openSUSE, if you have talents with initrd's
and the kernel-default environment, we could use some help with building
the kernel description for the netboot process, it mostly would be
knowing what things to remove from the kernel to make a light weight
initrd, the LTSP5 initrd in Ubuntu is only 4 MB I can only get ours down
to 16 from 61.
Sizes
mini iso initrd 12619K 12.5 MB
initrd-2.6.18.8-0.5-default 3445328 3.5 MB
second is produced by
mkinitrd
script. It is pretty simple in the openSUSE environment that initrd is
intended for, and not so simple if it has to be build for different machine.
I haven't tried the former, yet.
Post by James Tremblay
early AM EST to around 12 noon EST
I'm typing slow and that makes IRC no joy :-(
--
Regards,
Rajko.
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
Continue reading on narkive:
Search results for 'extract and modify initrd' (Questions and Answers)
4
replies
h0w i 1nst4LL slax 0n t3h USB k?
started 2006-08-02 06:11:54 UTC
computers & internet
Loading...