[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Anaconda documents



I basically wrote my notes in the TOC, but this is what I have.  I added
the notes from Alexander, and I have question marks near the things that
I don't know about.

Forrest



TOC

 I.Introduction

Red Hat Installation Program (Anaconda)
Anaconda is the installation program for Red Hat distributions. During
installation, the system's hardware is identified and configured, and
the appropriate file systems for the system's architecture are created. 
Finally, it allows the user to install the operating system software on
the system.  Optionally, it can upgrade existing Red Hat installations. 
Anaconda can run in a fully interactive mode (text or graphical), or in
a kickstart mode, which is allows the installation to be scripted for
unattended operation.  This makes deploying hundreds or thousands of
systems very easy.  Anaconda is written in Python and C, and is
distributed under the GPL. The graphical frontend is written with
PyGtk.  Using a scripting language (Python) for the majority of the code
allows for easily distribution of updates and the quick development of
new features.


 II.How anaconda works

   A.  boot process
   B. actual anaconda process
     i. probing for hardware (what is happening behind the scenes/what
programs are doing what)
     ii. language selection
     iii. harddrive setup

 III. Installation

 IV. What is needed to rebuild anaconda

   A. Disk space  30-45 MB
   B. Required packages
     i. rpm-build  (for /usr/src/redhat/*)
     ii. pump-devel (add something for RHEL about missing -devel
packages)
     iii. kudzu-devel, pciutils-devel, bzip2-devel, e2fsprogs-devel,
python-devel, gtk2-devel, rpm-python, newt-devel, rpm-devel, gettext,
modutils-devel, rhpl, booty, libxml2-python, zlib-devel, bogl-devel,
bogl-bterm, elfutils-devel, beecrypt-devel, dietlibc, parted (plus
dependencies: Xfree86-devel, atk-devel, glib2-devel, pango-devel, bogl,
gd, fontconfig-devel, freetype-devel)
   C. Required patches
     i. Patch for buildinstall (dies when trying to run buildinstall the
second time)
     ii. Patch for changing RedHat to Fedora
     iii. Patch for new files (build-fc1, mkfedora-cd*, etc.)
   D. Time (on my Intel Pentium III 600 Mhz processor 256 MB RAM)
     i. rpmbuild -bp anaconda.spec â?? 0:11
     ii. rpmbuild -bb anaconda.spec â?? 4:48
     iii. rpmbuild -ba anaconda.spec â?? 4:49


 V. Tree structure â?? about 2GB for the distribution without SRPMS (4GB
with SRPMS), plus another 2GB (4GB with SRPMS) for the iso images.

   A. /fedora  (I usually create a directory in a partition that has
room, and then create a symlink for /fedora)
   B. /fedora/i386 â?? RPM packages
   C. /fedora/SRPMS â?? SRPM packages
   D. /fedora/build-fc1 â?? build script
   E. /fedora/new/new â?? directory for new and updated packages
   F. /fedora/RHupdates â?? directory for testing updated anaconda files 


 VI. Anaconda binaries (just quick explanation with details in later
chapters)

   A. buildinstall â?? script that builds the distribution
   B. checkcards.py â?? ??
   C. checkisomd5 â?? see implantiosmd5
   D. check-repository.py â?? old script that was used to check the
repository for missing dependencies â?? we need to check if this still
works  FIX-ME  It does not work for me even after changing RedHat to
Fedora.  It seems to need the original comps file (not comps.xml).  Talk
to Jeremy about getting it removed or replaced.
   E. filtermoddeps â?? ??
   F. genhdlist â?? script that generated the hdlist  (you must use the
full path to your directories)
   G. getkeymaps â?? ??
   H. implantiosmd5/checkisomd5 â?? script to implant/check the md5 sum
used during installation to verify the discs (mediacheck boot option)
   I. libunicode-lite.so.1 â?? some library
   J. loader/ â?? directory  that contains the loader programs
   K. makestamp.py â?? script that makes the .discinfo?
   L. mapshdr â?? ??
   M. mk-images* â?? architecture-specific scripts that are called by
buildinstall
   N. mk-rescueimage.i386 â?? creates the rescue image?
   O. moddeps â?? modify dependencies?
   P. modlist â?? modify list?
   Q. pkgorder â?? creates a package orderâ??now called by buildinstall
   R. pyiosmd5sum.so â?? used by implantiosmd5/checkisomd5?
   S. pythondeps â?? python dependencies
   T. readmap â?? Read map?
   U. screenfont-i386.gz â?? fonts for the installer?
   V. scrubtree â?? scrub the installation treeâ??called by buildinstall
   W. splittree.py â?? formerly splitdistroâ??used to split the distribution
into discs
   X. trimmodmap/trimpcitable â?? trim the modmap/pcitable?
   Y. upd-instroot â?? called by buildinstallâ??actual function??
   Z. EXTRAS (that I use)
     i. build-fc1 â?? runs the needed scripts to generate a distribution
     ii. mkdvd â?? creates a DVD iso image
     iii. mkfedora-cd* â?? creates CD iso images
     iv. rpmupdates â?? copies the new/updated RPMs in /fedora/new/new to
the installation area and moves out the old RPMs.


 VII.  Mini HowTo editing and making rpms from source

   A. We need to decide if we are going to encourage using root to
rebuild, or if we should document how to setup a build environment for a
standard user.  We have to be root to install rpms, so I guess that we
should just do it as root
   B. Remove debug packages
     i. echo "%debug_package %{nil}" >> /root/.rpmmacros
   C. Let's show an example for anaconda
    i. Install the source rpm file
       a) rpm -ivh anaconda-9.2-2.src.rpm  (notice the src.rpm
          extension)
    ii. Rebuild the original anaconda with any patches included
       a) cd  /usr/src/redhat/SPEC
       b) rpmbuild  -bp  anaconda.spec
    iii. Go to the BUILD directory and make a copy of the original
           directory
       a) cd  /usr/src/redhat/BUILD
       b) cp  -a  anaconda-9.0  anaconda-9.0.orig
    iv. Make your changes in the anaconda-9.0 directory
    v. Return to the BUILD directory and make a patch of the changes
       a) cd  /usr/src/redhat/BUILD
       b) diff  -urN  anaconda-9.0.orig  anaconda-9.0  > \
            ../SOURCES/my-changes.patch
    vi. Edit the spec file and rebuild
       a) cd  /usr/src/redhat/SPECS
       b) Edit anaconda.spec
          Below  Source: anaconda-%{PACKAGE_VERSION}.tar.bz2, add this
              line:
          Patch1: my-changes.patch

          Below %setup -q, add this line:
          %patch1 -p1

          Below %changelog, add a few lines about what you did, using
           the same format as you see there.  You will need to change
           the %{date} (if it exists) to a real date.  To get the real
           date that it was created, run this command and replace the
           %{date} line with this output (this is the output that I get)

          rpm  -qp  --changelog  anaconda-9.2-2.src.rpm | head  -1
             * Thu  Oct  30  2003  Anaconda team  <bugzilla redhat com>

       c) rpmbuild  -ba  anaconda.spec
             This will create the anaconda source rpm in
             /usr/src/redhat/SPMS, and the anaconda and
             anaconda-runtime i386.rpm files in
             /usr/src/redhat/RPMS/i386 (assuming that you use x86)
 
       d) Copy the binary files to /fedora/new/new, and the source file
           to /fedora/SRPMS.  Run rpmupdates to copy the new files to
           the installation tree.


 VIII.  Set up your build environment (tree structures needed and so on)

   A. Look at V.


 IX.  The comps.xml chapter (explanation and making your own comps.xml)

   A. Formerly, we had the comps tarball as explained on the anaconda
        site, but now, it looks like we should just edit 
        /fedora/i386/base/comps.xml directly.


 X.  Step by step walkthrough the whole buildinstall process

   A. Running build-fc1
   B. Time to build (35 minutes on my Dual Intel Pentium III 500MHz with
1GB RAM)


 XI.  Splitting distros

   A. I have a seperate script for this.
     i. rm -rf i386-disc[123456789]  (otherwise splittree.py will
complain)
     ii. splittree.py  --arch=i386  --total-discs=3  --bin-discs=3  \
      --src-discs=1  --release-string=â??Fedora Core 1â??
      --pkgorderfile=pkgfile  --distdir=i386  --srcdir=SRPMS
      --productpath=Fedora


 XII.  burning distros mkisofs 

   A. I use a script for mkisofs
     i. genhdlist  --withnumbers  --fileorder  pkgfile  \
      /fedora/i386-disc[123]
     ii. mkisofs -b  isolinux/isolinux.bin -c isolinux/boot.cat -J -p  \
        â??my email address comâ?? -V â??Fedora Core 1 with updates disc 1â??  \
        -r  -T  -v  -A  â??Fedora Core Linux/i386 1â?? \
        fedoracore1-disc1.iso  -no-emul-boot  -boot-load-size  4 \
        -boot-info-table  i386-disc1
     iii. implantisomd5  --supported-iso  fedoracore1-disc1.iso
   B. I use xcdroast to burn the iso imagesâ??recommend using CD-RWs


 XIII.  How to test anaconda without burning discs

   A. anaconda  --test  -m  nfs:/fedora/i386  (you don't need to run an
NFS server for this to work, although it is easy to setup NFS and it is
easy to do a network installation)

 XIV.  Links and useful tools 

 XV.  Acknowledgements
   A. Jeremy Katz, et al.
   B. Alexander Rau






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]