Helpful tips and tricks for cobbler.
- Update signature:
cobbler signature update - Signature file:
/var/lib/cobbler/distro_signatures.json - Update the Cobbler password:
htdigest /etc/cobbler/users.digest "Cobbler" cobbler
- All templates including kickstarts go in
/var/lib/cobbler/templates. - The
kickstartcommand line option is nowautoinstall. - Install
/usr/lib/python3.9/site-packages/koan/app.py:
def net_install(self, after_download):
...
if profile_data.get("autoinst", "") == "":
# Fall back to kickstart from cobbler < 3.X
if profile_data.get("kickstart", "") != "":
profile_data["autoinst"] = profile_data["kickstart"]
# ------
# sfloess
if not self.system:
profile_data["autoinst"] = "http://%s/cblr/svc/op/ks/profile/%s" % (
profile_data['http_server'], profile_data['name'])
else:
profile_data["autoinst"] = "http://%s/cblr/svc/op/ks/system/%s" % (
profile_data['http_server'], profile_data['name'])
# sfloess
# ------
... def calc_kernel_args(self, pd, replace_self=0):
# -----
# SFLOESS
#autoinst = self.safe_load(pd, 'autoinst')
autoinst = self.safe_load(pd, 'autoinstall')
# SFLOESS
# -----
...
...
def net_install(self, after_download):
...
if profile_data.get("autoinst", "") == "":
# Fall back to kickstart from cobbler < 3.X
if profile_data.get("kickstart", "") != "":
profile_data["autoinst"] = profile_data["kickstart"]
# ------
# SFLOESS
rawTree = profile_data["autoinstall_meta"].replace("tree=", "").replace(" ", "")
profile_data["tree"] = rawTree.replace("@@http_server@@", profile_data['http_server'])
# SFLOESS
# ------
.../usr/local/lib/python2.7/dist-packages/koan/app.pyks=->inst.ks=lang=->ks.lang=
Need to modify /var/lib/cobbler/distro_signatures.json for rhel8: "version_file": "(redhat|sl|slf|centos-linux|oraclelinux|vzlinux)-release-(?!notes)([\\w]*-)*8[\\.-]+(.*)\\.rpm",
/usr/local/share/cobbler/web/settings.py
SECRET_KEY='cobblerisawesome'TIME_ZONE = 'US/Eastern'
Please note: setting up on a vanilla chroot'd Debian system (DNS-320), required setting the TIME_ZONE variable. Refer to this link for more information.
This section defines Cobbler instructions specific to Debian.
Run the following script to install all necessary dependencies (doc is here):
#!/bin/bash
apt-get install -y python-yaml python-cheeta python-setuptools python-netaddr python-simplejson python-urlgrabber python-ipaddress python-django python-netaddr apache2 make git libapache2-mod-wsgi lsb-release tftpd-hpa pxelinux
# Also not included in instructions
ln -s /usr/lib/PXELINUX/pxelinux.0 /usr/lib/syslinux/pxelinux.0
ln -s /usr/lib/syslinux/modules/bios/menu.c32 /usr/lib/syslinux/menu.c32
a2enmod proxy
a2enmod proxy_http
a2enmod rewrite
a2ensite cobbler.conf
ln -s /usr/local/lib/python2.7/dist-packages/cobbler /usr/lib/python2.7/dist-packages/
ln -s /srv/tftp /var/lib/tftpboot
chown www-data /var/lib/cobbler/webui_sessionsWhen importing x86_64 Debian distros, the vmlinuz and initrd.gz files do not have the necessary HTTP functionality for net installs (PXE or otherwise). Therefore, one needs to download the appropriate versions of those files and copy them to the /srv/www/cobbler/ks_mirror/[distro name]/install.amd directory.
Assume the following:
- Debian 10.2.0 imported as
Debian-10-x86_64. - The aformentioned files are located here.
- Pull
initrd.gzandvmlinuz(actuallylinuxbut will be renamed):
cd /srv/www/cobbler/ks_mirror/Debian-10-x86_64/install.amd/
wget http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
wget http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
mv linux vmlinuz
cobbler sync- Using
koan --replace-selfresults inkernel not founderror. Add the following to/etc/apache2/conf-enabled/cobbler.conf:
<IfVersion >= 2.4>
<Location /cobbler>
Require all granted
</Location>
</IfVersion>apt install -y python-urlgrabber python-simplejson libosinfo-bin
cd /www/cobbler/distro_mirror/Debian-10-x86_64/install.amd/
wget http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
wget http://ftp.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
mv linux vmlinuz
cobbler syncYou may want to do likewise for the gtk and xen sub-directories.