<!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>><BR>
><BR>
><BR>
>-----Original Message-----<BR>
>From: fedora-buildsys-list-bounces@redhat.com on behalf of Phil Meyer<BR>
>Sent: Tue 6/12/2007 5:26 PM<BR>
>To: Discussion of Fedora build system<BR>
>Subject: Re: pungi used to create CD that includes a kickstart file<BR>
><BR>
>Martin Steinmann wrote:<BR>
>><BR>
>> Using pungi on F7 I would like to create a CD that includes a<BR>
>> kickstart file to be used during installation of a system using this CD.<BR>
>><BR>
.> <BR>
.><BR>
.> Is there a way to tell pungi to put a ks.cfg file into the root of the<BR>
>> CD and modify isolinux.cfg?<BR>
>><BR>
>> <BR>
>><BR>
>> Thanks<BR>
>><BR>
>> --martin<BR>
>><BR>
>> ------------------------------------------------------------------------<BR>
>><BR>
>> --<BR>
>> Fedora-buildsys-list mailing list<BR>
>> Fedora-buildsys-list@redhat.com<BR>
>> <A HREF="https://www.redhat.com/mailman/listinfo/fedora-buildsys-list">https://www.redhat.com/mailman/listinfo/fedora-buildsys-list</A>><BR>
><BR>
>Good question, and one that I solved by adding a special package and<BR>
>directory to the release-notes stuff.<BR>
><BR>
>here are the lines from my pungi.conf file:<BR>
><BR>
>...<BR>
>relnotedirre = images stylesheet-images ks<BR>
>relnotepkgs = fjks fedora-release fedora-release-notes<BR>
>....<BR>
><BR>
>I make a package which contains a directory: /ks<BR>
>which contains all of my kickstart files.<BR>
><BR>
>One version of pungi required me to add these lines into /usr/bin/pungi. :(<BR>
><BR>
>The idea is that pungi will add the fjks package to the base cdimage.<BR>
>and copy the /ks directory to the root of the CD/DVD.<BR>
><BR>
>That part works.<BR>
><BR>
>You can now add: ks=cdrom:/ks/myks.cfg<BR>
>to the boot paramaters for an install.<BR>
><BR>
>The release notes ARE NOT copied into the root directory of the<BR>
>initrd.img :(<BR>
><BR>
>So I have to process that separately for my thumb drive installs.<BR>
><BR>
>It goes like this:<BR>
><BR>
>partition the thumb drive with two partitions, the first being 13MB and<BR>
>the second the remainder of the drive.  Tag the first partition as bootable.<BR>
><BR>
># mkfs -t vfat -n "images" /dev/sd?2<BR>
><BR>
># mount /dev/sd?2 /mnt<BR>
><BR>
># cp /srv/pungi/F7Developer/7/Custom/i386/iso/F-7-i386-DVD.iso /mnt<BR>
><BR>
># umount /mnt<BR>
><BR>
># dd if=/srv/pungi/F7Developer/7/Custom/i386/os/images/diskboot.img<BR>
>of=/dev/sd?1<BR>
><BR>
>...<BR>
># Now lets put our kickstart files into the initrd.img<BR>
><BR>
>mount /dev/?1 /mnt<BR>
><BR>
>rm -fr /tmp/img<BR>
>mkdir /tmp/img<BR>
>cd /tmp/img<BR>
>gunzip -dc /mnt/initrd.img | cpio -icvdmu<BR>
># Copy kickstart files<BR>
># adjust below as needed (not everyone uses .ks extension)<BR>
>mkdir ks<BR>
>cp ${KS}/*.ks ks<BR>
>cp ${KS}/home* ks<BR>
>find . |cpio --quiet -c -o |gzip -9 > ../initrd.img<BR>
>cp ../initrd.img /mnt<BR>
>cd<BR>
># rm -fr /tmp/img<BR>
>umount /mnt<BR>
>...<BR>
><BR>
>Hope that is somewhat readable.<BR>
>The trick is the arguments to cpio.<BR>
><BR>
>It would be AWSOME if the process that builds the initrd.img would put<BR>
>the release-notes there the same way, but they are never seen, so are<BR>
>not needed.<BR>
><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?  Or is anyone interested in helping to patch pungi to do this?<BR>
<BR>
--martin<BR>
<BR>
<BR>
>--<BR>
>Fedora-buildsys-list mailing list<BR>
>Fedora-buildsys-list@redhat.com<BR>
><A HREF="https://www.redhat.com/mailman/listinfo/fedora-buildsys-list">https://www.redhat.com/mailman/listinfo/fedora-buildsys-list</A><BR>
><BR>
><BR>
></FONT>
</P>

</BODY>
</HTML>