Create a Linux Boot ISO image to start via Kickstart
Getting tired of creating new VM’s, and don’t want to clone for a particular reason but want them standardized? Easy. By creating a boot image that immediately starts a kickstart installation, you can completely automate creating a VM regardless of virtualization solution your using.
To create the isolinux boot image:
Mount the DVD image.
mount -o loop /path/to/dvd.iso /mnt
Copy the data locally.
rsync -av /mnt/isolinux [where ever]
Edit the isolinux.cfg file to update and point to proper kickstart location, and make it auto start by setting prompt to 0.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | default linux prompt 0 timeout 600 display boot.msg F1 boot.msg F2 options.msg F3 general.msg F4 param.msg F5 rescue.msg label linux kernel vmlinuz append initrd=initrd.img ks=nfs:192.168.0.1:/mnt/vg1/iso/kickstart/centos55_text.ks label text kernel vmlinuz append initrd=initrd.img text label ks kernel vmlinuz append ks initrd=initrd.img label local localboot 1 label memtest86 kernel memtest append - |
Create a simple script in the isolinux directory to do the heavy lifting.
1 2 3 4 5 6 | #!/bin/sh ISO_NAME=centos55_boot.iso # Remove the old iso. rm -f $ISO_NAME # Make the image. mkisofs -o $ISO_NAME -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T $PWD |
Kick it off and you should now have a viable boot image. Once you boot the newly created guest, just boot using the new image and it will automatically start your kickstart installation.
Pingback: Linux Reference links | igreen's Blog
I have tried this procedure and and it worked really well. Thank you very much!!
Standardizing VM’s by creating a boot image is really worked out. And code are simpler to add and run it. Now i don’t need to create a new VM’s.