VMware

This Question is Answered

1 "helpful" answer available (6 pts)
12 Replies Last post: Oct 20, 2005 11:51 AM by Rajeev  

Kickstart ESX v.2.5.2 from cdrom posted: Oct 5, 2005 6:11 AM

Click to view SenZatioN's profile Novice 4 posts since
Sep 21, 2005
My situation: Pretty soon i've got to setup an ESX-farm consisting of 30 HP DL385 machines, the machines will be shipped without floppydrives but with cdrom and usb. To prevent setup mistakes i want to kickstart the ESX installation completely from cdrom or with a usb flashdrive and cdrom. PXE boot ain't possible cause the lack of a DHCP server in the specific VLAN.

What i've tried so far: installed an ESX server by hand, created the kickstartfile and also downloaded the bootimage by the MUI. The idea was to edit the ks.cfg in the bootimage so i could start it from flashdrive instead of the unavailable floppydisk. Result - none.

Then i've tried to rebuild the cdrom and included the ks.cfg in the /isolinux directory with the following line in the isolinux.cfg: append apic devfs=nomount ramdisk_size=7168 vga=788 initrd=initrd.img ks=cdrom:/isolinux/ks.cfg also without any luck.

So i decided to rip apart the bootimage delivered by the MUI and tried to find the ks.cfg in that image, without succes, i can't find any kickstart file in that image... I'm stunned, any suggestions?

Re: Kickstart ESX v.2.5.2 from cdrom

1. Oct 5, 2005 6:22 AM in response to: SenZatioN
Click to view GavinJ's profile Hot Shot 184 posts since
Mar 28, 2005
A couple of thing's spring to mind. Firstly you could mount the boot file on from another server using iLO virtual media. Secondly to open ks.cfg you firstly need to mount the the .img then unzip it; something like this:

mount -t vfat -o loop ./bootdisk.img /mnt
cd /mnt
mkdir /img
cp initrd.img /img/initrd.img.gz
cd /img
gunzip initrd.img.gz
mount -t ext2 -o loop ./initrd.img /img
cd /img

Hope that helps

Gavin

Re: Kickstart ESX v.2.5.2 from cdrom

2. Oct 5, 2005 7:59 AM in response to: SenZatioN
Click to view Jasemccarty's profile Champion 3,806 posts since
Apr 5, 2005
I modified my ESX 2.5.1 iso to include my updated ks.cfg files.

I copied intrd.img from the isolinux directory on my ESX cd to /tmp

The initrd.img is a GZipped img file, so there are a couple things you have to do to modify it.

I renamed it from /tmp/initrd.img to initrd.img.gz
[code]mv /tmp/initrd.img /tmp/initr.img.gz[/code]

Then I gunzipped it
[code]gunzip /tmp/initrd.img.gz[/code]

I then mounted the resulting img to /mnt/floppy
[code]mount /tmp/initrd.img /mnt/floppy -o loop [/code]

I could then see my boot files.

I copied a basic ks.cfg (and also 01.cfg, 02.cfg, ... 06.cfg which all included settings for my 6 ESX servers) into /mnt/floppy.

I then unmounted the initrd.img file, gzipped it, and renamed it back to initrd.img.
[code]umount /mnt/floppy
gzip initrd.img
mv initrd.img.gz initrd.img[/code]

I then imported the new initrd.img into /isolinux on the ISO, using UltraISO (I bought).

I also modified the isolinux.cfg file to include the following info:
[code]label general
kernel vmlinuz
append vmware apic text ks=file:/ks.cfg ramdisk_size=7168 initrd=initrd.img local
label esx1
kernel vmlinuz
append vmware apic text ks=file:/01.cfg ramdisk_size=7168 initrd=initrd.img local
label esx2
kernel vmlinuz
append vmware apic text ks=file:/02.cfg ramdisk_size=7168 initrd=initrd.img local
...
label esxN
kernel vmlinuz
append vmware apic text ks=file:/0N.cfg ramdisk_size=7168 initrd=initrd.img local
[/code]

I then saved isolinux.cfg, and imported it back into the ESX ISO.

I saved the ISO, burned it to a disk, and now at the prompt, I can type esxN and install the specific settings for that ESX.

Hope that helps, as it took me about a week to figure it all out.

Message was edited by: jmccarty-appro - Updated path

Re: Kickstart ESX v.2.5.2 from cdrom

4. Oct 5, 2005 8:11 AM in response to: SenZatioN
Click to view Jasemccarty's profile Champion 3,806 posts since
Apr 5, 2005
Again, glad to help.

This should save you the week it took me to figure out how to do it.

The big thing to remember in the path to the ks.cfg files is, that they are located INSIDE the initrd.img file.

To be honest, I copyied initrd.img to appro.img (Company) so I would still have my original initrd.img. I simply modified the isolinux.cfg to point to the appro.img in the labels that were my custom installs.

Works like a champ, except for when I have to update serials (4 >8 way) and the like, but other than that, it makes things easier.

Re: Kickstart ESX v.2.5.2 from cdrom

5. Oct 5, 2005 8:14 AM in response to: Jasemccarty
Click to view GavinJ's profile Hot Shot 184 posts since
Mar 28, 2005
Yes, nice solution Jase. btw - how do you put boxes around text in the thread?

Gavin

Re: Kickstart ESX v.2.5.2 from cdrom

6. Oct 5, 2005 8:16 AM in response to: GavinJ
Click to view Jasemccarty's profile Champion 3,806 posts since
Apr 5, 2005
Remove the spaces, and it will work:
[ code ] Some code here [ / code ]

Re: Kickstart ESX v.2.5.2 from cdrom

7. Oct 5, 2005 8:19 AM in response to: Jasemccarty
Click to view GavinJ's profile Hot Shot 184 posts since
Mar 28, 2005
[code] Ah, like that [/code]

:)

Re: Kickstart ESX v.2.5.2 from cdrom

9. Oct 19, 2005 12:23 PM in response to: SenZatioN
Click to view Rajeev's profile Hot Shot 197 posts since
Nov 10, 2004
I just happened to stumble across this thread while doign a google search and it has in fact helped me quite a bit. My only issue with this solution (this may be more of a limitation of the installer) is that you need to create custom ks.cfg files for EACH server you have built and incorporate this into the initrd.img file. Is there a way to have it prompt you for the servername and IP info during the install?

Thanks again for this great info!

Excellent

11. Oct 20, 2005 5:42 AM in response to: Jasemccarty
Click to view Erik Bussink's profile Expert 423 posts since
Jan 10, 2004
Excellent write-up. Thanks a lot :-)

Re: Kickstart ESX v.2.5.2 from cdrom

12. Oct 20, 2005 11:51 AM in response to: SenZatioN
Click to view Rajeev's profile Hot Shot 197 posts since
Nov 10, 2004
You'll have to excuse my ignorance, but how would I go about doing that? I've finally got a setup that works. I've split apart the initrd.img file and inserted the .cfg files I want, then I added the initrd.img to the bootnet.img files from the CD. Now my build is booting off the virtual floppy disk (IBM x366 don't have floppies) and it does an NFS mount and installs ESX perfectly will the server setup exactly how I want it.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities