The recent work necessary to produce the CD automatically installed a Fedora.
To find out some information in order to understand kickstart script automatically installs the necessary
production, the following is a typical Fedora installation script
#vi ks.cfg
install
text
logging –level=info
cdrom
key –skip
lang en_US.UTF-8
keyboard us
timezone –utc Asia/Shanghai
xconfig –defaultdesktop=GNOME –depth=16 –resolution=1024×768 –startxonboot
authconfig –enableshadow –enablemd5
rootpw –iscrypted
$6z55NGGN/VvYqRZgL$wMEou1v8u48PNCXSvepgCgLHSt/Ocy3i6qP41DwyE3W6GfZPr50gIx2.WXJvITTgJmtJaiFYQ606L.JmoPGlZ.
# Network configuration
network –onboot yes –bootproto dhcp –hostname test
firewall –disabled
selinux –disabled
zerombr
bootloader –location=mbr –append=”rhgb quiet”
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart –linux –initlabel
part /boot –fstype=ext4 –size=500
part pv.S3myz3-4vqV-bjX1-VWVX-N6uj-BmYV-9sNkEN –grow –size=500
volgroup vg_test –pesize=32768 pv.S3myz3-4vqV-bjX1-VWVX-N6uj-BmYV-9sNkEN
logvol / –fstype=ext4 –name=lv_root –vgname=vg_test –grow –size=1024 –maxsize=51200
logvol swap –name=lv_swap –vgname=vg_test –grow –size=800 –maxsize=1600
reboot
firstboot –disable
%packages
@base
@chinese-support
@core
@fonts
@gnome-desktop
@graphical-internet
@graphics
@mysql
Some of them pay attention to is the root password how to set up, in the example above rootpw – iscrypted behind
that string of the corresponding password is 123456. If want to himself as other
Password, you can first set root password, and then
#vi /etc/shadow
root:$6z55NGGN/VvYqRZgL$wMEou1v8u48PNCXSvepgCgLHSt/Ocy3i6qP41DwyE3W6GfZPr50gIx2.WXJvITTgJmtJaiFYQ606L.JmoPGlZ.:1482
4:0:99999:7:::
……
The ‘root:’ after the next ‘:’ before the string is the password encrypted string.
There is a partition of the set and the install packages set up, in fact, they can view the installed linux system
root directory of the anaconda-ks.cfg file, which is self-anaconda
Activity based on your installation partition and install the selected software produced by the script. Want to
install those packages can be re-installed over your linux system and selected those packages can know from the
inside
The.
Can be changed to make a good ks.cfg a linux installation CD. First load the Fedora-13-i386-DVD.iso file.
#mount -o loop Fedora-13-i386-DVD.iso /mnt/cdrom
#cd /mnt/cdrom
#ls
isolinux RPM-GPG-KEY-fedora RPM-GPG-KEY-fedora-sparc
EFI media.repo RPM-GPG-KEY-fedora-13-primary RPM-GPG-KEY-fedora-sparc64
GPL Packages RPM-GPG-KEY-fedora-13-SPARC RPM-GPG-KEY-fedora-x86_64
images repodata RPM-GPG-KEY-fedora-i386 TRANS.TBL
Make one directory 111, the contents of the CD-ROM copy of the directory, to build a 111 auto folder directory, the
ks files are copied to the directory.
#cp -a . /root/111
#cd /root/111/
#mkdir auto
#cp /root/ks.cfg .
And then to modify the startup script isolinux.cfg disc file, which on isolinux directory
#cd isolinux
#vi isolinux.cfg
default vesamenu.c32
#prompt 1
timeout 600
display boot.msg
menu background splash.jpg
menu title Welcome to Fedora 13!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label linux
menu label ^Install a new system or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img stage2=hd:LABEL=”Fedora”
label vesa
menu label Install system with ^basic video driver
kernel vmlinuz
append initrd=initrd.img stage2=hd:LABEL=”Fedora” xdriver=vesa nomodeset
label rescue
menu label ^Rescue installed system
kernel vmlinuz
append initrd=initrd.img stage2=hd:LABEL=”Fedora” rescue
label local
menu label Boot from ^local drive
localboot 0xffff
label memtest86
menu label ^Memory test
kernel memtest
append -
The default is replaced with default linux, and then to change the label linux append ks = cdrom: / auto / ks.cfg
initrd = initrd.img
stage2 = hd: LABEL = “Fedora” isolinux.cfg after editing the following:
default linux
#prompt 1
timeout 600
display boot.msg
menu background splash.jpg
menu title Welcome to Fedora 13!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label linux
kernel vmlinuz
append ks=cdrom:/auto/ks.cfg initrd=initrd.img stage2=hd:LABEL=”Fedora”
label vesa
menu label Install system with ^basic video driver
kernel vmlinuz
append initrd=initrd.img stage2=hd:LABEL=”Fedora” xdriver=vesa nomodeset
……
Finally is the production of CD image file iso:
#cd ..
#cd ..
#mkisofs -J -R -v -T -V Fedora -o autolinux.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-
load-size 4 -boot-info-table 111/
burn Autolinux.iso to the DVD disc, success.