Skip to content

Kickstart

Loop mounting an iso can give you read only access, but to change it you need to do more ..

loop mount
1
2
3
4
5
6
7
<pre>
 mkdir readonly
 mkdir writealso
 mount -o loop thecd.iso readonly
 cd readonly 
 tar cf - . |(cd ../writealso; tar xfp -)
</pre>

alter contents

Place the kickstart file (ks.cfg) in the root directory of the writable image :

kickstart config
cp ks.cfg writealso

Then edit the menu file isolinux/isolinux.cfg to add a new entry which calls the kickstart file, some thing like this :

boot menu
1
2
3
4
label linux   
menu label ^Install CentOS 7   
kernel vmlinuz   
append initrd=initrd.img inst.stage2=hd:LABEL=CentOSx207x20x86_64 ks=cdrom:/ks.cfg

Also.. if you want a long timeout, for instance a very slow booting machine (you might want the install to 'hang' a long time so you can go about your business and come back later). The maximum timeout is 35996. :

make the system wait for you
timeout 35996

That's in tenth of seconds, so about 3600 seconds, just under an hour.

write new iso

In the old days it was mkisofs, but it seems to be called genisoimage nowadays. It does not matter that much since the arguments are the same :

write iso
1
2
3
4
<pre>
 cd ../writealso
 genisoimage -o ~/next.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "Centos 6.6" .
</pre>

no boot with usb stick

Now i've had some problems getting this iso to boot from usb stick. This while it would boot fine if used as bootable iso in virtualbox. I did had some success after doing (of course) two alterations to the iso.

isohybrid.pl

This is a command in the syslinux suite (on debian at least), just run it on your iso, t will say nothing but your image will be enlarged (the docs say alignment ?!).

isohybrid you.iso

Now i burned it as described in the next section :

mac burning

I only had a mac or i would not have dreamed about using it.. But the description is here : visit

In short:

  • format the usb stick as 1 partition free space with disk utility
  • hdiutil convert -format UDRW -o new.iso old.iso
  • diskutil list (find your usb disk number : #)
  • dd if=./new.iso.dmg of=/dev/rdisk# bs=1m

Yes.. the new disk got an .dmg appended and yes.. you need to fill in the #

troubleshooting

A particular problem on centos7 seems to be that the installer still halts with a menu :

choice
1
2
3
4
5
6
================================================================
================================================================
Installation
.....
....
Please make your choice ...

This seems to happen when you forget to add an option to the kickstart file, so note which menu it is and restart the kickstart configurator to enforce the new parameters into the kickstart.cfg.