Re: Kickstart script with parameters.



Another approach would be to something like this:

1. Create a parameter that you pass to anaconda (i.e. add to the command
line after the "ks=..." parameter). Example: "ks=.... servertype=database"
2. In the pre-script, before you partition the disk, do something like
this:
1. read the value of the servertype-parameter
2. If the value is "database", fetch (using for example wget) a file
containing the database partition scheme. This means that you
have to have
one file per partitioning scheme. If the value is
"applicationserver" then
fetch the application server disk partition file.
3. Run partition based on this file

I havent' implemented this myself, so I'm not into the details, but the
general approach should work.
On 8/26/09, Berthold Cogel <cogel@xxxxxxxxxxxx> wrote:

Rohit khaladkar schrieb:
Hi All,I need to know if the kickstart script used for Redhat Linux
installation can work with customised parameters ?
I have two servers :
1)Application server : With less disk space
2)Database server. : With more disk space.

The partitioning would vary on the type of the server. I was wondering if
I
can use the "user supplied parameters" in the kickstart script so that
partitioning can change according to the parameter supplied.

Please let me know if there would be any other approach to handle this
situtation



We are using a HTTP based installation server with a CGI that generates
customized kickstart scripts. Parameters are passed via PATH_INFO to the
CGI:

ks=http://<installserver>/cgi-bin/ks.cgi/EL/5/i386/server/ks.cfg

This defines the distribution (we use sometimes Centos), the OS version,
architecture and the version (Workstation or Server)... This is needed
for the url parameter in the header of the script. And for some defaults
in %pre ans %post sections.

Additional parameters can then be passed as kernel parameters on the
commandline:

linux install ks=... <NAME>=<VALUE>

Then you must parse /proc/cmdline in the %pre and %post section of your
kickstart script:

if grep -i -q "NAME=[a-z0-9]" /proc/cmdline
then
NAME=`cat /proc/cmdline | sed 's/.*NAME=\([^ ]*\).*/\1/'`
fi


Now you can generate includes for your kickstart script from this. Or
you can load predefined includes via wget in the installation system
during the process. We have a library of scripts that are included this
way in %pre and %post sections. What you get is something like this:


# Kickstart configuration file EL 3 kickstart Mode

# EL 3 i386 WS
# Linux: EL
# Version: 3
# Modus: kickstart
# Variante: WS

# parameter for installation
text
install
url --url http://<installserver>/rhel/EL-3/current/i386/WS
lang de_DE
keyboard de-latin1-nodeadkeys

mouse

# generated includes
%include /tmp/language.inc
%include /tmp/global.inc
%include /tmp/network.inc
%include /tmp/diskconf.inc

%packages --resolvedeps --ignoremissing
%include /tmp/packages.inc
%include /tmp/packages-exclude.inc


#############
#
# Pre Section
#
#############

%pre

#!/bin/sh -x
#
# Pre-Install
#

LINUX=EL
LINUX_VERSION=3
FLAVOR=WS
ARCH=i386

...



Regards,
Berthold Cogel

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: SBS 2003 Installation Drives - Folders
    ... Should you move the application installation points you will reduce the ... space required on the OS partition significantly. ... The effect of large database files on Shadow Copy. ... There is ample expansion space on this server either internally or through ...
    (microsoft.public.windows.server.sbs)
  • Re: Kickstart script with parameters.
    ... 1)Application server: With less disk space ... 2)Database server. ... can use the "user supplied parameters" in the kickstart script so that ... We are using a HTTP based installation server with a CGI that generates ...
    (RedHat)
  • Re: Partitioning an OEM install of SBS 2003
    ... Microsoft Windows Small Business Server 2003, ... you can only specify the boot partition size with the Dell Server ... continues with the installation of the SBS 2003 components. ...
    (microsoft.public.windows.server.sbs)
  • Re: Need Help setting up Mysql on Openserver 6.0
    ... > mysql> status ... > Server characterset: latin1 ... to make the proper selection during installation. ... was installed first in partition 1 and 6.0 was later installed in partition 2) ...
    (comp.unix.sco.misc)
  • Moving SharePoint 2003, WSS, and SQL 2000 DBs from OS partition to another
    ... and they will help me move the SQL 2000 DB ... were all installed to the OS partition on our server. ... installation to that other partition - if possible. ... This was not a migration from MSDE - it was a straight SQL server ...
    (microsoft.public.sharepoint.portalserver)