PXE boot, Kickstart NFS install and %include...

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



Hi Will,

I saw your question in the digest version of the list, and thought you
might be interested in my solution.  I do have it working, and there are
a couple of points that I didn't see mentioned in the other parts of
this thread, or just were mentioned in passing.

The following is a kickstart file for a workstation install on my
network.

********************  Begin example ks file ***************************

#
# Custom partitioning and package selection on mirrored 4.5GB SCSI disks
#
#
nfs --server=server --dir=/export/os-cd/centos/4/os 
# Use NFS installation media

lang en_US.UTF-8	# Language used during installation process

langsupport en_US.UTF-8	# Language module(s) to install

keyboard us		# System keyboard

text			# Install in text mode

%include /mnt/ks/centos/4/ks/general-setup
%include /mnt/ks/centos/4/ks/disp/sun-21-inch
%include /mnt/ks/centos/4/ks/fw/disabled
%include /mnt/ks/centos/4/ks/dsk/4gb-scsi-mirror
%include /mnt/ks/centos/4/ks/pkg/ws
%include /mnt/ks/centos/4/ks/pkg/cd-burn

%pre
#
#	Mount the KickStart tree
#
mkdir /mnt/ks
mount server:/export/install/rhl/kickstart /mnt/ks
#
#	Save DNS config
#
cp -p /etc/resolv.conf /tmp
#
%include /mnt/ks/centos/4/ks/post-scripts
%include /mnt/ks/centos/4/ks/boot-mirror-scsi

********************  End example ks file *****************************

********************  Example disk config module  **********************

#
#	Custom partitioning for mirrored 4.5GB SCSI disks
#

#Clear the Master Boot Record
zerombr yes

#Clear all partitions from the disk
clearpart --initlabel --all

part raid.11 --noformat --asprimary --size 2048 --grow --ondisk sda
part raid.12 --noformat --asprimary --size 256 --ondisk sda
part raid.13 --noformat --asprimary --size 256 --ondisk sda
part raid.14 --noformat --asprimary --size 1024 --ondisk sda

part raid.21 --noformat --asprimary --size 2048 --grow --ondisk sdb
part raid.22 --noformat --asprimary --size 256 --ondisk sdb
part raid.23 --noformat --asprimary --size 256 --ondisk sdb
part raid.24 --noformat --asprimary --size 1024 --ondisk sdb

raid / --fstype ext3 --level 1 --device md0 raid.11 raid.21
raid swap --fstype swap --level 1 --device md1 raid.12 raid.22
raid /var --fstype ext3 --level 1 --device md2 raid.13 raid.23
raid /tmp --fstype ext3 --level 1 --device md3 raid.14 raid.24

******************** End disk config module  **************************

The first 5 lines seem to be required in all kickstart files, or at
least I have not been able to do it otherwise.

The next lines are modules that describe other KS parameters, display
config, firewall config, disk partitions and mirroring, and lists of
software groups and/or individual packages to install.

One VERY IMPORTANT point to remember is shown in the "%pre" script.
This is how to make the modules available to anaconda for processing.
Just mount the tree where the modules live somewhere on the target
system where you can tell anaconda to go read it.  Here, I just create a
new directory ( /mnt/ks ) and all %include directives reference that
tree.  Again, all paths must be specified the way that the CLIENT will
evaluate them.

After that, it's a snap.  You can do almost anything you want as far as
including other config files, additional pre/post scripts, whatever.
The biggest limit I've found so far is the imagination of the person
setting up the process.

-- 
Ron Loftin                      reloftin@xxxxxxxxxxxx

"God, root, what is difference ?"       Piter from UserFriendly


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux