Академический Документы
Профессиональный Документы
Культура Документы
http://wiki.projectdiastar.org/index.php/Developme...
Development:Kickstart CD
From ProjectDiaStar
Contents
1 Introduction to Using Kickstart 1.1 Introduction 1.2 Installing Necessary Tools 1.3 Create a Working Copy of the CentOS Installation Disk 1.4 Create a Kickstart Configuration File - ks.cfg 1.5 Changing the splash.lss File 1.6 Changing the Splash Image displayed by Grub (splash.xpm.gz) 1.7 Customizing Anaconda 1.7.1 Changing the Graphics displayed by Anaconda 1.8 Creating a Customized CentOS Distribution 1.8.1 Choose the appropriate RPMs to be in CentOS/RPMS 1.8.2 Test if all dependencies for all the RPMs in CentOS/RPMS are resolved 1.8.3 Create repodata using createrepo 1.8.4 Create the ISO Image 1.9 References 1.10 Additional Information
1 of 8
05/26/2010 01:02 PM
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
CentOS / Fedora also provides a graphical tool that allows creating and editing kickstart configuration files. This might be useful and is mentioned here for completeness. The description below is focused on manually editing the config files as this is almost easier than using a graphical tool. Start it by choosing Applications ? System Tools ? Kickstart. (Or: /usr/sbin/system-config-kickstrart).
# yum install system-config-kickstart
2 of 8
05/26/2010 01:02 PM
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
####################################### # Kickstart file for DiaStar appliance # ####################################### #platform=x86, AMD64, or Intel EM64T #version=BETA # Firewall configuration # Dialogic RTP 49152 (2 ports per channel, rtp and rtcp) firewall --enabled --ssh --port=42420:tcp,49152-51152:udp # Root password rootpw --iscrypted $1$137n62W.$C4fWL0yd10McOTZOfwxVu1 # System authorization information auth --useshadow --passalgo=md5 # Use graphical install graphical firstboot --disable # Skip the X Window System configuration skipx # System keyboard keyboard us # System language lang en_US # SELinux configuration selinux --disabled # Install OS instead of upgrade install # Use CDROM installation media cdrom # System timezone timezone --utc America/New_York # Network configuration network --bootproto=query --device=eth0 --onboot=on --hostname=diastar # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr
# Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype="ext3" --size=128 part swap --size=1024 part / --fstype="ext3" --size=4096 part /var --fstype="ext3" --grow --size=1 # Pre installation #%pre # Packages to be installed %packages --resolvedeps e2fsprogs grub kernel ntp vim-enhanced gcc
3 of 8
05/26/2010 01:02 PM
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
The file isolinux.cfg specifies that the splash screen to be displayed before starting the boot process is called boot.msg:
^L ^Xsplash.lss Press <ENTER> to start the installation.
WARNING: All data will be erased and the disk is formatted. -----------------------------------------------------------
Note: Adapt the other files options.mgs, general.msg, param.msg to your liking.
file to
.lss
to the
/isolinux
directory.
Additional Notes on Down sampling Colour Depth in GIMP: Our target number of colours is 16. However, consider setting this to 15 or 14 to save one or two slots in the index table for one or two text colours. Alternatively, you can select suitable text colours from your resulting image and use them in your boot.msg (or whatever
4 of 8
05/26/2010 01:02 PM
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
your welcome screen text is called). In The Gimp indexing dialog, you can also select an appropriate palette optimization method. For images originating in photos with a large number of colour shades use one of the Floyd-Steinberg dithering methods. This produces mellow random noise in the resulting image, greatly reducing the effects of low color depth. If you have a flat-colour company logo, choose "no dithering" - your company colours will be slightly shifted but clean. Please note that if you're already in indexed mode, e.g. as a result of loading an 8bpp GIF as a master image of your splash screen, you need to switch to RGB mode first and then back to indexed in order to get to the index generation screen, to get the palette down to 16 colours. The colour palette can be checked using [context menu]->dialogs->indexed palette.
Customizing Anaconda
Anaconda is the program that provides all the installation services and displays all the graphics during the installation process. It is included in the directory
5 of 8
05/26/2010 01:02 PM
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
cd1/images in a file-system image file called stage2.img. An excellent explanation of how to edit this image manually can be found here (http://wings.buffalo.edu /computing/ublinux/HOWTO-anaconda.html) .
Now we need to copy the contents to a directory where we can alter the files. A simple cp command was claimed to not work because of some hard links included in the image. For this reason we use tar to package the contents of the directory and then untarred them where we could work on them.
$ $ $ $ $ $ cd ~/anaconda tar -cvf ~/stage2.tar . cd ~ mkdir stage2 cd stage2 tar -xvf ../stage2.tar
Now we can alter the artwork used by the installer located in usr/share/anaconda /pixmaps and the artwork used in the installation slide show in usr/share/anaconda /pixmaps/rnotes. You can also edit the text in the left sidebar, which is in HTML format, in usr/share/anaconda/help/[locale]. After you've made the desired modifications, we need to compress this information back into an .img file.
$ cd ~ $ mksquashfs
stage2/ stage2.img.new
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
The next steps describe how to create a customized distribution of CentOS that includes only the packages we want and their dependencies. This is the most time consuming step as it is an iterative process where you select packages and then test for dependencies until all dependencies are resolved.
Test if all dependencies for all the RPMs in CentOS/RPMS are resolved
The following test is absolutely crucial. Inevitably once you start removing or adding RPMs to the repository, you will have to make sure that all dependencies are resolved properly. Once the test below passes, you have succeeded to create a self-contained repository that will install properly.
$ $ $ $ cd ~ mkdir testdb rpm --initdb --dbpath $PWD/testdb rpm --test --dbpath $PWD/testdb -Uvh cd1/CentOS/*.rpm
7 of 8
05/26/2010 01:02 PM
Development:Kickstart CD - ProjectDiaStar
http://wiki.projectdiastar.org/index.php/Developme...
References
http://sipx-wiki.calivia.com/index.php?title=A_Kickstart_CD_for_sipX_on_CentOS
Additional Information
http://fedoraproject.org/wiki/Anaconda http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual /Installation_Guide-en-US/ch-kickstart2.html http://fedoraproject.org/wiki/Kadischi/FAQ http://wings.buffalo.edu/computing/ublinux/HOWTO-selectpkg.html http://www.linuxjournal.com/article/6473 Retrieved from "http://wiki.projectdiastar.org/index.php/Development:Kickstart_CD" This page was last modified on 25 August 2009, at 19:26.
8 of 8
05/26/2010 01:02 PM