How to create a Fedora install ISO for testing

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Updated kickstart link)
(Reorganized and added mock information)
Line 1: Line 1:
This page shows you how to build an ISO of Rawhide that you can use for testing.
+
{{header|qa}}
  
{{admon/important | Testing pre-releases | There are specific sections below that show how to get a DVD that matches the version being used by the [[QA]] group for testing Fedora pre-releases.}}
+
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 {{command|su -}}, and provide the root password.
  
The rest of this tutorial requires that you open a root shell.  Open a terminal and run the command {{command|su -}}, and provide the root password.
+
== Setup ==
  
== Making a local copy of Rawhide ==
+
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.
  
{{admon/note | Optional | This section is optional. You can use a nearby official Fedora mirror over a broadband connectionHowever, you may find it useful to mirror Rawhide locally if you regularly participate in testing. Note that the {{package|mirrormanager}} package may be useful in some situations.  Refer to the [[Infrastructure/MirrorManager | detailed MirrorManager page]] for more information.}}
+
<ol>
 +
<li> First, install the necessary packages <pre>yum install mock</pre></li>
 +
<li> Initialize the mock chroot <pre>mock -r fedora-rawhide-$(uname -i) --init</pre>
 +
{{admon/note|Behind the scenes...|Mock does a lot of work behind the scenesIf you want to see what commands it's running in the chroot, add the <code>--verbose</code> option.}}</li>
 +
<li> Prepare the mock chroot for running {{command|pungi}} <pre>mock -r fedora-rawhide-$(uname -i) --install spin-kickstarts pungi</pre></li>
 +
</ol>
  
If you don't have Rawhide available on a fast, local link, you may want to mirror it locally using {{command|rsync}}.
+
== 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|mirrormanager}} package may be useful in some situations.  Refer to the [[Infrastructure/MirrorManager | detailed MirrorManager page]] for more information.
 +
 +
<ol>
 +
<li>If you don't have Rawhide available on a fast, local link, you may want to mirror it locally using {{command|rsync}}.  Note the following commands assume you are interested in testing the <code>x86_64</code> (64-bit) architecture.  Substitute <code>i386</code> as needed for 32-bit architecture.
 
<pre>mkdir -p /var/www/fedora/linux/development/x86_64/os
 
<pre>mkdir -p /var/www/fedora/linux/development/x86_64/os
 
cd /var/www/fedora/linux/development/x86_64/os
 
cd /var/www/fedora/linux/development/x86_64/os
rsync -Pavy --delete-after <MIRROR_NEAR_YOU>::fedora-linux-development/x86_64/os .</pre>
+
rsync -Pavy --delete-after <MIRROR_NEAR_YOU>::fedora-linux-development/x86_64/os .</pre></li>
 +
<li> In the mock chroot, edit the repository configuration to use your local mirror.
 +
<pre>mock -r fedora-rawhide-$(uname -i) --shell vi /etc/yum.repos.d/fedora-rawhide.repo</pre>
 +
</li>
 +
<li>
 +
Replace <code>mirrorlist</code> with a pointer to the local mirror.  Using the example above, you would end up with ...
 +
<pre>
 +
baseurl=file:///var/www/fedora/linux/development/$basearch/os
 +
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch
 +
</pre>
 +
<li>When finished, exit the chroot by pressing <code>Ctrl-D</code> or typing {{command|logout}}
 +
</li>
 +
</ol>
  
Note that these commands assume you are interested in testing the <code>x86_64</code> (64-bit) architectureSubstitute <code>i386</code> as needed for 32-bit architecture.
+
== Build a DVD ISO ==
 +
