FEDORA CORE CUSTOMIZATION – STEP BY STEP

Copyright © 2004 Manilal K M

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation;

Revised on : 14:33:02 IST ; 22nd August 2005
Revised on : 13:45:02 IST ; 22nd July 2005

Revised on : 11:47:45 IST ; 16th August 2004

Revised on : 10:55:18 IST ; 10th January 2004

Created on : 12:13:13 IST; 23rd December 2003


Step 0
Requirements:
1. Fedora Core Installation CD's for i386 (Both RPMS and SRPMS)

2. i386 Machine installed with RedHat/Fedora Core 1 (Custom installation with All packages)

3. Minimum 3.6 GB of Hard Disk space


I cannot assure 100% warranty in using this manual. However it works fine for me. If anyone find any variations/bugs please report to [email protected]

Step 1

Copy all the CD's to a suitable location. The work area I chose is /home/fedora/i386. The later part of this documentation is based on this path.
If you wish to make only the binary version then no need to copy the SRPMS.

# cp /mnt/cdrom/* /home/fedora/i386/ -rf

you can ignore warnings(if any) of overwriting TRANS.TBL, COPYING, and README files.


Step 2:

Install the source rpm of anaconda. I modified only the package anaconda-images.
So ...

# rpm -ivh anaconda-images-9.0-3.src.rpm

Modify the anaconda source as desired and rebuild using the rpmbuild utility.

# cd /usr/src/fedora

# rpmbuild –ba SPECS/anaconda-images.spec


Step 3

If everything is right we will have new binary in /usr/src/redhat/RPMS/i386 as well as a new source RPM in /usr/src/redhat/SRPMS. Remove the existing anaconda binary in /home/fedora/i386/fedora/RPMS/anaconda-images-9.0-3.src.rpm


# rm /home/fedora/i386/Fedora/RPMS/anaconda-images-9.0-3.src.rpm

Copy binaries into the /home/fedora/i386/fedora/RPMS, working directory;

# cp /usr/src/redhat/RPMS/i386/anaconda-images-9.0-3.src.rpm /home/fedora/i386/Fedora/RPMS/


Step 4

Run genhdlist to check image.

# /usr/lib/anaconda-runtime/genhdlist --withnumbers --productpath=Kairali /home/fedora/i386/

If the command is successful then there will be files such as hdlist, hdlist2 in the directory /home/fedora/i386/fedora/base. This command may report about the duplicate packages if found.


Step 5
If you are modifying the packages then you have to edit the comps.xml file. After editing the comps.xml you have to again run
genhdlist and then check with getfullcomps.py
# /usr/share/comps-extras/getfullcomps.py comps.xml /home/fedora i386 > /dev/null

The getfullcomps.py script has been removed from Fedora Core. Download the script from here and copy it to /usr/share/comps-extras.


Step 6

Run pkgorder to generate the package order. But before that don't forget to set the PYTHONPATH

# export PYTHONPATH=/usr/lib/anaconda

# /usr/lib/anaconda-runtime/pkgorder /home/fedora/i386 i386 Kairali| tee /home/fedora/pkgorder.txt
This command will generate the pkgorder file at the same time will display all the packages that you have added.


Step 7

Build new anaconda installer images

# /usr/lib/anaconda-runtime/buildinstall --comp dist-9 --pkgorder /home/fedora/pkgorder.txt --product 'Kairali Linux' --release 1 --version 1 –prodpath fedora /home/fedora/i386

If everything is OK then you will get messages something like this:

warning: /home/fedora/i386/fedora/RPMS/anaconda-runtime-9.0-4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e Building images...
warning: /home/fedora/i386/fedora/RPMS/anaconda-runtime-9.0-4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Assembling package list...
warning: /home/fedora/i386/fedora/RPMS/anaconda-9.0-4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

warning: /home/fedora/i386/fedora/RPMS/anaconda-9.0-4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Expanding packages... anaconda-9.0-4.i386.rpm
warning: /home/fedora/i386/fedora/RPMS/anaconda-9.0-4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Expanding packages... anaconda-runtime-9.0-4.i386.rpm
warning: /home/fedora/i386/fedora/RPMS/anaconda-runtime-9.0-4.i386.rpm:
V3 DSA signature: NOKEY, key ID db42a60e Expanding packages... ash-0.3.8-8.i386.rpm
warning: /home/fedora/i386/fedora/RPMS/ash-0.3.8-8.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e

-
-

-
Overriding busybox version of xargs

Overriding busybox version of zcat

Scrubbing trees...

Compressing .mo files in stage2 images...

Creating fontconfig cache

/usr/bin/fc-cache: "/usr/share/fonts": caching, 0 fonts, 5 dirs

/usr/bin/fc-cache: "/usr/share/fonts/bitmap-fonts": caching, 2 fonts, 0 dirs

/usr/bin/fc-cache: "/usr/share/fonts/ja": caching, 0 fonts, 1 dirs

-
-

-

Patching python library...

Removing unused python files in hdimage... done.

Cleaning ramdisk install images...

Getting package order...
Loading //lib/kbd/keymaps/i386/azerty/be-latin1.map.gz
found 7 valid keymaps creating keymap file /tmp/keymaps.9240/be-latin1.map
Loading //lib/kbd/keymaps/i386/qwerty/bg.map.gz
found 9 valid keymaps
-
-

