SLS Pismo: Adding Ubuntu image to Cobbler

From Define Wiki
Revision as of 17:00, 7 December 2015 by Jon (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is basically the same as the process detailed here.

Obtain the kernel and initial ramdisk

wget http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/installer-armhf/current/images/generic-lpae/netboot/initrd.gz
wget http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/installer-armhf/current/images/generic-lpae/netboot/vmlinuz

Add the distro and profile to cobbler

  • Add the new distribution to cobbler:
cobbler distro add --name=ubuntu-server-1404-midway --kernel=/var/lib/tftpboot/images/ubuntu-server-1404-midway/vmlinuz --initrd=/var/lib/tftpboot/images/ubuntu-server1404-midway/initrd.gz
  • Then create a profile:
cobbler profile add --name=ubuntu-server-1404-midway --distro=ubuntu-server-1404-midway
  • And, add a preseed (or kickstart) file to the profile and run cobbler sync:
cobbler profile edit --name=ubuntu-server-1404-midway --kickstart=/var/lib/cobbler/kickstarts/ubuntu-server-arm.1404.seed
cobbler sync

Edit the boot arguments in the new cobbler profile

  • Change the boot arguments:
cobbler profile edit --name ubuntu-sever-1404-midway --kopts="console=ttyAMA0 priority=critical text auto=true netcfg/choose_interface=eth0 url=http://172.28.0.2/cblr/svc/op/ks/profile/ubuntu-server-1404-midway"

N.B. - URL for the preseed file as a kernel argument points to cobbler's web server. This file is placed on the web server only when the profile's 'kickstart' field is correctly populated and a cobbler sync has been run.

  • Verify your profile settings:
[root@pxe ~]# cobbler profile report --name=ubuntu-server-1404-midway
Name                           : ubuntu-server-1404-midway
TFTP Boot Files                : {}
Comment                        : 
DHCP Tag                       : default
Distribution                   : ubuntu-server-1404-midway
Enable gPXE?                   : 0
Enable PXE Menu?               : 1
Fetchable Files                : {}
Kernel Options                 : {'console': 'ttyAMA0', 'url': 'http://172.28.0.2/cblr/svc/op/ks/profile/ubuntu-server-1404-midway', 'text': '~', 'priority': 'critical', 'auto': 'true', 'netcfg/choose_interface': 'eth0'}
Kernel Options (Post Install)  : {}
Kickstart                      : /var/lib/cobbler/kickstarts/ubuntu-server-arm.1404.seed
Kickstart Metadata             : {}
Management Classes             : []
Management Parameters          : <<inherit>>
Name Servers                   : []
Name Servers Search Path       : []
Owners                         : ['admin']
Parent Profile                 : 
Internal proxy                 : 
Red Hat Management Key         : <<inherit>>
Red Hat Management Server      : <<inherit>>
Repos                          : []
Server Override                : <<inherit>>
Template Files                 : {}
Virt Auto Boot                 : 1
Virt Bridge                    : xenbr0
Virt CPUs                      : 1
Virt Disk Driver Type          : raw
Virt File Size(GB)             : 5
Virt Path                      : 
Virt RAM (MB)                  : 512
Virt Type                      : xenpv