WH Worktips(9)

TurnToJPG -->

Cobbler In Non-DHCP Server Networking

Sometimes you want to deploy system with cobbler server, in some restricted network which dhcp service is not allowed(considering broadcasting storm, security, etc.) Following are the steps of how-to:
Change Cobbler server setting:

$ sudo vim /etc/cobbler/settings
manage_dhcp: 0
$ sudo cobbler sync
$ sudo service dhcpd stop

Add the node definition in cobbler(useless):

# cobbler system add --name=node2 --profile=CentOS6.5-x86_64 --mac=52:54:00:71:59:64 --interface=eth0 --static=1 --ip-address= --dns-name=node2 --gateway=

Now bootup your newly added computer with PXE, hit ctrl+B once you see the bios hint.

iPXE> config net0

hit ctrl+B should be like in following image:

Setting like following:
Hit Ctrl+x for saving the settings and continue to set:

iPXE> imgfetch -n img tftp://
iPXE> imgload img
iPXE> boot

Now begin to install, you will met nework configuration fail issue:

Hit Cancel, manually set up the network, first select installation method:

Configure TCP/IP:
Configure IP address/gateway/dns/netmask:
Now configure the installation setting, you could find it in your own ks configuration file:

Continue to install, they are the same as you did before.

Cobbler in the existing DHCP enabled Network

Since the dhcp server is available in the network, simply press ctrl+B to enter the pxe boot menu and set the next_server to, then:

iPXE> imgfetch -n img tftp://
iPXE> imgload img
iPXE> boot

Now select whichever you want to deploy, your configuration will be deployed ASAP.

Cobbler Server Image To New Network

You have to change following items:
1. IP address.
2. dhcp templates 3. Next Server Name.

$ sudo vim /etc/cobbler/settings
$ sudo vim /etc/cobbler/dhcp.templates
subnet netmask {
     option routers   ; 
     range dynamic-bootp;
     option domain-name-servers,;     
     option subnet-mask;         
     filename                   "/pxelinux.0";       
     default-lease-time         21600;           
     max-lease-time             43200;      
     next-server                $next_server; 
     class "pxeclients" {

$ sudo vim /etc/default/isc-dhcp-server

Notice the IP address should be in the same ip address range.

After modification, simply use cobbler sync for syncing your changes, now restart the cobbler server, your operation should be the same as the above situations.

Also if you have playbooks of ansible which uses the static IP address, you also have to replace the IP related settings.