Cobbler (v3.3.7) OpenSUSE Deployment Guide
This guide assumes that you have a Fedora 34 server or workstation system configured to run Cobbler v3.3.7 similarly to the Cobbler v3.3.7 Beginner’s guide.
Table of Contents
Objective
Starting where the Beginner’s guide left off, further configure the Cobbler v3.3.7 server to deploy OpenSUSE Leap 15.4 via PXE network boot, using the same system and network environment. This guide assumes that you still have selinux
and firewalld
configured and enabled as described in the Beginner’s guide.
OpenSUSE Leap 15.4 PXE Deployment
Download the installation media for OpenSUSE Leap 15.4:
cd ~/Downloads
wget https://provo-mirror.opensuse.org/distribution/leap/15.4/iso/openSUSE-Leap-15.4-DVD-x86_64-Media.iso
Mount the OpenSUSE Leap 15.4 installation media and run the cobbler import
:
[ -d /mnt/SUSE ] || mkdir /mnt/SUSE
mount -t iso9660 -o loop,ro /home/fedora/Downloads/openSUSE-Leap-15.4-DVD-x86_64-Media.iso /mnt/SUSE
cobbler import --name=SUSE-15.4 --arch=x86_64 --path=/mnt/SUSE
Update the kernel-options
for the newly imported Cobbler Distro:
cobbler distro edit --name SUSE-15.4-x86_64 --kernel-options 'install=$tree'
Modify the sample “autoyast.xml” template file included with Cobbler in order to properly install Leap 15.4:
cat /var/lib/cobbler/templates/sample_autoyast.xml | \
grep -v runlevel | \
grep -v "<default>3</default>" | \
sed 's,networking.xml,suse-15.4-networking.xml,' | \
sed 's,suse_scriptwrapper.xml,suse-15.4_scriptwrapper.xml,' > /var/lib/cobbler/templates/suse-15.4-autoyast.xml
Edit the networking.xml
Snippet included with Cobbler in order to accomodate Leap 15.4 (copy/paste the following block in-full to the Cobbler server’s CLI)
cat /var/lib/cobbler/snippets/networking.xml | \
grep -v dhcp_resolv | \
grep -v keep_install_network | \
sed 's,<nameservers config:type="list">,#if $name_servers and $name_servers[0] != "":\n <nameservers config:type="list">,' | \
sed 's,</nameservers>,</nameservers>\n #end if,' | \
sed '/ <net-udev config:type="list">/,/ #if $getVar("system_name","") != ""/c\ \ \ \ #if $getVar("system_name","") != ""\n\ \ \ \ <net-udev config:type="list">' | \
sed 's,<networking>,<networking>\n## Figure out if we'"'"'re automating OS installation for a system or a profile\n#if $getVar('"'"'system_name'"'"'\,'"'""'"') != '\'\''\n <keep_install_network config:type="boolean">false</keep_install_network>\n#else\n <keep_install_network config:type="boolean">true</keep_install_network>\n#end if,' > /tmp/networking.xml
LINE=$(cat -n /tmp/networking.xml | grep '</net-udev>' | awk {' print $1 '})
TOP=$(echo $(($LINE-2)))
head -n $TOP /tmp/networking.xml > /var/lib/cobbler/snippets/suse-15.4-networking.xml
echo ' </net-udev>' >> /var/lib/cobbler/snippets/suse-15.4-networking.xml
echo ' #end if' >> /var/lib/cobbler/snippets/suse-15.4-networking.xml
tail -n+$(echo $(($LINE+1))) /tmp/networking.xml >> /var/lib/cobbler/snippets/suse-15.4-networking.xml
TOP="" && LINE="" && rm -f /tmp/networking.xml
Edit the script_wrapper.xml
snippet included with Cobbler in order to complete the OpenSUSE Leap 15.4 installation:
cat /var/lib/cobbler/snippets/suse_scriptwrapper.xml | \
grep -v network_needed | \
grep -v interpreter > suse-15.4_scriptwrapper.xml
Configure the Cobbler Profile to use the new autoinstall (autoyast.xml
) template:
sudo cobbler profile edit --name SUSE-15.4-x86_64 --autoinstall suse-15.4-autoyast.xml
Create a new Cobbler System to automatically boot and install OpenSUSE Leap 15.4, replacing the “aa:bb:cc:dd:ee:ff” with the MAC address of your PXE client, being sure not to use a duplicate MAC or IP addresse of any other Cobbler System, and then sync up Cobbler:
cobbler system add --name SUSE-15.4 --profile SUSE-15.4-x86_64 --netboot-enabled true --hostname SUSE-15-4 --interface eth0 --management true --static true --mac-address "aa:bb:cc:dd:ee:ff" --ip-address 10.0.0.15 --gateway 10.0.0.1 --netmask 255.255.255.0 --name-servers "10.0.0.1 1.1.1.1 10.0.0.10"
Finally, sync up Cobbler:
cobbler sync
Tips & Troubleshooting
-
The Cobbler 3.3.7 Beginner’s Guide Tips & Troubleshooting section contains some basic recommendations and limitations of Cobbler which will not be repeated here.
-
References
-
https://cobbler.readthedocs.io/en/v3.3.6/cobblerd.html#autoinstallation-autoyast-kickstart
-
https://punkt.de/de/blog/2017/automatisierte-installation-von-servern-mit-freebsd-und-zfs.html
-https://www.truenas.com/community/threads/install-freenas-over-pxe-network-boot-install.82203/
-
https://forums.freebsd.org/threads/how-is-bsdinstall-started.80352/page-3
-
https://man.freebsd.org/cgi/man.cgi?query=bsdinstall&sektion=&manpath=freebsd-release-ports
-
https://forums.freebsd.org/threads/bsdinstall-unattended-scripted-install.28862/
-
https://forums.freebsd.org/threads/howto-modern-freebsd-install-reloaded-vermaden-way.12082/
-
Enjoy Reading This Article?
Here are some more articles you might like to read next: