pungi used to create CD that includes a kickstart file

Phil Meyer pmeyer at themeyerfarm.com
Tue Jun 12 21:26:55 UTC 2007


Martin Steinmann wrote:
>
> Using pungi on F7 I would like to create a CD that includes a 
> kickstart file to be used during installation of a system using this CD.
>
>  
>
> Is there a way to tell pungi to put a ks.cfg file into the root of the 
> CD and modify isolinux.cfg?
>
>  
>
> Thanks
>
> --martin
>
> ------------------------------------------------------------------------
>
> --
> Fedora-buildsys-list mailing list
> Fedora-buildsys-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-buildsys-list

Good question, and one that I solved by adding a special package and 
directory to the release-notes stuff.

here are the lines from my pungi.conf file:

...
relnotedirre = images stylesheet-images ks
relnotepkgs = fjks fedora-release fedora-release-notes
...

I make a package which contains a directory: /ks
which contains all of my kickstart files.

One version of pungi required me to add these lines into /usr/bin/pungi. :(

The idea is that pungi will add the fjks package to the base cdimage. 
and copy the /ks directory to the root of the CD/DVD.

That part works.

You can now add: ks=cdrom:/ks/myks.cfg
to the boot paramaters for an install.

The release notes ARE NOT copied into the root directory of the 
initrd.img :(

So I have to process that separately for my thumb drive installs.

It goes like this:

partition the thumb drive with two partitions, the first being 13MB and 
the second the remainder of the drive.  Tag the first partition as bootable.

# mkfs -t vfat -n "images" /dev/sd?2

# mount /dev/sd?2 /mnt

# cp /srv/pungi/F7Developer/7/Custom/i386/iso/F-7-i386-DVD.iso /mnt

# umount /mnt

# dd if=/srv/pungi/F7Developer/7/Custom/i386/os/images/diskboot.img 
of=/dev/sd?1

...
# Now lets put our kickstart files into the initrd.img

mount /dev/?1 /mnt

rm -fr /tmp/img
mkdir /tmp/img
cd /tmp/img
gunzip -dc /mnt/initrd.img | cpio -icvdmu
# Copy kickstart files
# adjust below as needed (not everyone uses .ks extension)
mkdir ks
cp ${KS}/*.ks ks
cp ${KS}/home* ks
find . |cpio --quiet -c -o |gzip -9 > ../initrd.img
cp ../initrd.img /mnt
cd
# rm -fr /tmp/img
umount /mnt
...

Hope that is somewhat readable.
The trick is the arguments to cpio.

It would be AWSOME if the process that builds the initrd.img would put 
the release-notes there the same way, but they are never seen, so are 
not needed.




More information about the buildsys mailing list