For those that don’t use it, Cobbler is a PXE installation manager for automating the deployment of systems and packages. It is an order of magnitude simpler then creating a custom PXE environment by hand.
In this case I am setting up my Cobbler environment to automatically deploy a base operating system and then hand off to Puppet for further configuration. After handoff Puppet will configure the systems in a multi-node OpenStack setup which will rebuild nightly.
The purpose of that entire system this is to do development testing of the Quantum Networking Service for the spring Grizzly release. I will document the process for that in a later blog post.
What we will do today, is get the base system up and running for deploying your server operating systems using Cobbler.
Installing Cobbler
First thing you need to do is install your base operating system. In this case since we are building out a lab environment to test OpenStack builds we should download and install ubuntu server 12.04 (precise).
Once this is up and configured with a static IP address, we need to install and configure cobbler
sudo apt-get install cobbler cobbler-web
This will install Cobbler, and the Cobbler web interface. Next we will run a sanity check of cobbler
sudo cobbler check
You may get some notifications of items that need to be addressed. Address as needed and run the check command to verify.
Next, you can set the username and password that you will use to manage the cobbler web interface. You can replace these items with whatever user / password you would like. In this case we have the username Cobbler and the password cobbler.
htdigest /etc/cobbler/users.digest "Cobbler" cobbler
After you have successfully run cobbler check you will need to synchronize cobbler by running the cobbler-sync command
cobbler sync
Importing Ubuntu Server ISO’s
Next thing we need to do is grab the ISO that we used to install the server we are on, and import it into cobbler. In this case we are making a folder to mount a NFS export called VMwareISO on a NAS at 10.0.76.2
sudo mkdir /mnt/VMwareISOsudo mount 10.0.76.2:/volume1/VMwareISO /mnt/VMwareISO
Next we have to create an ISO mount point and mount the Ubuntu 12.04 ISO
sudo mkdir /mnt/isosudo mount -o loop ubuntu-12.04-server-amd64.iso /mnt/iso
You will get the following message, and that is all right.
mount: warning: /mnt/iso seems to be mounted read-only.
Next, we will import the ISO we just mounted into Cobbler.
sudo cobbler import --name=ubuntu-server --path=/mnt --breed=ubuntu
Configuring DHCP to point to your PXE server
This part will vary based on your lab setup. If you already have a DHCP server setup, then you need to set the “next-server ” option to the ip address of your Cobbler server.
If you want to run DHCP on the same server you are using for Cobbler you need to install and configure a DHCP server.
sudo apt-get instal isc-dhcp-server
Next we have to edit the configuration file /etc/dhcp/dhcpd.conf
sudo vim /etc/dhcp/dhcpd.conf
Now you need to add a statement configuring a DHCP scope on this server. In this case I am using the following options -
- Subnet 10.0.76.0/24
- IP Address range 100-254
- Router 10.0.76.1
- DNS Server 10.0.76.10
- PXE server (cobbler) 10.0.76.30
subnet 10.0.76.0 netmask 255.255.255.0 { option routers 10.0.76.1; option domain-name-servers 10.0.76.10; option subnet-mask 255.255.255.0; range dynamic-bootp 10.0.76.100 10.0.76.254; filename “/pxelinux.0″; default-lease-time 21600; max-lease-time 43200; next-server 10.0.76.30;
Once this is added, restart the DHCP server to pick up your configuration
sudo /etc/init.d/isc-dhcp-server restart
Creating a custom seed file and pointing the Cobbler to it
FYI, this step may not be completely necessary in the future. However there is currently a bug open with Cobbler where when you are using it with a Ubuntu 12.04 file where the client installation will bomb out. You will get an error stating “Bad Archive Mirror An error has been detected while trying to use the specified archive mirror”

If you dig through /var/log/syslog you will find a more descriptive error shown here below
choose-mirror[3474] DEBUG command: wget -q http://gb.archive.ubuntu.com/ubuntu//dists/precise/Release -O – | grep -E ‘^(Suite|Codename):’ choose-mirror[3474] WARNING **: broken mirror: invalid Suite or Codename in Release file for $suite
After a bit of digging I found a bug logged with Cobbler here - https://bugs.launchpad.net/ubuntu/+source/cobbler/+bug/1000219. the bug itself hasn’t been fixed. Luckily however there are a couple ways to work around this.
Copying and Editing your new seed file
Cobbler keeps it’s auto installation files for all different operating system types in /etc/cobbler/ in the next steps we explore this directory and create a new file based on a sample provided.
cd /etc/cobblersudo cp ubuntu-server.preseed ubuntu-server.openstack.preseed
Pointing cobbler to the new file
The next thing we need to do, is log into our Cobbler web interface to and make sure things are working.
your favorite web browser - http://<yourservername>/cobbler_web/ with username Cobbler password cobbler (or whatever username and pass you provided)

Next we need to navigate to PROFILES and click on EDIT to edit ubuntu-server-x86_64 instance

You will see a screen with a bunch of form fields. You need to navigate down to the “Kickstart” option and change from
/var/lib/cobbler/kickstarts/sample.seed
to the file we have just changed sample.seed.precise
/etc/cobbler/ubuntu-server.openstack.preseed
As you can see, all we did was add .precise to the end of the sample.seed file name.

Click save, and now you should be ready to PXE install your first Ubuntu server. (if you use this file your username / pass will be ubuntu/ubuntu)
Whats Next?
In the next blog post in this series we will configure Puppet Master on our server and do a super dangerous thing – optimize our seed files to blow away our file system without any user interaction necessary. Needless to say we will all need to use this next one with caution….
Similar Posts:
- Simplifying scale out DataCenter design with UCS Manager 2.1
- Scale Computing HC3 – Hyper-Converged Server, Storage, Virtualization
- Resume – Colin McNamara, CCIE #18233
- OpenStack Summit Fall 2012 Day 2 – Where is colin
- My name is Colin, and I support OpenStack
- Cisco announces it’s own OpenStack Distribution – What will the effect be on VMware?

Thanks a lot for the detailed cobbler instructions.
Exactly what I was looking for.
Me too, this is very helpful. Also, thanks for pointing out that bug that you ran into, it’s really nice to have the potholes clearly flagged. Enjoy your day!
excellent! I will try this out
how much disk space is usually necessary to have a server with Cobbler?
It depends on how many operating systems you need to install from it. I normally start with an 8 gig partition and extend if needed