<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.14">
<TITLE>RE: pungi used to create CD that includes a kickstart file</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;-----Original Message-----<BR>
&gt;From: fedora-buildsys-list-bounces@redhat.com on behalf of Phil Meyer<BR>
&gt;Sent: Tue 6/12/2007 5:26 PM<BR>
&gt;To: Discussion of Fedora build system<BR>
&gt;Subject: Re: pungi used to create CD that includes a kickstart file<BR>
&gt;<BR>
&gt;Martin Steinmann wrote:<BR>
&gt;&gt;<BR>
&gt;&gt; Using pungi on F7 I would like to create a CD that includes a<BR>
&gt;&gt; kickstart file to be used during installation of a system using this CD.<BR>
&gt;&gt;<BR>
.&gt;&nbsp;<BR>
.&gt;<BR>
.&gt; Is there a way to tell pungi to put a ks.cfg file into the root of the<BR>
&gt;&gt; CD and modify isolinux.cfg?<BR>
&gt;&gt;<BR>
&gt;&gt;&nbsp;<BR>
&gt;&gt;<BR>
&gt;&gt; Thanks<BR>
&gt;&gt;<BR>
&gt;&gt; --martin<BR>
&gt;&gt;<BR>
&gt;&gt; ------------------------------------------------------------------------<BR>
&gt;&gt;<BR>
&gt;&gt; --<BR>
&gt;&gt; Fedora-buildsys-list mailing list<BR>
&gt;&gt; Fedora-buildsys-list@redhat.com<BR>
&gt;&gt; <A HREF="https://www.redhat.com/mailman/listinfo/fedora-buildsys-list">https://www.redhat.com/mailman/listinfo/fedora-buildsys-list</A>&gt;<BR>
&gt;<BR>
&gt;Good question, and one that I solved by adding a special package and<BR>
&gt;directory to the release-notes stuff.<BR>
&gt;<BR>
&gt;here are the lines from my pungi.conf file:<BR>
&gt;<BR>
&gt;...<BR>
&gt;relnotedirre = images stylesheet-images ks<BR>
&gt;relnotepkgs = fjks fedora-release fedora-release-notes<BR>
&gt;....<BR>
&gt;<BR>
&gt;I make a package which contains a directory: /ks<BR>
&gt;which contains all of my kickstart files.<BR>
&gt;<BR>
&gt;One version of pungi required me to add these lines into /usr/bin/pungi. :(<BR>
&gt;<BR>
&gt;The idea is that pungi will add the fjks package to the base cdimage.<BR>
&gt;and copy the /ks directory to the root of the CD/DVD.<BR>
&gt;<BR>
&gt;That part works.<BR>
&gt;<BR>
&gt;You can now add: ks=cdrom:/ks/myks.cfg<BR>
&gt;to the boot paramaters for an install.<BR>
&gt;<BR>
&gt;The release notes ARE NOT copied into the root directory of the<BR>
&gt;initrd.img :(<BR>
&gt;<BR>
&gt;So I have to process that separately for my thumb drive installs.<BR>
&gt;<BR>
&gt;It goes like this:<BR>
&gt;<BR>
&gt;partition the thumb drive with two partitions, the first being 13MB and<BR>
&gt;the second the remainder of the drive.&nbsp; Tag the first partition as bootable.<BR>
&gt;<BR>
&gt;# mkfs -t vfat -n &quot;images&quot; /dev/sd?2<BR>
&gt;<BR>
&gt;# mount /dev/sd?2 /mnt<BR>
&gt;<BR>
&gt;# cp /srv/pungi/F7Developer/7/Custom/i386/iso/F-7-i386-DVD.iso /mnt<BR>
&gt;<BR>
&gt;# umount /mnt<BR>
&gt;<BR>
&gt;# dd if=/srv/pungi/F7Developer/7/Custom/i386/os/images/diskboot.img<BR>
&gt;of=/dev/sd?1<BR>
&gt;<BR>
&gt;...<BR>
&gt;# Now lets put our kickstart files into the initrd.img<BR>
&gt;<BR>
&gt;mount /dev/?1 /mnt<BR>
&gt;<BR>
&gt;rm -fr /tmp/img<BR>
&gt;mkdir /tmp/img<BR>
&gt;cd /tmp/img<BR>
&gt;gunzip -dc /mnt/initrd.img | cpio -icvdmu<BR>
&gt;# Copy kickstart files<BR>
&gt;# adjust below as needed (not everyone uses .ks extension)<BR>
&gt;mkdir ks<BR>
&gt;cp ${KS}/*.ks ks<BR>
&gt;cp ${KS}/home* ks<BR>
&gt;find . |cpio --quiet -c -o |gzip -9 &gt; ../initrd.img<BR>
&gt;cp ../initrd.img /mnt<BR>
&gt;cd<BR>
&gt;# rm -fr /tmp/img<BR>
&gt;umount /mnt<BR>
&gt;...<BR>
&gt;<BR>
&gt;Hope that is somewhat readable.<BR>
&gt;The trick is the arguments to cpio.<BR>
&gt;<BR>
&gt;It would be AWSOME if the process that builds the initrd.img would put<BR>
&gt;the release-notes there the same way, but they are never seen, so are<BR>
&gt;not needed.<BR>
&gt;<BR>
<BR>
<BR>
It looks like I am trying to do something pungi does not yet support :(.<BR>
<BR>
We are using pungi to build a custom distribution for an appliance, which is what was advertised in the F7 release announcement. Appliances by definition install automatically so that the install is reproducible every time - i.e. we need a kickstart file on the CD.<BR>
<BR>
I don't quite understand why you had to tweak the release note mechanism or even change the initrd.img file. All I would need is a %post section in the manifest file that would allow me to copy the kickstart file into the tree before genisoimage is run. In addition, I need to modify the isolinux.cfg file to add the kickstart kernel parameter. The rest is then done by Anaconda during stage 2.<BR>
<BR>
Has anyone looked at this already?&nbsp; Or is anyone interested in helping to patch pungi to do this?<BR>
<BR>
--martin<BR>
<BR>
<BR>
&gt;--<BR>
&gt;Fedora-buildsys-list mailing list<BR>
&gt;Fedora-buildsys-list@redhat.com<BR>
&gt;<A HREF="https://www.redhat.com/mailman/listinfo/fedora-buildsys-list">https://www.redhat.com/mailman/listinfo/fedora-buildsys-list</A><BR>
&gt;<BR>
&gt;<BR>
&gt;</FONT>
</P>

</BODY>
</HTML>