wiki:PungiDocs/RunningPungi
Last modified 3 years ago Last modified on 03/04/11 11:19:22

Running Pungi

Getting Pungi

You can get pungi from PungiDownload.

Preparing system

Pungi needs to run on the arch it is composing, as root, and with an install of what it is composing, eg if you are composing Fedora 8, you need to be running Fedora 8. This is so that the correct userland tools are used to create the images and such used by anaconda. The eventual usage of pungi will most likely be in mock chroots to facilitate this. It needs to run on the arch it is composing due to how anaconda-runtime determines what files to put in the boot images at this time.

Currently the releases of pungi are designed to run on an updated Rawhide system. Development of pungi always tracks Rawhide. Pungi requires:

  • root level access (calling pungi with sudo works)
  • a fair amount of space in /tmp (anaconda-runtime uses /tmp for many things)
  • a cache dir (defaults to /var/cache/pungi)
  • a clean version directory within the destination directory
  • a clean work directory within the destination directory
  • yum repositories that are NOT from CD/DVD as they have media:// URIs that do not work outside of CD/DVD defined in a kickstart file via 'repo' commands.
  • if you're not using the rpm package, you need anaconda-runtime installed plus all of its deps
  • A kickstart file with at least the following section (a minimal set of packages listed, season to taste:
    repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
    repo --name=rawhide-source  --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide-source&arch=$basearch
    %packages --nobase
    kernel
    xorg-x11-fonts-ISO8859-1-75dpi
    busybox-anaconda
    dejavu-lgc-fonts
    xen
    xorg-x11-fonts-base
    memtest86+
    xorg-x11-drivers
    selinux-policy-targeted
    kernel-xen
    anaconda-runtime
    man
    joe
    grub
    cracklib-python
    iscsi-initiator-utils
    memtest86+
    vnc-server
    

(Note, this set hasn't been tested in a while, you may need more)

Composing the tree

If you installed the rpm package:

    sudo pungi -c /usr/share/pungi/rawhide-fedora.ks

Season kickstart file as you wish.

Pungi can take many options:

Usage: pungi [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --name=NAME           the name for your distribution (defaults to "Fedora")
  --ver=VERSION         the version of your distribution (defaults to
                        datestamp)
  --flavor=FLAVOR       the flavor of your distribution spin (optional)
  --destdir=DESTDIR     destination directory (defaults to current directory)
  --cachedir=CACHEDIR   package cache directory (defaults to /var/cache/pungi)
  --bugurl=BUGURL       the url for your bug system (defaults to
                        http://bugzilla.redhat.com)
  --discs=DISCS         the number of discs you want to create (defaults to 1)
  --nosource            disable gathering of source packages (optional)
  --nosplitmedia        disable creation of split media (optional)
  --sourceisos          Create the source isos (other arch runs must be done)
  --force               Force reuse of an existing destination directory (will
                        overwrite files)
  -c CONFIG, --config=CONFIG
                        Path to kickstart config file
  --all-stages          Enable ALL stages
  -G                    Flag to enable processing the Gather stage
  -C                    Flag to enable processing the Createrepo stage
  -B                    Flag to enable processing the BuildInstall stage
  -I                    Flag to enable processing the CreateISO stage

Pungi assumes that the arch of your system is the arch you want to compose for. You can "fool" it by using mock. Useful to compose i386 while on x86_64. Just create an i386 chroot of rawhide and run pungi from inside of it.

Output will go to both the stdout and to a log file in your destination directory/logs/*.log

Running from Mock

Running pungi from within mock gives you greater flexibility in how you compose. You can use a single x86_64 system to compose both i386 and x86_64, of many different versions. See PungiDocs/RunningPungiInMock.