-
Wrote /home/fedora/i386/fedora/base/hdstg2.img (9936k)...

Building stage2.img

Wrote /home/fedora/i386/fedora/base/stage2.img (62628k)

Cleaning up images

Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048

Total rockridge attributes bytes: 1445

Total directory bytes: 2048
Path table size(bytes): 26
Max brk space used 7000
1808 extents written (3 Mb)
Writing .discinfo file
timestamp not specified; using the current time

Hopefully, we have a new installer. Now this directory can be used for NFS installation.
The following steps are relevant only if you are trying to pack the installation CDs.


Step 8

# /usr/lib/anaconda-runtime/splittree.py --arch=i386 --total-discs=6 --bin-discs=3 --src-discs=3 -–release-string="Kairali Linux" --pkgorderfile=/home/fedora/pkgorder --distdir=/home/fedora/i386 --srcdir=/home/fedora/ --productpath=Fedora

If there are no SRPMS in your buildtree then a warning will raised indicating the failure of packaging SRPMS , which can be ignored if your not bothered about creating source CDs. If you want to reduce the number of CDs, then use the following command

# /usr/lib/anaconda-runtime/splittree.py --arch=i386 --total-discs=3 --bin-discs=2 --src-discs=1 --release-string="Kairali Linux" --pkgorder=/home/fedora/pkgorder.txt --distdir=i386 --srcdir=SRPMS --productpath=Kairali

Step 9

The hdlist* files in /home/fedora/i386-disc1/fedora/base/ are hard-linked copies of the original ones in the /home/fedora/i386/fedora/base/ directory, and are very likely (certain!) not to work properly for cdrom installs. So they need to be re-created.
genhdlist is used again to create new hdlist files, but this time referencing the "package order catalogue" and the newly-created i386-disc[123] directory trees...
# rm -f /home/fedora/i386-disc1/fedora/base/hdlist*

# /usr/lib/anaconda-runtime/genhdlist --withnumbers --fileorder /home/fedora/pkgorder.txt /home/fedora/i386-disc[123] --productpath Kairali


Step 10

Make the iso images for all the CD's

# cd /home/fedora/i386-disc1

# mkisofs -b images/bootdisk.img -c boot.cat -v -r -T -J -V Kairali-1.0_D1 -o /
home/fedora/KL_D1.iso /home/fedora/i386-disc1

# mkisofs -JR -l -V
Kairali-1.0_D2 -o KL_D2.iso i386-disc2

The output will be something like the following:
mkisofs 2.0 (i686-pc-linux-gnu)
Scanning /home/fedora/i386-disc1

Scanning /home/fedora/i386-disc1/dosutils

Scanning /home/fedora/i386-disc1/dosutils/autoboot

Scanning /home/fedora/i386-disc1/dosutils/fips15c

Scanning /home/fedora/i386-disc1/dosutils/fips15c/restorrb

Excluded: /home/fedora/i386-disc1/dosutils/fips15c/restorrb/TRANS.TBL
Scanning /home/fedora/i386-disc1/dosutils/fips15c/source

Excluded: /home/fedora/i386-disc1/dosutils/fips15c/source/TRANS.TBL

Repeat the step for creating all the other 3 images.

-
-

-
Writing: Joliet directory tree
Start Block 85
Done with: Joliet directory tree Block(s) 38
-
-
-
96.57% done, estimate finish Tue Dec 23 12:06:40 2003
98.11% done, estimate finish Tue Dec 23 12:06:40 2003

99.64% done, estimate finish Tue Dec 23 12:06:42 2003

Total translation table size: 43639

Total rockridge attributes bytes: 64841

Total directory bytes: 108544

Path table size(bytes): 248

Done with: The File(s) Block(s) 326025

Writing: Ending pad block Start Block 326149

Done with: Ending pad block Block(s) 27

Max brk space used 82000
326176 extents written (637 Mb)

Caveat: In Fedora Core 4 use the following command to create the ISO Image:

[root@ost2 kairali-1.2]# mkisofs -b isolinux/isolinux.bin -c isolinux/boot.cat -J -p "[email protected]" -V "Kairali GNU/Linux 1.2" -r -T -v -A "Kairali GNU/Linux 1.2" -o kairali_12.iso -no-emul-boot -boot-load-size 4 -boot-info-table -l i386


Step 11

Burn the image to the CD using your favourite program (cdrecord, xcdroast or gtoaster) and it's ready for Installation.

Resources:
http://www.linuxworks.com.au/redhat-installer-howto.html

http://www.contribs.com/contribs/rsi/howto/SME%20Anaconda%20HowTo.htm

http://www.e-smith.org/docs/howto/howto_modify_e-smith_interface_rpm.php3

http://contribs.org/contribs/dmay/mitel/howto/sme-iso-howto.html

http://www.linuxworks.com.au/PB-rhcd.html
http://rau.homedns.org/twiki/bin/view/Anaconda/AnacondaDocumentationProject
http://www.rpm.org/
http://fedora.redhat.com/

http://fedoraproject.org/wiki/AnacondaBuildDocProject