Ubuntu Lucid 10.04 Cobbler Kickstart Setup How To

Tags: , , , , , , , , , , , ,

Importing the ISO

At the time of this writing the version of cobbler available for CentOS-5 via the EPEL repo was This version doesn’t seem to include proper support for “breeds” other than redhat, allthough it is alluded to in the documentation. So, in order to import the ubuntu media, I had to perform a few extra manual steps.

Copy the ISO contents to a directory that corresponds to the name of your distro

In my case this is Ubunutu-10.04-x86_64. I created the directory /var/www/cobbler/ks_mirror/ and copied the entire contents of the mounted ubunutu lucid installer ISO to this location.

To mount an iso file in linux the command is something like

mount -o loop /path/to/lucid.iso /mnt/foo

Creating the .treeinfo file manually

Once the files have been copied, you should put a .treeinfo file in place too. Koan freaked out when this file wasn’t present when I attempted to perform a –virt install. I think this is safe to omit if you aren’t planning on using Koan.

family = Ubuntu
timestamp = 1272326522.13
totaldiscs = 1
version = 10.04
discnum = 1
packagedir = dists
arch = x86_64
kernel = install/netboot/ubuntu-installer/amd64/linux
initrd = install/netboot/ubuntu-installer/amd64/initrd.gz

Creating the Distro

Now, it’s time to create the cobbler distro manually. This is straightforward enough, just double check all your paths and names to make sure evertyhing matches up.

Here’s what mine looks like:

[[email protected] cobbler]# cobbler distro report --name="Ubuntu-10.04-x86_64"
Name                           : Ubuntu-10.04-x86_64
Architecture                   : x86_64
Breed                          : generic
Comment                        : 
Initrd                         : /var/www/cobbler/ks_mirror/Ubuntu-10.04-x86_64/install/netboot/ubuntu-installer/amd64/initrd.gz
Kernel                         : /var/www/cobbler/ks_mirror/Ubuntu-10.04-x86_64/install/netboot/ubuntu-installer/amd64/linux
Kernel Options                 : {}
Kernel Options (Post Install)  : {}
Kickstart Metadata             : {'tree': 'http://@@http_server@@/cblr/links/Ubuntu-10.04-x86_64'}
Management Classes             : []
OS Version                     : generic26
Owners                         : ['admin']
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Template Files                 : {}

In my case I specificed a Breed of “generic” and an OS Version of “generic26”. Here’s hoping that this gets sorted out formally and makes its way through the EPEL repo soon.

Creating the Ubuntu 10.04 Lucid Kickstart Template

Here’s an example kickstart that is working for automated installes of Ubunutu 10.04 Lucid. It’s not 100% dynamic, but it works well.

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
#System timezone
timezone America/New_York
#Root password
rootpw --iscrypted $default_password_crypted
#Initial user
user --disabled
#Reboot after installation
#Use text mode install
#Install OS instead of upgrade
# Use network installation
url --url=$tree
#System bootloader configuration
bootloader --location=mbr 
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel 
#Disk partitioning information
part swap --size 512
part / --fstype ext3 --size 1 --grow 
#System authorization infomation
auth  --useshadow  --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --enabled --trust=eth0 --ssh 
#Do not configure the X Window System
services --enabled=ntpd,nscd,puppet
#Package install information
sed -i 's/no/yes/' /etc/default/puppet 
#end raw

Creating the Profile

Creating the profile is much like creating the distro, matching up the vairables. I’ve also specified some extra kernel options to output the installer to the serial console (ttyS0) which I find preferable for –virt installs.

[[email protected] cobbler]# cobbler profile report --name="Ubuntu-10.04-x86_64"
Name                           : Ubuntu-10.04-x86_64
Comment                        : 
DHCP Tag                       : default
Distribution                   : Ubuntu-10.04-x86_64
Enable PXE Menu?               : False
Kernel Options                 : {'text': '~', 'console': ['tty0', 'ttyS0,9600n8'], 'nofb': '~'}
Kernel Options (Post Install)  : {'console': ['tty0', 'ttyS0,9600n8'], 'nofb': '~'}
Kickstart                      : /var/lib/cobbler/kickstarts/lucid.ks
Kickstart Metadata             : {}
Management Classes             : []
Name Servers                   : []
Name Servers Search Path       : []
Owners                         : ['admin']
Parent Profile                 : 
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Repos                          : ['ubuntu-lucid-x86_64']
Server Override                : <<inherit>>
Template Files                 : {}
Virt Auto Boot                 : 0
Virt Bridge                    : br345
Virt CPUs                      : 1
Virt File Size(GB)             : 5
Virt Path                      : 
Virt RAM (MB)                  : 512
Virt Type                      : qemu

Note: I manually created an apt-mirror named ubunutu-lucid-x86_64. You could use any other ubuntu repo you’d like, local or remote.

Notes & Future Improvements

This should get you going in the right direction towards automating your ubuntu builds with a cobbler install sourcesd from EPEL. Hopefully soon a fix for this will make its way into the EPEL repos.

9 Responses to “Ubuntu Lucid 10.04 Cobbler Kickstart Setup How To”

  1. darkfader Says:

    sadly enough the problems still exist just like you described them. it seems cobbler 2 loses a lot of what made cobbler so strong. we can just work to re-submit the 3rd party OS support – very frustrating for me, I’d been using cobbler since 0.3 days and didn’t figure it would make such a massive backward move. but it should get better as ubuntu 11 will use cobbler a lot more.

    one question:
    “Note: I manually created an apt-mirror named ubunutu-lucid-x86_64. You could use any other ubuntu repo you’d like, local or remote.”
    can you give some more info on how you created the repo for ubuntu or how one would specify a off-site apt mirror?

    I’m sure I’ll have it working in a few hours but I guess most people will come up with that problem (and a hanging install? 😉


  2. darkfader Says:

    Cobbler’s git version from april has many patches by ubuntu that will fix things.


  3. koolhead17 Says:

    how do you handle the repository part?
    I don`t see your kickstart file giving any information about it!!


  4. fungsi daun sirsak Says:

    I almost never comment, but i did a few searching and
    wound up here Ubuntu Lucid 10.04 Cobbler Kickstart
    Setup How To › Backdrift Backdrift. And I actually
    do have some questions for you if it’s allright.

    Could it be only me or does it look as if like some of these responses appear as if they are coming
    from brain dead people? 😛 And, if you are writing at other online sites, I’d like to keep up with
    everything fresh you have to post. Would you list of the complete urls of your community pages like
    your twitter feed, Facebook page or linkedin profile?


  5. khasiat kulit manggis untuk asam urat Says:

    Hi my family member! I wish to say that this post is amazing, nice written and come with almost all important infos.

    I would like to look extra posts like this .


  6. obat binahong Says:

    Aw, this was an exceptionally good post. Taking the
    time and actual effort to make a superb article… but what can I say… I hesitate a whole lot and
    don’t manage to get anything done.


  7. bantal mobil set Says:

    Thank you, I have recently been looking for information about this topic for a long time and yours is the greatest
    I have found out till now. But, what concerning the bottom line?
    Are you certain in regards to the supply?


  8. Biyang Melia murah Says:

    I’m curious to find out what blog platform you’re using?
    I’m having some minor security issues with my latest blog
    and I would like to find something more
    secure. Do you have any recommendations?


  9. nufamco Says:

    Thanks on your marvelous posting! I truly enjoyed reading it,
    you’re a great author.I will make certain to bookmark your blog and definitely will come
    back from now on. I want to encourage you to continue your great posts, have a nice evening!


Join the Conversation