Repository: cobbler/cobbler

Issue:
grub.cfg cannot load menu_items.cfg properly
### Describe the bug

<!--- A clear and concise description of what the bug is. -->

<!--- HINT: You can paste gist.github.com links for long logs or larger files -->

### Steps to reproduce

1. Run cobbler mkloaders; cobbler sync
2. PXE boot an EFI system
3. Look at grub menu

### Expected behavior

<!--- A clear and concise description of what you expected to happen. -->
Get a list of OS profiles to install.

### Cobbler version

<!--- Paste output from `cobbler version` -->
````
Cobbler 3.4.0
  source: ?, ?
  build time: Mon Feb 20 01:05:01 2023
````

### Operating system

<!--- On which operating system do you use Cobbler? -->
Rocky Linux release 8.7 (Green Obsidian)

### Cobbler log

<!--- Paste (partial) output from `/var/log/cobbler/cobbler.log` -->
````paste below
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | removing: /var/lib/tftpboot/grub
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | removing: /var/lib/tftpboot/images
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | removing: /var/lib/tftpboot/ipxe
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | removing: /var/lib/tftpboot/esxi
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | removing: /var/www/cobbler/rendered
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying bootloaders
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | running: ['rsync', '-rpt', '--copy-links', '--exclude=.cobbler_postun_cleanup', '/var/lib/cobbler/loaders/', '/var/lib/tftpboot']
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | received on stdout: 
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | running: ['rsync', '-rpt', '--copy-links', '--exclude=README.grubconfig', '/var/lib/cobbler/grub_config/', '/var/lib/tftpboot']
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | received on stdout: 
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying distros to tftpboot
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying files for distro: centos7.4-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/39aadae34c12c7f0485b3efe74af5eefdb1e760b
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying: /var/www/cobbler/distro_mirror/centos7.4-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/39aadae34c12c7f0485b3efe74af5eefdb1e760b
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/a24ee1955204e30ed1126a7c5325406da641b34c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying: /var/www/cobbler/distro_mirror/centos7.4-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/a24ee1955204e30ed1126a7c5325406da641b34c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying files for distro: centos9.1-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/abbb134f473f5378e2a7d0a29c87b64d478f1f73
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:20 - INFO | copying: /var/www/cobbler/distro_mirror/centos9.1-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/abbb134f473f5378e2a7d0a29c87b64d478f1f73
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/20ed3bb4ce9f36cb94cee990d8ebc9a617e29302
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos9.1-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/20ed3bb4ce9f36cb94cee990d8ebc9a617e29302
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying files for distro: centos5.10-i386
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/dc1d9bb4986926d10ad2a9055be97bdf244cd02b
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos5.10-i386/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/dc1d9bb4986926d10ad2a9055be97bdf244cd02b
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/8dec6d147154550b089fbcb4211fd75638b4982b
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos5.10-i386/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/8dec6d147154550b089fbcb4211fd75638b4982b
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying files for distro: centos5.5-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/8d3a26bdbde3c6c659d4ebb51ff786cbe01aaf6c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos5.5-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/8d3a26bdbde3c6c659d4ebb51ff786cbe01aaf6c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/b45c0ebd64e94bfffa62a19cd2d8fa08d539cc2c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos5.5-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/b45c0ebd64e94bfffa62a19cd2d8fa08d539cc2c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying files for distro: centos6.8-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/13e159e407610411851f32e040e800e6e2918162
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos6.8-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/13e159e407610411851f32e040e800e6e2918162
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/c5bb7f3d00652ccd47cd35e13715c67fc12874b7
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos6.8-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/c5bb7f3d00652ccd47cd35e13715c67fc12874b7
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying files for distro: centos7.7-1908-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/73872862a49ee024bf44c4d796c96bed4d52ee43
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos7.7-1908-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/73872862a49ee024bf44c4d796c96bed4d52ee43
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/41c86efa4e683aa66c665c8cfc1914f93270c768
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos7.7-1908-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/41c86efa4e683aa66c665c8cfc1914f93270c768
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying files for distro: centos8.0-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/9680d1d16d263fec2f61a69aa90c4eac42d7c45c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos8.0-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/9680d1d16d263fec2f61a69aa90c4eac42d7c45c
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/fba0efedbae2e1b734d8ea82d72505963f342b07
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos8.0-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/fba0efedbae2e1b734d8ea82d72505963f342b07
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying files for distro: centos7.9-2207-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/d63ca12d1b479b0e9fc91cfb11907d4403ac434f
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:21 - INFO | copying: /var/www/cobbler/distro_mirror/centos7.9-2207-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/.link_cache/d63ca12d1b479b0e9fc91cfb11907d4403ac434f
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying to create cache file /var/lib/tftpboot/images/.link_cache/f3c2423690b535fcf695c52619dec0ac8d37a1d6
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying: /var/www/cobbler/distro_mirror/centos7.9-2207-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/.link_cache/f3c2423690b535fcf695c52619dec0ac8d37a1d6
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying images
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | generating PXE configuration files
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | generating PXE menu structure
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos7.4-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos7.4-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos7.4-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos7.4-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos7.4-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos7.4-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos9.1-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos9.1-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos9.1-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos9.1-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos9.1-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos9.1-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos5.10-i386
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos5.10-i386/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos5.10-i386/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos5.10-i386/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos5.10-i386/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos5.10-i386
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos5.5-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos5.5-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos5.5-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos5.5-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos5.5-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos5.5-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos6.8-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos6.8-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos6.8-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos6.8-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos6.8-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos6.8-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos7.7-1908-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos7.7-1908-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos7.7-1908-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos7.7-1908-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos7.7-1908-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos7.7-1908-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos8.0-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos8.0-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos8.0-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos8.0-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos8.0-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos8.0-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | copying files for distro: centos7.9-2207-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos7.9-2207-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos7.9-2207-x86_64/vmlinuz
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | trying hardlink /var/www/cobbler/distro_mirror/centos7.9-2207-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos7.9-2207-x86_64/initrd.img
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | Writing template files for centos7.9-2207-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos7.4-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos9.1-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos5.10-i386
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos5.5-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos6.8-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos7.7-1908-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos8.0-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | processing boot_files for distro: centos7.9-2207-x86_64
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | cleaning link caches
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | running: ['find', '/var/lib/tftpboot/images/.link_cache', '-maxdepth', '1', '-type', 'f', '-links', '1', '-exec', 'rm', '-f', '{}', ';']
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | received on stdout: 
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | running post-sync triggers
[2023-02-20_143920_Sync_505c4d082ff64bfcabf49052701d5983] 2023-02-20T14:39:22 - INFO | ### TASK COMPLETE ###
````

### Screenshots

<!--- If applicable, add screenshots to help explain your problem. -->

### Additional information

<!--- Add any other context about the problem here. -->
cobbler does generate menu_items.cfg based on OS, such as Archs.X86_64_menu_items.cfg  for x86_64:
```
# ls /var/lib/tftpboot/grub/
Archs.AARCH64_menu_items.cfg  Archs.S390X_menu_items.cfg   i386-pc
Archs.ARM_menu_items.cfg      Archs.X86_64_menu_items.cfg  images
Archs.I386_menu_items.cfg     arm64-efi                    local_efi.cfg
Archs.IA64_menu_items.cfg     bootia32.efi                 local_legacy.cfg
Archs.PPC64EL_menu_items.cfg  grub.0                       local_powerpc-ieee1275.cfg
Archs.PPC64LE_menu_items.cfg  grubaa64.efi                 system
Archs.PPC64_menu_items.cfg    grub.cfg                     system_link
Archs.PPC_menu_items.cfg      grubx64.efi                  x86_64-efi
Archs.S390_menu_items.cfg     i386-efi                     
```
However, only local is showing on the screen when boot. After some troubleshooting, the menu can be loaded successfully if we copy the Archs.X86_64_menu_items.cfg to x86_64_menu_items.cfg. 
First, the "Archs." should not appear in the file name, also the "x86_64" should be small case.


Discussion:

Resolving patch:
diff --git a/cobbler/tftpgen.py b/cobbler/tftpgen.py
--- a/cobbler/tftpgen.py
+++ b/cobbler/tftpgen.py
@@ -479,7 +479,7 @@ def _make_pxe_menu_grub(self, boot_menu) -> None:
             arch_menu_items = arch_metadata["menu_items"]
 
             boot_menu["grub"] = arch_menu_items
-            outfile = os.path.join(self.bootloc, "grub", f"{arch}_menu_items.cfg")
+            outfile = os.path.join(self.bootloc, "grub", f"{arch.value}_menu_items.cfg")
             with open(outfile, "w+") as fd:
                 fd.write(arch_menu_items.get("grub", ""))
 


Test patch: