Wednesday, August 17, 2011

Adding operating systems to cobbler

If you followed the last post and installed cobbler, you've got the service up and running just fine now - and it still doesn't help you anything. To install a server for you, it needs to have the installation media available and imported. Thankfully, that's easy to accomplish. In this example, I'm importing CentOS 5.6 into cobbler running on the same OS.
  1. Make the installation media available. Either by mounting an ISO image or mounting the DVD.
    [root@infra01 ~]# mount /dev/dvd /mnt
  2. Import the OS using the command "cobbler import". You may specifiy any name for the OS here, so use a name that is speaking for you.
    [root@infra01 ~]# cobbler import --name=CENTOS5-6 --path=/mnt
    Before you do that, be sure that you have enough free space in the volume containing /var/www/cobbler because the command will copy all the rpms into there. For reference, size of the directory after the import:
    [root@infra01 ~]# du -h --max-depth=0 /var/www/cobbler/
    3.8G /var/www/cobbler/
    (Isn't it mean to place warnings after the command they belong to? But mostly you learn more like that. Don't think I'll feel guilty or that I'll apologize.)
  3. Now sync cobbler and the import is done.
    [root@infra01 ~]# cobbler sync
When you issue a "cobbler list" now, you should see the OS being imported (normal kernel and xen kernel) and that cobbler automatically created profiles for it.
[root@infra01 ~]# cobbler list distros:   CENTOS5-6-x86_64   CENTOS5-6-xen-x86_64 profiles:   CENTOS5-6-x86_64   CENTOS5-6-xen-x86_64 systems: repos: images:

No comments:

Post a Comment