How to create a Fedora install ISO for testing

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Correct the use of a local repo ... add steps to create just a boot.iso)
(Verify the ISO files before proceeding)
Line 5: Line 5:
 
== Setup ==
 
== Setup ==
  
In order to create Fedora ISO images, you must use a Fedora release that matches the release of the desired ISO images.  For example, to create Fedora [[Releases/Rawhide|Rawhide]] images, you need to be running Fedora Rawhide.  The examples in this document use {{package|mock}} to simulate the target environment and create ISO images.
+
In order to create Fedora ISO images, you must use a Fedora release that matches the release of the desired ISO images.  For example, to create Fedora [[Releases/Rawhide|Rawhide]] images, you need to be running Fedora Rawhide.  The examples in this document use {{package|mock}} to simulate the target environment and create ISO images.  If you already have a system available running the target release, the use of mock is not required.
  
 
<ol>
 
<ol>
Line 47: Line 47:
 
   --flavor Fedora --name Fedora --ver rawhide \
 
   --flavor Fedora --name Fedora --ver rawhide \
 
   -c /usr/share/spin-kickstarts/fedora-install-fedora.ks</pre></li>
 
   -c /usr/share/spin-kickstarts/fedora-install-fedora.ks</pre></li>
<li>If the previous command complete without error, you now have a DVD ISO image in your chroot.  Copy the ISO image out of the chroot.
+
<li>If the previous command complete without error, you now have PXEboot images and a {{filename|boot.iso}} available in your chroot.  Exit the mock shell, and copy the ISO image out of the chroot.
 
<pre>
 
<pre>
 
mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/
 
mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/
Line 64: Line 64:
 
   --flavor Fedora --name Fedora --ver rawhide \
 
   --flavor Fedora --name Fedora --ver rawhide \
 
   -c /usr/share/spin-kickstarts/fedora-install-fedora.ks</pre></li>
 
   -c /usr/share/spin-kickstarts/fedora-install-fedora.ks</pre></li>
<li>If the previous command complete without error, you now have a DVD ISO image in your chroot.  Copy the ISO image out of the chroot.
+
<li>If the previous command complete without error, you now have a DVD ISO image in your chroot.  Before proceeding, validate the ISO images using the {{command|sha256sum}} command
 +
<pre>
 +
cd /rawhide/Fedora/$(uname -i)/iso
 +
sha256sum -c Fedora-rawhide-$(uname -i)-CHECKSUM
 +
</pre></li>
 +
<li>Exit the mock shell, and copy the ISO image out of the chroot and have fun ...
 
<pre>
 
<pre>
 
mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/
 
mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/

Revision as of 12:29, 28 October 2010

QA.png


This page shows you how to build an ISO of Rawhide that you can use for testing. The tutorial requires that you open a root shell. To access a root shell, open a terminal and run the command su -, and provide the root password.

Contents

Setup

In order to create Fedora ISO images, you must use a Fedora release that matches the release of the desired ISO images. For example, to create Fedora Rawhide images, you need to be running Fedora Rawhide. The examples in this document use Package-x-generic-16.pngmock to simulate the target environment and create ISO images. If you already have a system available running the target release, the use of mock is not required.

  1. First, install the necessary packages
    yum install mock
  2. Initialize the mock chroot
    mock -r fedora-rawhide-$(uname -i) --init
    Note.png
    Behind the scenes...
    Mock does a lot of work behind the scenes. If you want to see what commands it's running in the chroot, add the --verbose option.
  3. Prepare the mock chroot for running pungi by installing packages into the chroot
    mock -r fedora-rawhide-$(uname -i) --install spin-kickstarts pungi ${EDITOR:-vi}

Create a local mirror (optional)

This section is optional. You can use a nearby official Fedora mirror over a broadband connection. However, you may find it useful to mirror Rawhide locally if you regularly participate in testing. Note that the Package-x-generic-16.pngmirrormanager package may be useful in some situations. Refer to the detailed MirrorManager page for more information.

  1. If you don't have Rawhide available on a fast, local link, you may want to mirror it locally using rsync. Find a nearby mirror at http://mirrors.fedoraproject.org
    mkdir -p /var/www/fedora/linux/development/x86_64/os
    cd /var/www/fedora/linux/development/x86_64/os
    rsync -Pavy --delete-after <MIRROR_NEAR_YOU>::/pub/fedora/linux/development/rawhide/$(uname -i)/os/ .
  2. In the mock chroot, edit the kickstart configuration file used by pungi.
    mock -r fedora-rawhide-$(uname -i) --shell ${EDITOR:-vi} /usr/share/spin-kickstarts/fedora-install-fedora.ks
  3. Remove (or comment out) the existing repo --name=fedora line and add a new entry for the local mirror. Using the example above, you would end up with ...
    repo --name=fedora --baseurl=file:///var/www/fedora/linux/development/$basearch/os
    
  4. When finished, save your changes and exit the chroot by pressing Ctrl-D or typing logout

Build a boot.iso

This section assumes you have installed the Package-x-generic-16.pngmock package and prepared the mock chroot as suggested in #Setup. If you haven't completed those steps, please do so now. This section also provides instruction on creating PXEboot and boot.iso images only. To create an installable -DVD.ISO image, see ##Build_a_DVD_ISO.

  1. Activate a shell inside the mock chroot
    mock -r fedora-rawhide-$(uname -i) --shell
  2. Next, create a DVD (this may take a while)
    pungi --nosource --nosplitmedia --nodebuginfo -G -C -B \
      --flavor Fedora --name Fedora --ver rawhide \
      -c /usr/share/spin-kickstarts/fedora-install-fedora.ks
  3. If the previous command complete without error, you now have PXEboot images and a boot.iso available in your chroot. Exit the mock shell, and copy the ISO image out of the chroot.
    mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/
    

Build a -DVD.ISO

This section assumes you have installed the Package-x-generic-16.pngmock package and prepared the mock chroot as suggested in #Setup. If you haven't completed those steps, please do so now.

  1. Activate a shell inside the mock chroot
    mock -r fedora-rawhide-$(uname -i) --shell
  2. Next, create a DVD (this may take a while)
    pungi --nosource --nosplitmedia --nodebuginfo \
      --flavor Fedora --name Fedora --ver rawhide \
      -c /usr/share/spin-kickstarts/fedora-install-fedora.ks
  3. If the previous command complete without error, you now have a DVD ISO image in your chroot. Before proceeding, validate the ISO images using the sha256sum command
    cd /rawhide/Fedora/$(uname -i)/iso
    sha256sum -c Fedora-rawhide-$(uname -i)-CHECKSUM 
    
  4. Exit the mock shell, and copy the ISO image out of the chroot and have fun ...
    mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/
    

Testing a release candidate

As indicated in the release engineering schedule, special candidate ISO images are made available for QA at the serverbeach1.fedoraproject.org staging site. You can simply download a release candidate from this site. Depending on your transfer speeds, you may have to wait a while to complete the download.

One solution is to use the rsync command to upgrade your local Fedora DVD ISO image to match the remote image. The assumes you have already built or downloaded a Fedora DVD ISO image, and the contents of your image are reasonably close to the state of the remote ISO image.

After running rsync, the resulting DVD ISO image can be verified as identical using the sha256sum command.

  1. Get the official file name of the DVD from the mirror. Note the directory location and the file name.
  2. Rename your local DVD ISO image to match the file name used on the remote location.
    mv Fedora-rawhide-$(uname -i)-DVD.iso Fedora-14-$(uname -i)-DVD.iso
  3. Use rsync to download the required bits to match your DVD to the original. The switches below deliver stats as you download, and effectively minimize the amount of downloading. Note that the location shown is an example only.
    rsync -Pavy alt.fedoraproject.org::stage/14.RC1/Fedora/$(uname -i)/iso/Fedora-14-$(uname -i)-DVD.iso .
  4. Use the sha256sum command to test the image for integrity. The resulting checksum should be identical to that shown in the *-CHECKSUM file that accompanies the image on the staging site.
    sha256sum Fedora-14-x86_64-DVD.iso

References

  1. For additional information on using Package-x-generic-16.pngpungi, see the Pungi documentation.
  2. For additional information on using Package-x-generic-16.pngmock, see Projects/Mock.