Re: Roll your own ISO?

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

 



Tristan Fillmore said:
> I'm interested in creating my own ISOs and modifying the package list to
> only include the packages I'm interested in.
>
> How are the ISOs for Fedora created?  What must be modified to make
> alterations to the installer?
>
> Any relevant links or advice would be appreciated.
>
>
> Thanks,
>
> Tristan
>
OK... so it's a bit more complex... A nice link would be Bob's Anaconda
HOWTO (http://www.sd.no-ip.biz/code/aurora/).
Over there you have some other nice links...
If you need more info... google 'round...
For CD generation I personaly use a small script.
The script expects to have in the current directory the i386 and SRPMS
directories.
If anyone can give me a review on it, i'd really apreciate-it.
If it's OK then I'll start work on a GTK2 based anaconda customiser.
Don't forget to check the export's at the begining of the script.
( The comments with a plus apply to fedora core)
------------------------

#!/bin/bash
# version 0.1
# Creator Razvan Corneliu C.R. VILT

###################################
#            Variables            #
###################################
    export PYTHONPATH=/usr/lib/anaconda
    export PATH=$PATH:/usr/lib/anaconda-runtime:/usr/share/comps-extras
    export BASEDIR=`pwd`
    # CD Publisher
    # +I guess it's 'Fedora Core Project'
    export publisher='Digital Vision'
    # Some CD-Booting information
    export bootimg='isolinux/isolinux.bin'
    export bootcat='isolinux/boot.cat'
    # The code-name of the current version
    # +"yarrow" for Fedora Core 1
    export distname="seraphim"
    # The version no. of the distribution
    # +It should be something like 1.90 for the version in development
rightnow (rawhide)
    export distver="0.91"
    # +For rawhide it's probably "dist-190"
    export distvercomp="dist-091"
    # product was supposed to be Vision GNU/Linux, but releasestr + Disk no.
    # does not fit in the maximum alowable length for the CD labels, so I
added shortproduct
    # +should be "Fedora Core"
    export product="Vision GNU/Linux"
    # +probably "FC/1"
    export shortproduct="Vision"
    # The directory which contains RPMS and base subdirectories
    # +should be Fedora for rawhide/yarrow
    export productpath="Vision"
    # The architecture we're building for
    export arch="i386"
    # The whole release's string
    export releasestr="$product $distver ($distname)"
    # Some options we're gonna pass to mkisofs
    export mkisofsopts='-r -N -L -d -D -J'
    # The CD-Building date
    export today="$(date '+%d %b %Y')"


###################################
# Clean-ing up any previous build #
###################################
rm -rf ./i386-disc[1..6]
rm -f ./$distname-$arch-disc[1..6].iso
rm -f ./$distname-$arch-dvd.iso

###################################
#     Regenerate the headers      #
###################################
    echo "Generating headers for yum"
    cd $arch;
    yum-arch . > /dev/null;
    cd ..;
    yum-arch . > /dev/null;
    cd SRPMS;
    yum-arch . > /dev/null;

###################################
#    Rebuilding The installer     #
###################################
    echo "Generating HDList File"
    genhdlist --withnumbers --productpath $productpath $BASEDIR/$arch
    echo "Ordering Packages for Instalation"
    pkgorder $BASEDIR/$arch $arch $productpath > $BASEDIR/pkgorder-$arch.txt
    echo "Building The Installer"
    buildinstall --comp $distvercomp --pkgorder $BASEDIR/pkgorder-$arch.txt \
	         --version $distver --product "$product" \
    		 --release "$releasestr" \
	         --prodpath $productpath $BASEDIR/$arch
    echo "Splitting the tree into CD's"
    splittree.py --arch=$arch --total-discs=6 --bin-discs=3 --src-discs=3 \
                 --release-string="$releasestr"
--pkgorderfile=$BASEDIR/pkgorder-$arch.txt \
                 --distdir=$BASEDIR/$arch --srcdir=$BASEDIR/SRPMS \
    		 --productpath=$productpath > /dev/null
    echo "Generating New HDList for the CD's"
    genhdlist --withnumbers --productpath $productpath \
	      --fileorder $BASEDIR/pkgorder-$arch.txt \
	      $BASEDIR/$arch-disc[1..3]> /dev/null

###################################
#  Start the CD-BUILDING PROCESS  #
###################################
#             BIG FAT             #
#          !!!WARNING!!!          #
# This CD-generation script isn't #
# portable yet! I Need more info  #
#  on makeing bootable CD's for   #
#      other architectures        #
#    I'm pretty sure that this    #
#             DOES NOT            #
#     apply for SPARC & PPC       #
###################################

# Make the 1'st CD's (the bootable one) iso
echo "Generating the iso of the first CD"
mkisofs $mkisofsopts \
	-V "$shortproduct $arch" \
	-A "$shortproduct $arch" \
	-P "$publisher" \
	-p "$publisher" \
	-b "$bootimg" \
	-c "$bootcat" \
	-no-emul-boot -boot-load-size 4 -boot-info-table \
	-x lost+found \
	-o $BASEDIR/"$distname"-$arch-disc1.iso \
	$BASEDIR/$arch-disc1 > /dev/null 2> /dev/null
echo "Implanting it's md5 sum"
/usr/lib/anaconda-runtime/implantisomd5 $BASEDIR/"$distname"-$arch-disc1.iso
#Make the isos for the rest of the CD's (not bootable)
for i in 2 3 4 5 6; do
    echo "Generating the iso for cd no. $i"
    mkisofs $mkisofsopts \
	-V "$shortproduct $arch" \
	-A "$shortproduct $arch" \
	-P "$publisher" \
	-p "$publisher" \
	-x lost+found \
	-o $BASEDIR/"$distname"-$arch-disc${i}.iso \
	$BASEDIR/$arch-disc${i} > /dev/null  2> /dev/null;
    echo "Implanting it's md5 sum"
    /usr/lib/anaconda-runtime/implantisomd5
$BASEDIR/"$distname"-$arch-disc${i}.iso;
done;

###################################
#  Now let's generate the DVD iso #
###################################
echo "Generating the DVD iso"
mkisofs  \
	$mkisofsopts \
	-A "$shortproduct $arch" \
	-V "$shortproduct $arch" \
	-P "$publisher" \
	-p "$publisher" \
	-b "$bootimg" \
	-c "$bootcat" \
	-no-emul-boot -boot-load-size 4 -boot-info-table \
	-x lost+found \
	-o $BASEDIR/"$distname"-$arch-dvd.iso \
	$BASEDIR/$arch > /dev/null 2>/dev/null;
echo "Implanting it's md5 sum"
/usr/lib/anaconda-runtime/implantisomd5 $BASEDIR/"$distname"-$arch-dvd.iso;




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux