Setting Up Cobbler on Rocky9

This guide was made using latest RockyLinux9.5 and latest Cobbler-3.3.7. Also, please note I use Windows DHCP and DNS, cobbler does not run DHCP or DNS, but PXE and TFTP services run on cobbler server.

1. Disable SELinux

2. Install EPEL Repository and Update System

3. Configure Firewall

Allow HTTP/HTTPS and samba.

PXE and TFTP Ports

Cobbler XML-RPC Ports

4. Reboot System – optional

5. Install Necessary Package

6. Add Cobbler Repository & Install cobbler

7. Configure Cobbler Settings

Edit cobbler settings

Update the following:

  • next_server_v4: 192.168.1.111 (Windows-AD/DHCP/DNS)
  • server: 192.168.1.20 (Cobbler Server IP)
  • enable_ipxe: true (Enable for iPXE)

Windows Settings

Update:

  • windows_enabled: true

8. Enable and Start Services

9. Validate Cobbler Setup

10. Configure debmirror

11. Mount Windows 11 ISO and Import

Mount network storage and DVD:

Import Windows image into Cobbler:

12. Download Rocky Linux ISO and Import

Import the ISO into Cobbler

13. List Cobbler Profiles

14. Setting Up Samba Share

Samba Share is needed for the Windows Setup files to be copied during windows deployments.

Edit the Samba configuration file to add the following lines at the end:

Add:

15. Enable and Start Samba Services

16. iPXE Setup

We are going to use iPXE. If you have a windows Domain Controller also running DHCP like in my environment, then DHCP option 66 & 67 will need to point to cobbler server and shimx64.efi

copy the following code to myscript.ipxe, change cobbler server IP as needed.

#!ipxe
echo Configure dhcp …
dhcp
chain tftp://192.168.1.20/ipxe/default.ipxe

Start tftp service

Cobbler is now installed and setup for Windows and Linux OS Deployments.

17. Windows Answer File Tricks

If you are using VMs for testing and Windows11 fails because you don’t have TPM on the VM, the add the following to your answerfile:

vi /etc/cobbler/windows/answerfile.template

I also added some more commands to the final phase (in answerfile) as explained below:

Command-1 or Order-1: Sets password expiry to false for user “localUser”.

Command-2 or Order-2: This will disable ipv6 as it gives me some issues in my environment.

Command-3 or Order-3: This is getting the output of Win.ks (autoinstall template) and saving the output to install.cmd

Command-4 or Order-4: This will run the above saved install.cmd.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *