[Fedora-livecd-list] Extract original ISO from initrd.img file

Richard W.M. Jones rjones at redhat.com
Thu Apr 28 11:37:11 UTC 2011


On Thu, Apr 28, 2011 at 01:18:29PM +0200, Alan Pevec wrote:
> On Thu, Apr 28, 2011 at 6:13 AM, hai wu <haiwu.us at gmail.com> wrote:
> > Is there a tool to auto-extract livecd/ISO file from initrd.img (which was
> > generated from livecd-iso-to-pxeboot command)?
> 
> -to-pxeboot appends gziped cpio archive with ISO file to the original
> initrd cpio archive, so if you know original initrd size, you could
> extract appendix using e.g. dd. In general case, tool is needed to
> search for the end-of-cpio-archive marker ("TRAILER!!!") which is what
> attached Richard's initrdsplitter.c is doing, Read comments for usage.

As Alan says.

Even better is not to get into this situation, ie. save the ISO before
running livecd-iso-to-pxeboot ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/


More information about the livecd mailing list