This section assumes you have installed the {{package|mock}} package and prepared the mock chroot as suggested in [[#Setup]]If you haven't completed those steps, please do so now.
  
== Testing Rawhide ==
 
<!-- I forgot, you need to use an HTML <ol> if you want command sections in between steps in a procedure. -->
 
This section shows the procedure to make a DVD-sized ISO image from the Rawhide repository.
 
 
<ol>
 
<ol>
<li>You must be ''running'' Rawhide, or use {{package|mock}} to continue.  Refer to [https://fedorahosted.org/pungi/wiki/PungiDocs/RunningPungi the Pungi documentation] for more information.  One easy way to proceed, since you presumably have a Rawhide mirror available (see above), is to install Rawhide in a virtual guest machine.</li>
+
<li> Activate a shell inside the mock chroot
<li>You can use the same tools that [[ReleaseEngineering | Fedora Release Engineering]] uses to make a DVD.  First, install the {{package|pungi}} package.
+
<pre>mock -r fedora-rawhide-$(uname -i) --shell</pre>
<pre>yum install pungi</pre></li>
+
</li>
<li>Change directory to an area with gobs of free space.  Use the {{command|df -h}} command to find a location if needed.
+
<li> Next, create a DVD (this may take a while)
<pre>cd /tmp</pre></li>
+
<pre>pungi --nosource --nosplitmedia --nodebuginfo --all-stages \
<li>Download the current kickstart file for Rawhide.
+
  --flavor Fedora --name Fedora --ver rawhide \
<pre>curl -o fedora-install-fedora.ks 'http://git.fedorahosted.org/git/?p=spin-kickstarts.git;a=blob_plain;f=fedora-install-fedora.ks;hb=HEAD'</pre></li>
+
  -c /usr/share/spin-kickstarts/fedora-install-fedora.ks</pre></li>
<li>Edit the {{command|repo}} commands in the {{filename|rawhide-fedora.ks}} file to point at your local mirror, if neededIf the mirror is on your hard disk as above, for example, use this command in the kickstart file:
+
<li>If the previous command complete without error, you now have a DVD ISO image in your chrootCopy the ISO image out of the chroot.
<pre>repo --name=rawhide --baseurl=file:///var/www/fedora/linux/development/$basearch/os</pre>
+
<pre>
If you do not make these changes, the packages for Rawhide will be downloaded from a nearby official Fedora mirror.  Note that this could take several hours even on a fast broadband connection.</li>
+
mock -r fedora-rawhide-$(uname -i) --copyout /rawhide/Fedora/$(uname -i)/iso/Fedora-rawhide-$(uname -i)-DVD.iso /tmp/
<li>Make the DVD image:
+
</pre>
<pre>pungi --nosource --nosplitmedia --nodebuginfo --all-stages --flavor Fedora -c fedora-install-fedora.ks</pre></li>
+
 
</ol>
 
</ol>
  
 
== Testing a release candidate ==
 
== Testing a release candidate ==
Special release candidates are made available through [http://alt.fedoraproject.org the alt.fedoraproject.org staging site].  You can simply download a release candidate from this site, although the transfer speed generally means you must wait several hours for an ISO image.
+
As indicated in the [http://poelstra.fedorapeople.org/schedules/f-{{FedoraVersion|number|next}}/f-{{FedoraVersion|number|next}}-releng-tasks.html release engineering schedule], special candidate ISO images are made available for [[QA]] at [http://serverbeach1.fedoraproject.org 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.
  
However, if you've already built a DVD ISO image from Rawhide, and Rawhide is reasonably close to the state of the release candidate, you can use {{command|rsync}} to "upgrade" your Rawhide DVD ISO image to the release candidate.  The resulting DVD ISO image can be verified as identical using the {{command|sha256sum}} command.
+
One solution is to use the {{command|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 {{command|rsync}}, the resulting DVD ISO image can be verified as identical using the {{command|sha256sum}} command.
  
 
<ol>
 
<ol>
<li>Get the official file name of the DVD from the mirror.  Note the directory location ''and'' the file name.</li>
+
<li>Get the official file name of the DVD from the mirror.  Note the directory location '''and''' the file name.</li>
<li>Rename your DVD ISO image to the same name as the official file.
+
<li>Rename your local DVD ISO image to match the file name used on the remote location.
<pre>cd 20090325/x86_64/iso
+
<pre>mv Fedora-rawhide-$(uname -i)-DVD.iso Fedora-14-$(uname -i)-DVD.iso</pre></li>
mv Fedora-20090325-x86_64-DVD.iso Fedora-11-Beta-x86_64-DVD.iso</pre></li>
+
 
<li>Use {{command|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.''
 
<li>Use {{command|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.''
<pre>rsync -Pavy alt.fedoraproject.org::stage/11-Beta.rc3/Fedora-11-Beta-x86_64-DVD/Fedora-11-Beta-x86_64-DVD.iso .</pre></li>
+
<pre>rsync -Pavy serverbeach1.fedoraproject.org::http://serverbeach1.fedoraproject.org/pub/alt/stage/14.RC1/Fedora/$(uname -i)/iso/Fedora-14-$(uname -i)-DVD.iso .</pre>
<li>Use {{command|sha256sum}} to test the image for integrity.  The resulting checksum should be identical to that shown in the {{filename|*CHECKSUM}} file that accompanies the image on the staging site.
+
</li>
<pre>sha256sum Fedora-11-Beta-x86_64-DVD.iso</pre>
+
<li>Use the {{command|sha256sum}} command to test the image for integrity.  The resulting checksum should be identical to that shown in the {{filename|*-CHECKSUM}} file that accompanies the image on the staging site.
 +
<pre>sha256sum Fedora-14-x86_64-DVD.iso</pre>
 
</ol>
 
</ol>
 +
 +
== References ==
 +
# For additional information on using {{package|pungi}}, see [https://fedorahosted.org/pungi/wiki/PungiDocs/RunningPungi the Pungi documentation].
 +
# For additional information on using {{package|mock}}, see [[Projects/Mock]].
  
 
[[Category:QA_SOPs]]
 
[[Category:QA_SOPs]]

Revision as of 20:42, 27 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.

  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
    mock -r fedora-rawhide-$(uname -i) --install spin-kickstarts pungi

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. Note the following commands assume you are interested in testing the x86_64 (64-bit) architecture. Substitute i386 as needed for 32-bit architecture.
    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>::fedora-linux-development/x86_64/os .
  2. In the mock chroot, edit the repository configuration to use your local mirror.
    mock -r fedora-rawhide-$(uname -i) --shell vi /etc/yum.repos.d/fedora-rawhide.repo
  3. Replace mirrorlist with a pointer to the local mirror. Using the example above, you would end up with ...
    baseurl=file:///var/www/fedora/linux/development/$basearch/os
    #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch
    
  4. When finished, exit the chroot by pressing Ctrl-D or typing logout

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 --all-stages \
      --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. 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/
    

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 serverbeach1.fedoraproject.org::http://serverbeach1.fedoraproject.org/pub/alt/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.