Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

NOTE: CentOS Enterprise Linux 5 is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux 5 is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux 5.

29.10. Pre-Installation Script

Pre-Installation Script

Figure 29.15. Pre-Installation Script

You can add commands to run on the system immediately after the kickstart file has been parsed and before the installation begins. If you have configured the network in the kickstart file, the network is enabled before this section is processed. To include a pre-installation script, type it in the text area.

To specify a scripting language to use to execute the script, select the Use an interpreter option and enter the interpreter in the text box beside it. For example, /usr/bin/python2.4 can be specified for a Python script. This option corresponds to using %pre --interpreter /usr/bin/python2.4 in your kickstart file.

Many of the commands that are available in the pre-installation environment are provided by a version of busybox called busybox-anaconda. Busybox-supplied commands do not provide all features, but supply only the most commonly used features. The following list of available commands include commands provided by busybox:

        
          addgroup, adduser, adjtimex, ar, arping, ash, awk, basename, bbconfig, bunzip2, busybox, bzcat, cal, cat, catv, chattr, chgrp, chmod, chown, chroot, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, devfsd, df, diff, dirname, dmesg, dnsd, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, e2fsck, e2label, echo, ed, egrep, eject, env, ether-wake, expr, fakeidentd, false, fbset, fdflush, fdformat, fdisk, fgrep, find, findfs, fold, free, freeramdisk, fsck, fsck.ext2, fsck.ext3, fsck.minix, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd, insmod, install, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iptunnel, kill, killall, lash, last, length, less, linux32, linux64, ln, load_policy, loadfont, loadkmap, login, logname, losetup, ls, lsattr, lsmod, lzmacat, makedevs, md5sum, mdev, mesg, mkdir, mke2fs, mkfifo, mkfs.ext2, mkfs.ext3, mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, ping6, pipe_progress, pivot_root, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, renice, reset, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, runlevel, rx, sed, seq, setarch, setconsole, setkeycodes, setlogcons, setsid, sh, sha1sum, sleep, sort, start-stop-daemon, stat, strings, stty, su, sulogin, sum, swapoff, swapon, switch_root, sync, sysctl, tail, tar, tee, telnet, telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty, tune2fs, udhcpc, udhcpd, umount, uname, uncompress, uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip
        
      

Some of the previous commands are provided by busybox and some are provided in their full featured versions. In addition to the commands above the following commands are provided in their full featured versions:

        
          anaconda bash bzip2 jmacs ftp head joe kudzu-probe list-harddrives loadkeys mtools mbchk mtools mini-wm mtools jpico pump python python2.4 raidstart raidstop rcp rlogin rsync setxkbmap sftp shred ssh syslinux syslogd tac termidx vncconfig vncpasswd xkbcomp Xorg Xvnc zcat
        
      

Caution

Do not include the %pre command. It is added for you.

Note

The pre-installation script is run after the source media is mounted and stage 2 of the bootloader has been loaded. For this reason it is not possible to change the source media in the pre-installation script.


 
 
  Published under the terms of the GNU General Public License Design by Interspire