Difference between revisions of "Build Machine for Amahi Express"

From Amahi Wiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{WorkInProgress}}
+
{{NeedsUpdate}}
 +
 
 +
 
 
This article contains specifications, construction steps, and implementation information for a "build machine" for the "Amahi Express Installation Disc". The intent of the machine is to aid in the development and building of new Amahi Express Installation disc images.
 
This article contains specifications, construction steps, and implementation information for a "build machine" for the "Amahi Express Installation Disc". The intent of the machine is to aid in the development and building of new Amahi Express Installation disc images.
 
__TOC__
 
__TOC__
Line 7: Line 9:
 
* Any advice or suggestions you may have please post to the '''[https://forums.amahi.org/viewforum.php?f=44 Amahi Wiki "Express Disc" Forum]'''.  
 
* Any advice or suggestions you may have please post to the '''[https://forums.amahi.org/viewforum.php?f=44 Amahi Wiki "Express Disc" Forum]'''.  
 
* The "Category" link, "Amahi Express Collection", at the bottom of this page provides links to other reference information relating to the "Amahi Express" subject area.
 
* The "Category" link, "Amahi Express Collection", at the bottom of this page provides links to other reference information relating to the "Amahi Express" subject area.
 +
* There are two known bugs posted on the Red Hat Bug Tracker that have a major effect on building a new Amahi Express Install Disc. Amahi members are currently attempting to find "workaround(s) that are being researched, prototyped, and tested.
 
=== Recommended Configuration ===
 
=== Recommended Configuration ===
  
Line 27: Line 30:
 
* Ensure that Fedora updates are done after the DVD installation.
 
* Ensure that Fedora updates are done after the DVD installation.
 
* Create "mount points" for use later.
 
* Create "mount points" for use later.
<blockquote>{{Code|mkdir -p /media/optdrive
+
<blockquote><pre>|mkdir -p /media/optdrive
 
mkdir -p /media/usbdrive
 
mkdir -p /media/usbdrive
mkdir -p /media/usbstick}}</blockquote>
+
mkdir -p /media/usbstick</pre></blockquote>
 
* Install the following packages.
 
* Install the following packages.
<blockquote>{{Code|yum -y install system-config-kickstarts # graphical interface for making kickstart files
+
<blockquote><pre>yum -y install system-config-kickstarts # graphical interface for making kickstart files
 
yum -y install pungi # tool to create anaconda based installation trees/isos
 
yum -y install pungi # tool to create anaconda based installation trees/isos
yum -y install createrepo # tool to refesh repo databases}}</blockquote>
+
yum -y install createrepo # tool to refesh repo databases</pre></blockquote>
 
* Optionally install the following packages.
 
* Optionally install the following packages.
<blockquote>{{Code|yum -y install fedora-kickstarts # kickstarts used to compose the official Fedora Spins
+
<blockquote><pre>yum -y install fedora-kickstarts # kickstarts used to compose the official Fedora Spins
 
                                 # sample kickstarts stored at /usr/share/spin-kickstarts
 
                                 # sample kickstarts stored at /usr/share/spin-kickstarts
 
yum -y install custom-kickstarts # kickstart files for Custom Spins
 
yum -y install custom-kickstarts # kickstart files for Custom Spins
                                 # sample kickstarts stored at /usr/share/spin-kickstarts/custom}}</blockquote>
+
                                 # sample kickstarts stored at /usr/share/spin-kickstarts/custom</pre></blockquote>
  
 
=== Local Fedora Repositories ===
 
=== Local Fedora Repositories ===
Line 62: Line 65:
 
* Start a "terminal session" and switch to the "root" user.
 
* Start a "terminal session" and switch to the "root" user.
 
* Create local repository directory structures.
 
* Create local repository directory structures.
<blockquote>{{Code|mkdir -p /opt/fedora/f18/i386/base
+
<blockquote><pre>mkdir -p /opt/fedora/f18/i386/base
mkdir -p /opt/fedora/f18/i386/updates}}</blockquote>
+
mkdir -p /opt/fedora/f18/i386/updates</pre></blockquote>
 
* Mount the Fedora DVD.
 
* Mount the Fedora DVD.
<blockquote>{{Code|mount -o loop /dev/sr0 /media/optdrive}}</blockquote>
+
<blockquote><pre>mount -o loop /dev/sr0 /media/optdrive</pre></blockquote>
 
* Copy rpm packages to the local "base" repo directory structure.
 
* Copy rpm packages to the local "base" repo directory structure.
<blockquote>{{Code|cp -av /media/optdrive/Packages/* /opt/fedora/f18/i386/base}}</blockquote>
+
<blockquote>{<pre>cp -av /media/optdrive/Packages/* /opt/fedora/f18/i386/base</pre></blockquote>
 
* Copy the main "comps xml" file to the local "base" repo directory structure.
 
* Copy the main "comps xml" file to the local "base" repo directory structure.
<blockquote>{{Code|cp /media/optdrive/repodata/*comps*.xml /opt/fedora/f18/i386/base/comps.xml}}</blockquote>
+
<blockquote><pre>cp /media/optdrive/repodata/*comps*.xml /opt/fedora/f18/i386/base/comps.xml</pre></blockquote>
 
* The production Anaconda Installer for Fedora 18 has a bug that will not allow discs to be built. A "test" version is available that allows discs to be built.
 
* The production Anaconda Installer for Fedora 18 has a bug that will not allow discs to be built. A "test" version is available that allows discs to be built.
* Go to the Fedora 18 URL "http://mirrors.kernel.org/fedora/updates/testing/18/i386/" and download the following Packages:
+
* Go to the Fedora 18 URL "<nowiki>http://mirrors.kernel.org/fedora/updates/testing/18/i386/</nowiki>" and download the following Packages:
<blockquote>{{Text|anaconda-18.37.12-1.fc18.i686.rpm
+
<blockquote><pre>anaconda-18.37.12-1.fc18.i686.rpm
 
anaconda-dracut-18.37.12-1.fc18.noarch.rpm
 
anaconda-dracut-18.37.12-1.fc18.noarch.rpm
anaconda-widgets-18.37.12-1.fc18.i686.rpm}}</blockquote>
+
anaconda-widgets-18.37.12-1.fc18.i686.rpm</pre></blockquote>
 
* Go to the "base", Packages, "a" directory and remove the following production Anaconda Installer packages:
 
* Go to the "base", Packages, "a" directory and remove the following production Anaconda Installer packages:
<blockquote>{{Text|anaconda-18.37.11-1.fc18.i686.rpm
+
<blockquote><pre>anaconda-18.37.11-1.fc18.i686.rpm
 
anaconda-dracut-18.37.11-1.fc18.noarch.rpm
 
anaconda-dracut-18.37.11-1.fc18.noarch.rpm
anaconda-widgets-18.37.11-1.fc18.i686.rpm}}</blockquote>
+
anaconda-widgets-18.37.11-1.fc18.i686.rpm</pre></blockquote>
 
* Copy the downloaded "testing" Anaconda "version 12" packages to the "base", Packages, "a" directory.
 
* Copy the downloaded "testing" Anaconda "version 12" packages to the "base", Packages, "a" directory.
 
* Go to the local "base" repo and generate the "base" repo files.
 
* Go to the local "base" repo and generate the "base" repo files.
<blockquote>{{Code|cd /opt/fedora/f18/i386/base # go to the base package directory
+
<blockquote><pre>cd /opt/fedora/f18/i386/base # go to the base package directory
 
createrepo . # refresh the "base" repo database
 
createrepo . # refresh the "base" repo database
createrepo -g comps.xml . # refresh the comps.xml for group changes}}</blockquote>
+
createrepo -g comps.xml . # refresh the comps.xml for group changes</pre></blockquote>
 
:Please notice the "dot" after createrepo, it's important.
 
:Please notice the "dot" after createrepo, it's important.
 
* Populate the "updates" repo.
 
* Populate the "updates" repo.
Line 91: Line 94:
 
:Please note this will take several hours to complete. Do it at night and check the next day.
 
:Please note this will take several hours to complete. Do it at night and check the next day.
 
* Go to "updates" repo and generate the "updates" repo files.
 
* Go to "updates" repo and generate the "updates" repo files.
<blockquote>{{Code|cd /opt/fedora/f18/i386/updates
+
<blockquote><pre>cd /opt/fedora/f18/i386/updates
createrepo .}}</blockquote>
+
createrepo .</pre></blockquote>
  
 
==== Create the "yum" Repository Files ====
 
==== Create the "yum" Repository Files ====
 
* Start a terminal sessions and switch to the root user.
 
* Start a terminal sessions and switch to the root user.
 
* Go to the /etc yum configuration directory.
 
* Go to the /etc yum configuration directory.
<blockquote>{{Code|cd /etc/yum.repos.d}}</blockquote>
+
<blockquote><pre>cd /etc/yum.repos.d</pre></blockquote>
 
* Using a text editor create the "f18-base-local.repo" file and insert the following text, and then save the file.
 
* Using a text editor create the "f18-base-local.repo" file and insert the following text, and then save the file.
 
<blockquote>
 
<blockquote>
{{Text|Text=[f18-base-local]
+
<pre>[f18-base-local]
 
name=Fedora 18 local base repository
 
name=Fedora 18 local base repository
 
baseurl=file:///opt/fedora/f18/i386/base
 
baseurl=file:///opt/fedora/f18/i386/base
 
gpgcheck=1
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-18-primary
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-18-primary
enabled=1}}</blockquote>
+
enabled=1</pre></blockquote>
 
* Using a text editor create the "f18-updates-local.repo" file and insert the following text, and then save the file.
 
* Using a text editor create the "f18-updates-local.repo" file and insert the following text, and then save the file.
 
<blockquote>
 
<blockquote>
{{Text|Text=[f18-updates-local]
+
<pre>[f18-updates-local]
 
name=Fedora 18 local updates repository
 
name=Fedora 18 local updates repository
 
baseurl=file:///opt/fedora/f18/i386/updates
 
baseurl=file:///opt/fedora/f18/i386/updates
 
gpgcheck=1
 
gpgcheck=1
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-18-primary
 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-18-primary
enabled=0}}</blockquote>
+
enabled=0</pre></blockquote>
 
'''PLEASE NOTE:''' The updates repository is disabled due to a Fedora 18 bugs (2 known bugs on Red Hat Bug Tracker) in the Anaconda Installer.
 
'''PLEASE NOTE:''' The updates repository is disabled due to a Fedora 18 bugs (2 known bugs on Red Hat Bug Tracker) in the Anaconda Installer.
  
Line 121: Line 124:
 
* Start a terminal sessions and switch to the root user.
 
* Start a terminal sessions and switch to the root user.
 
* Enter the following commands.
 
* Enter the following commands.
<blockquote>{{Code|yum clean all
+
<blockquote><pre>yum clean all
yum repolist}}</blockquote>
+
yum repolist</pre></blockquote>
 
* Something like this with other stuff will be displayed.
 
* Something like this with other stuff will be displayed.
 
<blockquote>
 
<blockquote>
{{Text|Text=repo id
+
<pre>repo id
 
f18-base-local
 
f18-base-local
f18-updates-local}}</blockquote>
+
f18-updates-local</pre></blockquote>
  
 
==== Refreshing a Repository ====
 
==== Refreshing a Repository ====

Latest revision as of 17:17, 9 January 2021

Msgbox.update.png Update Needed
The contents of this page have become outdated or irrelevant. Please consider updating it.


This article contains specifications, construction steps, and implementation information for a "build machine" for the "Amahi Express Installation Disc". The intent of the machine is to aid in the development and building of new Amahi Express Installation disc images.


Please Note:

  • Since this article is a "work in progress", information in this article will be fluid for sometime, your patience will be appreciated. The author has never been down this path before.
  • Any advice or suggestions you may have please post to the Amahi Wiki "Express Disc" Forum.
  • The "Category" link, "Amahi Express Collection", at the bottom of this page provides links to other reference information relating to the "Amahi Express" subject area.
  • There are two known bugs posted on the Red Hat Bug Tracker that have a major effect on building a new Amahi Express Install Disc. Amahi members are currently attempting to find "workaround(s) that are being researched, prototyped, and tested.

Recommended Configuration

  • Latest full version of the Fedora ( this article will reference Fedora 18 32-bit) DVD.
  • As modern of a computer as possible ( machine for this article used: Intel Core 2 Duo @ 3.0 GHz, 4GB RAM, 160 GB Hard Disk ).
  • External storage facility ( i.e. external USB drive (1 TB?), Amahi share, Amahi ownCloud directory) with storage greater that the size of the build machine.
  • Backup software ( author used CloneZilla Livd CD with 1TB external drive) to store last working build machine image.
  • Lots of patience, a meticulous nature, know how to consult "Dr. Google" (a lot).

Fedora Installation

When installing Fedora it will be assumed that a "Desktop installation" path will be performed. Following are recommendations to be considered during the installation process.

  • During the installation select the GNOME GUI environment, at some point it will be required in the disc build process.
  • Highly recommend installing some GNOME extensions (GNOME Extensions) in order to provide a "classic windowing" environment.
  • The Fedora "Anaconda Installer" has changed completely since Fedora 14. A "Hub and "Spoke" node model is used for it now instead of a "wizard-like" install. Please make sure all nodes (i.e. network config.) are properly configured before proceeding with the installation.
  • Here is a disk partitioning plan to consider:
 /boot partition: "standard partition"(no LVM), ext3 format, size 250 MB ( Fedora recommendation).
  swap partition: "standard swap (no LVM)", swap format, size 2 times existing system RAM ( i.e. 2 x 4GB = 8GB ).
 /(root partition): LVM partition, ext4 format, size set to the remaining space for the hard drive(s).
  • Ensure that Fedora updates are done after the DVD installation.
  • Create "mount points" for use later.
|mkdir -p /media/optdrive
mkdir -p /media/usbdrive
mkdir -p /media/usbstick
  • Install the following packages.
yum -y install system-config-kickstarts # graphical interface for making kickstart files
yum -y install pungi # tool to create anaconda based installation trees/isos
yum -y install createrepo # tool to refesh repo databases
  • Optionally install the following packages.
yum -y install fedora-kickstarts # kickstarts used to compose the official Fedora Spins
                                 # sample kickstarts stored at /usr/share/spin-kickstarts
yum -y install custom-kickstarts # kickstart files for Custom Spins
                                 # sample kickstarts stored at /usr/share/spin-kickstarts/custom

Local Fedora Repositories

To reduce the amount of software packages that might have to be downloaded during a disc build process, local Fedora "base" and "updates" repositories should be used. These local repositories (repos) have an added advantage, the build machine can receive its' software updates.

The repos in this example will be stored in the "/opt" directory. What is this directory normally used for? I am so glad you asked.

According the the "Filesystem Hierarchy Standard" (FHS) definition:

"The root directory for Software Collections is normally located in the "/opt/ directory" to avoid possible
 conflicts between Software Collections and the base system installation."

 It is recommended to have the directory hierarchy conform to the following layout: 

  /opt/provider/application-version/

  where: - "provider" is the provider (vendor) name registered with the Linux Foundation.
         - "application-version" indicates the software collection version. This can be done via one name
           or an ordered organization of subdirectories. 

Construct the Repositories

  • Start a "terminal session" and switch to the "root" user.
  • Create local repository directory structures.
mkdir -p /opt/fedora/f18/i386/base
mkdir -p /opt/fedora/f18/i386/updates
  • Mount the Fedora DVD.
mount -o loop /dev/sr0 /media/optdrive
  • Copy rpm packages to the local "base" repo directory structure.

{

cp -av /media/optdrive/Packages/* /opt/fedora/f18/i386/base
  • Copy the main "comps xml" file to the local "base" repo directory structure.
cp /media/optdrive/repodata/*comps*.xml /opt/fedora/f18/i386/base/comps.xml
  • The production Anaconda Installer for Fedora 18 has a bug that will not allow discs to be built. A "test" version is available that allows discs to be built.
  • Go to the Fedora 18 URL "http://mirrors.kernel.org/fedora/updates/testing/18/i386/" and download the following Packages:
anaconda-18.37.12-1.fc18.i686.rpm
anaconda-dracut-18.37.12-1.fc18.noarch.rpm
anaconda-widgets-18.37.12-1.fc18.i686.rpm
  • Go to the "base", Packages, "a" directory and remove the following production Anaconda Installer packages:
anaconda-18.37.11-1.fc18.i686.rpm
anaconda-dracut-18.37.11-1.fc18.noarch.rpm
anaconda-widgets-18.37.11-1.fc18.i686.rpm
  • Copy the downloaded "testing" Anaconda "version 12" packages to the "base", Packages, "a" directory.
  • Go to the local "base" repo and generate the "base" repo files.
cd /opt/fedora/f18/i386/base # go to the base package directory
createrepo . # refresh the "base" repo database
createrepo -g comps.xml . # refresh the comps.xml for group changes
Please notice the "dot" after createrepo, it's important.
  • Populate the "updates" repo.
 /bin/rsync -auvrt --delete --exclude=debug/ --exclude=drpms/ rsync://mirrors.kernel.org/fedora/updates/18/i386/
  /opt/fedora/f18/i386/updates
Please note this will take several hours to complete. Do it at night and check the next day.
  • Go to "updates" repo and generate the "updates" repo files.
cd /opt/fedora/f18/i386/updates
createrepo .

Create the "yum" Repository Files

  • Start a terminal sessions and switch to the root user.
  • Go to the /etc yum configuration directory.
cd /etc/yum.repos.d
  • Using a text editor create the "f18-base-local.repo" file and insert the following text, and then save the file.
[f18-base-local]
name=Fedora 18 local base repository
baseurl=file:///opt/fedora/f18/i386/base
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-18-primary
enabled=1
  • Using a text editor create the "f18-updates-local.repo" file and insert the following text, and then save the file.
[f18-updates-local]
name=Fedora 18 local updates repository
baseurl=file:///opt/fedora/f18/i386/updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-18-primary
enabled=0

PLEASE NOTE: The updates repository is disabled due to a Fedora 18 bugs (2 known bugs on Red Hat Bug Tracker) in the Anaconda Installer.

  • Disable all of the existing default repositories by editing each ".repo" file and setting "enabled=0" (from 1).

Test the Repositories

  • Start a terminal sessions and switch to the root user.
  • Enter the following commands.
yum clean all
yum repolist
  • Something like this with other stuff will be displayed.
repo id
f18-base-local
f18-updates-local

Refreshing a Repository

  • Now the updates repo will need to be updated on a regular basis. This can be done manually or a script file that is run on a nightly basis with the following commands.
# rsync to download new rpms

/bin/rsync -auv --delete --exclude=debug/ --exclude=drpms/ rsync://mirrors.kernel.org/fedora/updates/18/i386/
 /opt/fedora/f18/i386/updates

# go to the updates directory and rebuild the repo database

cd /opt/fedora/f18/i386/updates
createrepo .

Fringe Benefit

  • The "build" machine's Fedora 18 can be updated from the local repo by "yum -y --enablerepo=f18-updates-local​ update". Cool yes?