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.
On 15/03/06, Ron Loftin reloftin@twcny.rr.com wrote:
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 ***************************
<snip?
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.
Ron, everyone else, thanks all for the input, much appreciated.
I've just started having a fiddle on a test box again so fingers crossed.
Cheers guys.
Will.
Quoting Ron Loftin reloftin@twcny.rr.com:
******************** 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
[snip]
I'm usually creating this file from %pre script, so it is automatically tailored for each system. Basically, something like:
%pre #! /bin/sh
a=`list-harddrives` d1_name=`echo $a | awk '{ print $1 }'` d1_size=`echo $a | awk '{ print $2 }' | cut -f1 -d'.'` d2_name=`echo $a | awk '{ print $3 }'` d2_size=`echo $a | awk '{ print $4 }' | cut -f1 -d'.'` set $(echo $a) numd=$(($#/2));
Then based on number of drives detected and drive sizes I simply build /tmp/partinfo (there's "%include /tmp/partinfo" in main kickstart file). If above detects single drive, it outputs directives to install onto it directly. If above detects two drives of same size, it outputs directives to build "mirrored" configuration. I'm also adjusting partition sizes based on detected drive size. Simplified (the actuall script is much longer), it looks something like this:
if [ "$numd" -eq 2 -a "$d1_size" -eq "$d2_size" ] then echo "Building mirrors" echo "clearpart --initlabel --drives=$d1_name,$d2_name part raid.01 --size $boot --ondisk $d1_name --asprimary part raid.02 --size $boot --ondisk $d2_name --asprimary part raid.11 --size 1 --grow --ondisk $d1_name --asprimary part raid.12 --size 1 --grow --ondisk $d2_name --asprimary raid /boot --level 1 --device md0 raid.01 raid.02 raid pv.00 --level 1 --device md1 raid.11 raid.12 ... and so on ... " > /tmp/partinfo else echo "Installing on signle disk" echo "clearpart --initlabel --drives=$d1_name part /boot --size $boot --ondisk $d1_name --asprimary part pv.00 --size 1 --grow --ondisk $d1_name --asprimary ... and so on ... " > /tmp/partinfo fi
Of course, you need to be carefull not to use this if machine has drives with data that you want to preserve ;-)
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.
Hi, I am trying to install a box by using your trick (nfs mount + %include) Here is my problem : Anaconda says that he can't find my files on /mnt/ks But I think my export should be good because I can mount it on another machine. In addition, during the end of anaconda he tells me that he has unmounted /mnt/ks and I can see request mount in my /var/log/messages server. You can see my kickstart file :
install lang en_US.UTF-8 langsupport --default en_US.UTF-8 en_US.UTF-8 fr_FR.UTF-8 keyboard fr mouse genericwheelps/2 --device psaux skipx network --device eth0 --bootproto static --ip 85.5.11.144 --netmask 255.255.255.0 network --device eth1 --bootproto dhcp nfs --server my.machine.int --dir /var/kickstart/centos/4.1/i386/os firewall --disabled timezone --utc Europe/Paris bootloader --location=mbr zerombr yes reboot
%include /mnt/ks/partition %include /mnt/ks/package
%pre mkdir /mnt/ks mount my.machine.int:/var/kickstarttest /mnt/ks
%post %include /mnt/ks/nameserver %include /mnt/ks/adduser %include /mnt/ks/partage %include /mnt/ks/ntp %include /mnt/ks/yum
cat << EOF2 > /etc/sysconfig/sendmail DAEMON=no QUEUE=1h EOF2
chkconfig gpm off chkconfig kudzu off chkconfig iptables off chkconfig ip6tables off chkconfig mdmonitor off chkconfig mdmpd off chkconfig pcmcia off chkconfig rhnsd off chkconfig cups off chkconfig isdn off chkconfig xfs off chkconfig ntpd on chkconfig canna off
cat > /etc/profile.d/toto.sh << EOF5 alias l="ls -la" alias ppg="ps auxw|grep" EOF5 chown root.root /etc/profile.d/toto.sh chmod 0755 /etc/profile.d/toto.sh
cat >> /etc/inputrc << EOF10 # toto : debut "\eOC": forward-word "\eOD": backward-word "\e\e[C": forward-word "\e\e[D": backward-word # toto : fin EOF10
On 23/03/06, saveline@alinto.net saveline@alinto.net wrote:
Hi, I am trying to install a box by using your trick (nfs mount + %include) Here is my problem : Anaconda says that he can't find my files on /mnt/ks But I think my export should be good because I can mount it on another machine. In addition, during the end of anaconda he tells me that he has unmounted /mnt/ks and I can see request mount in my /var/log/messages server. You can see my kickstart file :
install lang en_US.UTF-8 langsupport --default en_US.UTF-8 en_US.UTF-8 fr_FR.UTF-8 keyboard fr mouse genericwheelps/2 --device psaux skipx network --device eth0 --bootproto static --ip 85.5.11.144 --netmask 255.255.255.0 network --device eth1 --bootproto dhcp nfs --server my.machine.int --dir /var/kickstart/centos/4.1/i386/os firewall --disabled timezone --utc Europe/Paris bootloader --location=mbr zerombr yes reboot
%include /mnt/ks/partition %include /mnt/ks/package
%pre mkdir /mnt/ks mount my.machine.int:/var/kickstarttest /mnt/ks
That looks pretty much like what I have working. When you're mounting my.machine.int, are you using an IP address or is that the hostname? I'd try using the IP in case you don't have name services available.
You can keep an eye on what KickStart is doing by by switching virtual consoles as usual:
Alt-F1 - installation dialog Alt-F2 - shell prompt Alt-F3 - install log (messages from install program) Alt-F4 - system log (messages from kernel, etc.) Alt-F5 - other messages Alt-F3 is especially useful when dealing with errors in your Kickstart configuration files.
Here's the config I currently have....
# Kickstart to build default CentOS system # # $Id: centos4-install-ks.cfg,v 1.5 2006/03/21 14:57:18 root Exp $ #
# Setup kickstart defaults (keyboard, NFS server etc.) # %include /mnt/ks/kickstart/include/kickstart.cfg # standard Kickstart defaults for keyboard, languange, NFS server etc. etc.
nfs --server=192.168.24.218 --dir=/opt/centos/4/os/i386 lang en_US.UTF-8 langsupport --default=en_GB.UTF-8 en_GB.UTF-8 keyboard uk reboot text network --device eth0 --bootproto dhcp rootpw --iscrypted $1$wUjJ2O2O$xhfsduRpIbo2h7TVtT6Wo1 firewall --disabled selinux --disabled authconfig --enableshadow --enablemd5 timezone --utc Europe/London bootloader --location=mbr
# Setup partitions %include /mnt/ks/kickstart/include/disk.cfg
# Package list to install %include /mnt/ks/kickstart/include/packages.cfg
%pre mkdir /mnt/ks mount 192.168.24.218:/opt/ /mnt/ks
%post # Setup CentOS Yum repository %include /mnt/ks/kickstart/include/centos4-yum.cfg [lots of other stuff after here]
Will McDonald a écrit :
On 23/03/06, saveline@alinto.net saveline@alinto.net wrote:
Hi, I am trying to install a box by using your trick (nfs mount + %include) Here is my problem : Anaconda says that he can't find my files on /mnt/ks But I think my export should be good because I can mount it on another machine. In addition, during the end of anaconda he tells me that he has unmounted /mnt/ks and I can see request mount in my /var/log/messages server. You can see my kickstart file :
install lang en_US.UTF-8 langsupport --default en_US.UTF-8 en_US.UTF-8 fr_FR.UTF-8 keyboard fr mouse genericwheelps/2 --device psaux skipx network --device eth0 --bootproto static --ip 85.5.11.144 --netmask 255.255.255.0 network --device eth1 --bootproto dhcp nfs --server my.machine.int --dir /var/kickstart/centos/4.1/i386/os firewall --disabled timezone --utc Europe/Paris bootloader --location=mbr zerombr yes reboot
%include /mnt/ks/partition %include /mnt/ks/package
%pre mkdir /mnt/ks mount my.machine.int:/var/kickstarttest /mnt/ks
That looks pretty much like what I have working. When you're mounting my.machine.int, are you using an IP address or is that the hostname? I'd try using the IP in case you don't have name services available.
You can keep an eye on what KickStart is doing by by switching virtual consoles as usual:
Alt-F1 - installation dialog Alt-F2 - shell prompt Alt-F3 - install log (messages from install program) Alt-F4 - system log (messages from kernel, etc.) Alt-F5 - other messages Alt-F3 is especially useful when dealing with errors in your Kickstart configuration files.
Here's the config I currently have....
# Kickstart to build default CentOS system # # $Id: centos4-install-ks.cfg,v 1.5 2006/03/21 14:57:18 root Exp $ #
# Setup kickstart defaults (keyboard, NFS server etc.) # %include /mnt/ks/kickstart/include/kickstart.cfg # standard Kickstart defaults for keyboard, languange, NFS server etc. etc.
nfs --server=192.168.24.218 --dir=/opt/centos/4/os/i386 lang en_US.UTF-8 langsupport --default=en_GB.UTF-8 en_GB.UTF-8 keyboard uk reboot text network --device eth0 --bootproto dhcp rootpw --iscrypted $1$wUjJ2O2O$xhfsduRpIbo2h7TVtT6Wo1 firewall --disabled selinux --disabled authconfig --enableshadow --enablemd5 timezone --utc Europe/London bootloader --location=mbr
# Setup partitions %include /mnt/ks/kickstart/include/disk.cfg
# Package list to install %include /mnt/ks/kickstart/include/packages.cfg
%pre mkdir /mnt/ks mount 192.168.24.218:/opt/ /mnt/ks
%post # Setup CentOS Yum repository %include /mnt/ks/kickstart/include/centos4-yum.cfg [lots of other stuff after here] _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
OK thanx I will try to debug my config, I didn't think about switching virtual console.
saveline@alinto.net a écrit :
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.
Hi, I am trying to install a box by using your trick (nfs mount + %include) Here is my problem : Anaconda says that he can't find my files on /mnt/ks But I think my export should be good because I can mount it on another machine. In addition, during the end of anaconda he tells me that he has unmounted /mnt/ks and I can see request mount in my /var/log/messages server. You can see my kickstart file :
install lang en_US.UTF-8 langsupport --default en_US.UTF-8 en_US.UTF-8 fr_FR.UTF-8 keyboard fr mouse genericwheelps/2 --device psaux skipx network --device eth0 --bootproto static --ip 85.5.11.144 --netmask 255.255.255.0 network --device eth1 --bootproto dhcp nfs --server my.machine.int --dir /var/kickstart/centos/4.1/i386/os firewall --disabled timezone --utc Europe/Paris bootloader --location=mbr zerombr yes reboot
%include /mnt/ks/partition %include /mnt/ks/package
%pre mkdir /mnt/ks mount my.machine.int:/var/kickstarttest /mnt/ks
%post %include /mnt/ks/nameserver %include /mnt/ks/adduser %include /mnt/ks/partage %include /mnt/ks/ntp %include /mnt/ks/yum
cat << EOF2 > /etc/sysconfig/sendmail DAEMON=no QUEUE=1h EOF2
chkconfig gpm off chkconfig kudzu off chkconfig iptables off chkconfig ip6tables off chkconfig mdmonitor off chkconfig mdmpd off chkconfig pcmcia off chkconfig rhnsd off chkconfig cups off chkconfig isdn off chkconfig xfs off chkconfig ntpd on chkconfig canna off
cat > /etc/profile.d/toto.sh << EOF5 alias l="ls -la" alias ppg="ps auxw|grep" EOF5 chown root.root /etc/profile.d/toto.sh chmod 0755 /etc/profile.d/toto.sh
cat >> /etc/inputrc << EOF10 # toto : debut "\eOC": forward-word "\eOD": backward-word "\e\e[C": forward-word "\e\e[D": backward-word # toto : fin EOF10
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I've tried by changing my.machine.int into an ip address and the debug console tells me there is a command that anaconda doesn't understand (but it didn't tell me which). I'm wondering if it there would be another method to include script without using nfs mounts ?
PS : here is my /etc/exports (I use the second export) : /var/kickstart/ 192.168.0.0/255.255.255.0(rw,no_root_squash,sync) /var/kickstarttest/ 192.168.0.0/255.255.255.0(rw)
saveline@alinto.net a écrit :
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.
Hi, I am trying to install a box by using your trick (nfs mount + %include) Here is my problem : Anaconda says that he can't find my files on /mnt/ks But I think my export should be good because I can mount it on another machine. In addition, during the end of anaconda he tells me that he has unmounted /mnt/ks and I can see request mount in my /var/log/messages server. You can see my kickstart file :
install lang en_US.UTF-8 langsupport --default en_US.UTF-8 en_US.UTF-8 fr_FR.UTF-8 keyboard fr mouse genericwheelps/2 --device psaux skipx network --device eth0 --bootproto static --ip 85.5.11.144 --netmask 255.255.255.0 network --device eth1 --bootproto dhcp nfs --server my.machine.int --dir /var/kickstart/centos/4.1/i386/os firewall --disabled timezone --utc Europe/Paris bootloader --location=mbr zerombr yes reboot
%include /mnt/ks/partition %include /mnt/ks/package
%pre mkdir /mnt/ks mount my.machine.int:/var/kickstarttest /mnt/ks
%post %include /mnt/ks/nameserver %include /mnt/ks/adduser %include /mnt/ks/partage %include /mnt/ks/ntp %include /mnt/ks/yum
cat << EOF2 > /etc/sysconfig/sendmail DAEMON=no QUEUE=1h EOF2
chkconfig gpm off chkconfig kudzu off chkconfig iptables off chkconfig ip6tables off chkconfig mdmonitor off chkconfig mdmpd off chkconfig pcmcia off chkconfig rhnsd off chkconfig cups off chkconfig isdn off chkconfig xfs off chkconfig ntpd on chkconfig canna off
cat > /etc/profile.d/toto.sh << EOF5 alias l="ls -la" alias ppg="ps auxw|grep" EOF5 chown root.root /etc/profile.d/toto.sh chmod 0755 /etc/profile.d/toto.sh
cat >> /etc/inputrc << EOF10 # toto : debut "\eOC": forward-word "\eOD": backward-word "\e\e[C": forward-word "\e\e[D": backward-word # toto : fin EOF10
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
I found my problem, you can consider it as close. I've written my file in dos mode and it couldn't be parsed by anaconda. I am sorry to have disturbed you with my problem.
On 3/29/06, Sébastien AVELINE saveline@alinto.net wrote:
I found my problem, you can consider it as close. I've written my file in dos mode and it couldn't be parsed by anaconda. I am sorry to have disturbed you with my problem.
Now that's at least worth adding to an FAQ.
-- Collins Richey If you fill your heart with regrets of yesterday and the worries of tomorrow, you have no today to be thankful for.