VMware Cloud Community
DFATAnt
Enthusiast
Enthusiast

Queation on Scripted Installs Using Kickstart

I am trying to work out a process to do a scripted install using kickstart where I load everything in to a RAM disk.

I have a process where I can format a dos partition on the intended ESX server, copy all the image files, kickstart files and cdrom files to this partition and the reboot of server use autoexec.bat to initiate a loadlin process.

I an trying to work out the parameters required for loadlin to load a RAM disk, load all the files from the DOS partition in to the RAM disk and do the ESX server install.

I am currently using an ftp server to provide the ks.cfg file and the cdrom files, which is working great, but I would like to remove the dependency of the ftp server from the process.

The line in the autoexec.bat file that initiates loadlin looks as follows:

C:\dosutils\loadlin C:\isolinux\vmlinuz ramdisk_size=10240 initrd=C:\isolinux\initrd.img ks=ftp://xxx.xxx.xxx.xxx/ks.cfg ksdevice=eth0

I know I can change the "ks=" part to point to a ks.cfg file located in the initrd image (ks=file:/ks.cfg), but I have 400 hundred ESX server to build and need an individual ks.cfg file for each server. This means that putting a ks.cfg file in the initrd image is not the answer I am after

Has anyone else attempted this or have any suggestions on how I might go about this.

0 Kudos
5 Replies
MayurPatel
Expert
Expert

Have a look at the vmprofessional website.

You can find the information on how to create a boot CD which contains a list of different esx host details. You can modify it to suit your specific requirements.

http://vmprofessional.com/index.php?content=kickstart_2

Hope this will help you.

MP

0 Kudos
_the_dude_
Enthusiast
Enthusiast

Hi,

If installing 400 esx server you may want to consider installing over PXE (network), and serve the ks.cfg file from a web-server.... You can also do the cdrom-installation you're using alread and serve the ks-files on a web-server. You'll need to specify an ip-adress then (ks=http://12.34.56.78/ks.cfg) You can even generate a kickstart files on the fly based on the ip-adress the http request is coming from.

But to answer your question: Check out this page:

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-kickstart2-startinginstall.htm...

You probably want to use the following:

ks=hd: in that file system (for example,

ks=hd:sda3:/mydir/ks.cfg).

Note: The second colon is a syntax change for Red Hat Linux 9.

As far as I know ESX is based on RHEL7, so you may want to skip the second colon... This guy seems to agree with me:

http://www.vmware.com/community/thread.jspa?threadID=61874&tstart=300

DFATAnt
Enthusiast
Enthusiast

I have managed to work out how to get the ks.cfg to run from the hard disk partition (hardware being HP DL380 G5) with the syntax being ks=hd:cciss/c0d0p1:/ks.cfg

Now I'm trying to figure out how to load the files in to the RAMDISK and access them from the kickstart file.

I am using PXE to push out an image to the HP servers (pre ESX install) , but the image will be over written by the ESX install so I am needing to load things in to the RAM DISK and access them from there. I am also trying to minimise the dependency of other services on the build process. I currently have the CD-ROM files and post install files being transferred from an ftp server, but this is not always reliable. If I can remove the ftp dependency, the build process will go lot smoother.

Thanks

Ant

0 Kudos
skearney
Enthusiast
Enthusiast

The RAMDISK is your / filesystem during install. In your %pre, you'll need to create a mount point for your PE partition, copy the files to another location, and umount.

In %post, you'll need to run in a nochroot'd environment to access the ramdisk.

I've run into lots of problems with anaconda by staging the installation files on a HD, be prepared to spend some time on this if you are deadset on this method. Network-based installs are much, much easier.

_the_dude_
Enthusiast
Enthusiast

I'm not sure why you're focused on the ramdrive.

If you have the files on a harddrive already, you may want to use the files directly from that partition:

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/s1-kickstart2-options.html

You probably need something in your kickstart file like:

install

harddrive --partition=cciss/c0d0p1 --dir=/install-tree

(make sure you have two separate lines)

Older versions of redhat only accepted CDrom iso files, i'm not sure what ESX expects though. For files that you have added manually you may need to mount the harddrive agan in the post-script. Try something like:

mkdir /tmp/cdrive

mount -t vfat /dev/cciss/c0d0p1 /tmp/cdrive

0 Kudos