When the latest version of RHEL or CentOS is released, you want to add it to your existing Cobbler setup. If you use the standard command, cobbler import, you will require a very large /var partition to hold more than a few versions of the operating system. If you aren’t careful, you will quickly fill up /var, and it might even hang your system. Consider using the “–available-as” option with “cobbler import”.
First, mount the OS iso:
mount -ro loop rhel-6.X-server-x86_64.iso /mnt/temp
rsync the contents to a partition that has plenty of space, example: /data
Then create a symlink to the default apache shared folder:
ln -s /data/rhel-6.X-server-x86_64 /var/www/html/rhel-6.X-server-x86_64
cobbler import –path=/data/rhel-6.X-server-x86_64 –name=rhel-6.X –arch=x86_64 \ –available-as=http://192.168.0.100:/rhel6.X
Check at your next ‘cobbler reposync’ to see if rsync is running on this repo. It should not be, unless you want /var to be used.
cobbler distro report
Once everything looks correct, run:
Connect the new OS distro to a new profile or system that needs to be built.
cobbler profile edit –name=system1 –distro=rhel-6.X-server-x86_64
cobbler system edit –name=system1 –profile=system1
Check the url settings in the kickstart file to be used. Then reboot the new system with option “–netboot-enabled=true” set.
After the system has booted, you may want to stop dhcpd, since cobbler sync restarts dhcpd and we have another system that provides the main dhcp services.
service dhcpd stop
Add a RHEL updates repo to Cobbler
# This requires a current subscription to RHEL updates for this system.
cobbler repo add –name=rhel6.X –mirror=rhn://rhel-6-server-x86_64 –breed=yum
Add some other useful repos:
# Get the RedHat “optional” repo
cobbler repo add –mirror=rhn://rhel-x86_64-server-optional-6 –name=optional6
Sync only a specific Cobbler repo:
cobbler reposync –only=optional6