CentOS image setup

From PrgmrWiki
  1. Change the xen domU config for kernel, ramdisk, and extra for anaconda with kickstart.
     kernel = "/home/nick/centos/vmlinuz"
     ramdisk = "/home/nick/centos/initrd.img"
     extra = "text interactive ks=http://www.schmalenberger.us/prgmr/anaconda-ks.cfg"
  2. Make sure the disk is not mounted or partitioned or anything in the dom0 while the domU installs on it.
  3. After anaconda is done make sure its shutdown properly and completely.
  4. Mount the new filesystem in the dom0 and tar it as centos32step1.tar.gz (remember to use tar --selinux!).
  5. umount the filesystem, make sure it boots and works ok.
  6. Erase the disk and install from centos32step1.tar.gz.
  7. Make miscellaneous changes to filesystem (remove hostname, mac address and such)
  8. yum update
  9. remove ssh host keys
  10. tar it as centos32step2.tar.gz (remember to use tar --selinux!).
  11. Confirm it still boots and works ok (try to integrate changes into kickstart file).
  12. Erase disk again, install centos32step2.tar.gz, if it works it is the new CentOS image.