[opensuse] extract and modify initrd
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+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 11 July 2007 19:52, James Tremblay wrote:
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+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 2007-07-11 at 21:26 -0500, Rajko M. wrote:
On Wednesday 11 July 2007 19:52, James Tremblay wrote:
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+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 12 July 2007 05:27, James Tremblay wrote:
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+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2007-07-12 at 08:39 -0500, Rajko M. wrote:
On Thursday 12 July 2007 05:27, James Tremblay wrote:
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+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 12 July 2007 19:45, James Tremblay wrote: ...
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.
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.
if so the guys are there usually in #opensuse-kiwi @ freenode from 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+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
James Tremblay
-
Rajko M.