From c7dee612f7ca4b44cf7903016c782e416c61336b Mon Sep 17 00:00:00 2001 From: Enno Gotthold Date: Thu, 20 Jan 2022 09:04:55 +0100 Subject: [PATCH 1/5] Docs: Move repository management into own file Co-authored-by: Tom Schraitle --- docs/cobbler.rst | 2 + docs/user-guide.rst | 140 +-------------------- docs/user-guide/repository-management.rst | 144 ++++++++++++++++++++++ 3 files changed, 147 insertions(+), 139 deletions(-) create mode 100644 docs/user-guide/repository-management.rst diff --git a/docs/cobbler.rst b/docs/cobbler.rst index 62f97531d9..61844ff65c 100644 --- a/docs/cobbler.rst +++ b/docs/cobbler.rst @@ -1035,6 +1035,8 @@ most of the other Cobbler commands (currently: distro, profile, system, repo, im Optional parameter which filters for object with the given name. +.. _cobbler-cli-reposync: + Cobbler reposync ================ diff --git a/docs/user-guide.rst b/docs/user-guide.rst index 1eb6bd48ce..dc64429e67 100644 --- a/docs/user-guide.rst +++ b/docs/user-guide.rst @@ -11,6 +11,7 @@ User Guide Terraform Provider for Cobbler Building ISOs GRUB and everything related + Repository Management API @@ -64,145 +65,6 @@ Then, a machine is assigned to each profile. cobbler system add --name=AA:BB:CC:DD:EE:FE --profile=rhel4u3-dbservers cobbler report -Repository Management -##################### - -REPO MANAGEMENT -=============== - -This has already been covered a good bit in the command reference section. - -Yum repository management is an optional feature, and is not required to provision through Cobbler. However, if Cobbler -is configured to mirror certain repositories, it can then be used to associate profiles with those repositories. Systems -installed under those profiles will then be autoconfigured to use these repository mirrors in ``/etc/yum.repos.d``, and -if supported (Fedora Core 6 and later) these repositories can be leveraged even within Anaconda. This can be useful if -(A) you have a large install base, (B) you want fast installation and upgrades for your systems, or (C) have some extra -software not in a standard repository but want provisioned systems to know about that repository. - -Make sure there is plenty of space in Cobbler's webdir, which defaults to ``/var/www/cobbler``. - -.. code-block:: shell - - cobbler reposync [--only=ONLY] [--tries=N] [--no-fail] - -Cobbler reposync is the command to use to update repos as configured with "cobbler repo add". Mirroring -can take a long time, and usage of Cobbler reposync prior to usage is needed to ensure provisioned systems have the -files they need to actually use the mirrored repositories. If you just add repos and never run "cobbler reposync", the -repos will never be mirrored. This is probably a command you would want to put on a crontab, though the frequency of -that crontab and where the output goes is left up to the systems administrator. - -For those familiar with dnf's reposync, Cobbler's reposync is (in most uses) a wrapper around the dnf reposync command. Please -use "cobbler reposync" to update Cobbler mirrors, as dnf's reposync does not perform all required steps. Also Cobbler -adds support for rsync and SSH locations, where as dnf's reposync only supports what yum supports (http/ftp). - -If you ever want to update a certain repository you can run: - -.. code-block:: shell - - cobbler reposync --only="reponame1" ... - -When updating repos by name, a repo will be updated even if it is set to be not updated during a regular reposync -operation (ex: ``cobbler repo edit --name=reponame1 --keep-updated=False``). - -Note that if a Cobbler import provides enough information to use the boot server as a yum mirror for core packages, -Cobbler can set up automatic installation files to use the Cobbler server as a mirror instead of the outside world. If -this feature is desirable, it can be turned on by setting ``yum_post_install_mirror`` to ``True`` in -``/etc/cobbler/settings.yaml`` (and running ``cobbler sync``). You should not use this feature if machines are -provisioned on a different VLAN/network than production, or if you are provisioning laptops that will want to acquire -updates on multiple networks. - -The flags ``--tries=N`` (for example, ``--tries=3``) and ``--no-fail`` should likely be used when putting reposync on a -crontab. They ensure network glitches in one repo can be retried and also that a failure to synchronize one repo does -not stop other repositories from being synchronized. - -Importing trees -=============== - -Cobbler can auto-add distributions and profiles from remote sources, whether this is a filesystem path or an rsync -mirror. This can save a lot of time when setting up a new provisioning environment. Import is a feature that many users -will want to take advantage of, and is very simple to use. - -After an import is run, Cobbler will try to detect the distribution type and automatically assign automatic installation -files. By default, it will provision the system by erasing the hard drive, setting up eth0 for DHCP, and using a default -password of "cobbler". If this is undesirable, edit the automatic installation files in ``/etc/cobbler`` to do -something else or change the automatic installation setting after Cobbler creates the profile. - -Mirrored content is saved automatically in ``/var/www/cobbler/distro_mirror``. - -Example 1: ``cobbler import --path=rsync://mirrorserver.example.com/path/ --name=fedora --arch=x86`` - -Example 2: ``cobbler import --path=root@192.168.1.10:/stuff --name=bar`` - -Example 3: ``cobbler import --path=/mnt/dvd --name=baz --arch=x86_64`` - -Example 4: ``cobbler import --path=/path/to/stuff --name=glorp`` - -Example 5: ``cobbler import --path=/path/where/filer/is/mounted --name=anyname --available-as=nfs://nfs.example.org:/where/mounted/`` - -Once imported, run a ``cobbler list`` or ``cobbler report`` to see what you've added. - -By default, the rsync operations will exclude content of certain architectures, debug RPMs, and ISO images -- to change -what is excluded during an import, see ``/etc/cobbler/rsync.exclude``. - -Note that all of the import commands will mirror install tree content into ``/var/www/cobbler`` unless a network -accessible location is given with ``--available-as``. --available-as will be primarily used when importing distros -stored on an external NAS box, or potentially on another partition on the same machine that is already accessible via -``http://`` or ``ftp://``. - -For import methods using rsync, additional flags can be passed to rsync with the option ``--rsync-flags``. - -Should you want to force the usage of a specific Cobbler automatic installation template for all profiles created by an -import, you can feed the option ``--autoinstall`` to import, to bypass the built-in automatic installation file -auto-detection. - -Repository mirroring workflow -============================= - -The following example shows how to set up a repo mirror for all enabled Cobbler host repositories and two additional repositories, -and create a profile that will auto install those repository configurations on provisioned systems using that profile. - -.. code-block:: shell - - cobbler check - # set up your cobbler distros here. - cobbler autoadd - cobbler repo add --mirror=http://mirrors.kernel.org/fedora/core/updates/6/i386/ --name=fc6i386updates - cobbler repo add --mirror=http://mirrors.kernel.org/fedora/extras/6/i386/ --name=fc6i386extras - cobbler reposync - cobbler profile add --name=p1 --distro=existing_distro_name --autoinstall=/etc/cobbler/kickstart_fc6.ks --repos="fc6i386updates fc6i386extras" - -Import Workflow -=============== - -Import is a very useful command that makes starting out with Cobbler very quick and easy. - -This example shows how to create a provisioning infrastructure from a distribution mirror or DVD ISO. Then a default PXE -configuration is created, so that by default systems will PXE boot into a fully automated install process for that -distribution. - -You can use a network rsync mirror, a mounted DVD location, or a tree you have available via a network filesystem. - -Import knows how to autodetect the architecture of what is being imported, though to make sure things are named -correctly, it's always a good idea to specify ``--arch``. For instance, if you import a distribution named "fedora8" -from an ISO, and it's an x86_64 ISO, specify ``--arch=x86_64`` and the distro will be named "fedora8-x86_64" -automatically, and the right architecture field will also be set on the distribution object. If you are batch importing -an entire mirror (containing multiple distributions and arches), you don't have to do this, as Cobbler will set the -names for things based on the paths it finds. - -.. code-block:: shell - - cobbler check - cobbler import --path=rsync://yourfavoritemirror.com/rhel/5/os/x86_64 --name=rhel5 --arch=x86_64 - # OR - cobbler import --path=/mnt/dvd --name=rhel5 --arch=x86_64 - # OR (using an external NAS box without mirroring) - cobbler import --path=/path/where/filer/is/mounted --name=anyname --available-as=nfs://nfs.example.org:/where/mounted/ - # wait for mirror to rsync... - cobbler report - cobbler system add --name=default --profile=name_of_a_profile1 - cobbler system add --name=AA:BB:CC:DD:EE:FF --profile=name_of_a_profile2 - cobbler sync - Virtualization ############## diff --git a/docs/user-guide/repository-management.rst b/docs/user-guide/repository-management.rst new file mode 100644 index 0000000000..49a6efc902 --- /dev/null +++ b/docs/user-guide/repository-management.rst @@ -0,0 +1,144 @@ +********************* +Repository Management +********************* + +General +####### + +This has already been covered a good bit in the command reference section, for details see: :ref:`cobbler-cli-reposync` + +Yum repository management is an optional feature and is not required to provision through Cobbler. However, if Cobbler +is configured to mirror certain repositories, this feature can be used to associate profiles with those repositories. +Systems installed under those profiles will be autoconfigured to use these repository mirrors in ``/etc/yum.repos.d``, +and if supported (Fedora Core 6 and later), these repositories can be leveraged within Anaconda. + +This can be useful if + +#. you have a large install base, or +#. you want fast installation and upgrades for your systems, or +#. have some extra software not in a standard repository but want provisioned systems to know about that repository. + +Make sure there is plenty of space in Cobbler's webdir, which defaults to ``/var/www/cobbler``. + +.. code-block:: shell + + cobbler reposync [--only=ONLY] [--tries=N] [--no-fail] + +``cobbler reposync`` is used to update repos known to Cobbler. The command is required to be executed prior to the first +provisioning of a system if Cobbler is configured as a mirror. If you just add repos and never run ``cobbler reposync``, +the content of the repos will be missing. This is probably a command you should include in a crontab. The configuration +is left up to the systems administrator. + +.. note:: Mirroring can take a long time because of the amount of data being downloaded. + +For those familiar with dnf's reposync, Cobbler's reposync is mostly a wrapper around the ``dnf reposync`` command. +use "cobbler reposync" to update Cobbler mirrors, as dnf's reposync does not perform all required steps. Also Cobbler +adds support for rsync and SSH locations, where as dnf's reposync only supports what yum supports (http/ftp). + +If you want to update a certain repository, run: + +.. code-block:: shell + + cobbler reposync --only="reponame1" ... + +When updating repos by name, a repo will be updated even if it is set to be not updated during a regular reposync +operation (ex: ``cobbler repo edit --name=reponame1 --keep-updated=False``). + +For distributions using dnf/yum Cobbler can act as a mirror and generate the ``.repo`` files for the core system +packages. This is only possible if the ``cobbler import`` command provided enough information. If this feature is +desirable, it can be turned on by setting ``yum_post_install_mirror`` to ``True`` in ``/etc/cobbler/settings.yaml`` (and +running ``cobbler sync``). You should not use this feature if machines are provisioned on a different VLAN/network than +production, or if you are provisioning laptops that will want to acquire updates on multiple networks. + +The flags ``--tries=N`` (for example, ``--tries=3``) and ``--no-fail`` should likely be used when putting reposync on a +crontab. They ensure network glitches in one repo can be retried and also that a failure to synchronize one repo does +not stop other repositories from being synchronized. + +Importing trees workflow +######################## + +Cobbler can auto-add distributions and profiles from remote sources, whether this is a filesystem path or an rsync +mirror. This can save a lot of time when setting up a new provisioning environment. Import is a feature that many users +will want to take advantage of, and is very simple to use. + +After an import is run, Cobbler will try to detect the distribution type and automatically assign automatic installation +files. By default, it will provision the system by erasing the hard drive, setting up eth0 for DHCP, and using a default +password of "cobbler". If this is undesirable, edit the automatic installation files in ``/etc/cobbler`` to do +something else or change the automatic installation setting after Cobbler creates the profile. + +Mirrored content is saved automatically in ``/var/www/cobbler/distro_mirror``. + +Examples: + +* ``cobbler import --path=rsync://mirrorserver.example.com/path/ --name=fedora --arch=x86`` +* ``cobbler import --path=root@192.168.1.10:/stuff --name=bar`` +* ``cobbler import --path=/mnt/dvd --name=baz --arch=x86_64`` +* ``cobbler import --path=/path/to/stuff --name=glorp`` +* ``cobbler import --path=/path/where/filer/is/mounted --name=anyname --available-as=nfs://nfs.example.org:/where/mounted/`` + +Once imported, run a ``cobbler list`` or ``cobbler report`` to see what you've added. + +By default, the rsync operations will exclude content of certain architectures, debug RPMs, and ISO images -- to change +what is excluded during an import, see ``/etc/cobbler/rsync.exclude``. + +Note that all of the import commands will mirror install tree content into ``/var/www/cobbler`` unless a network +accessible location is given with ``--available-as``. The option ``--available-as`` will be primarily used when +importing distros stored on an external NAS box, or potentially on another partition on the same machine that is already +accessible via HTTP or FTP. + +For import methods using rsync, additional flags can be passed to rsync with the option ``--rsync-flags``. + +Should you want to force the usage of a specific Cobbler automatic installation template for all profiles created by an +import, feed the option ``--autoinstall`` to import, to bypass the built-in automatic installation file +auto-detection. + +Repository mirroring workflow +############################# + +The following example shows: + + * How to set up a repo mirror for all enabled Cobbler host repositories and two additional repositories. + * Create a profile that will auto install those repository configurations on provisioned systems using that profile. + +.. code-block:: shell + + cobbler check + # set up your cobbler distros here. + cobbler autoadd + cobbler repo add --mirror=http://mirrors.kernel.org/fedora/core/updates/6/i386/ --name=fc6i386updates + cobbler repo add --mirror=http://mirrors.kernel.org/fedora/extras/6/i386/ --name=fc6i386extras + cobbler reposync + cobbler profile add --name=p1 --distro=existing_distro_name --autoinstall=/etc/cobbler/kickstart_fc6.ks --repos="fc6i386updates fc6i386extras" + +Import Workflow +############### + + +This example shows: + +* How to create a provisioning infrastructure from a distribution mirror or from ISO media. +* Create a default PXE configuration, so that by default systems will PXE boot into a fully automated install process + for that distribution. + +You can use a network rsync mirror, a mounted DVD location, or a tree you have available via a network filesystem. + +Import knows how to autodetect the architecture of what is being imported. To make sure things are named +correctly, it's a good idea to specify ``--arch``. For instance, if you import a distribution named "fedora8" +from an x86_64 ISO, specify ``--arch=x86_64`` and the distro will be named "fedora8-x86_64" +automatically, and the right architecture field will also be set on the distribution object. If you are batch importing +an entire mirror (containing multiple distributions and arches), you don't have to do this. Cobbler will set the +names for things based on the paths it finds for you. + +.. code-block:: shell + + cobbler check + cobbler import --path=rsync://yourfavoritemirror.com/rhel/5/os/x86_64 --name=rhel5 --arch=x86_64 + # OR + cobbler import --path=/mnt/dvd --name=rhel5 --arch=x86_64 + # OR (using an external NAS box without mirroring) + cobbler import --path=/path/where/filer/is/mounted --name=anyname --available-as=nfs://nfs.example.org:/where/mounted/ + # wait for mirror to rsync... + cobbler report + cobbler system add --name=default --profile=name_of_a_profile1 + cobbler system add --name=AA:BB:CC:DD:EE:FF --profile=name_of_a_profile2 + cobbler sync From dda85544a82bc32f630e0b1e0a6bb443972fcaf6 Mon Sep 17 00:00:00 2001 From: Enno Gotthold Date: Thu, 20 Jan 2022 09:09:45 +0100 Subject: [PATCH 2/5] Docs: Add note about the new CLI Co-authored-by: Tom Schraitle --- docs/cobbler.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/cobbler.rst b/docs/cobbler.rst index 61844ff65c..35b832a244 100644 --- a/docs/cobbler.rst +++ b/docs/cobbler.rst @@ -4,7 +4,8 @@ Cobbler CLI This page contains a description for commands which can be used from the CLI. -.. Go Client: https://github.com/jtopjian/cobblerclient +.. note:: We are currently developing a new CLI which is independent from the server. + This document redirects you to the new documentation once the new CLI is ready. General Principles ################## From f1bd7094bc11233d6b9bfb903436c8f8f260a737 Mon Sep 17 00:00:00 2001 From: Enno Gotthold Date: Thu, 20 Jan 2022 09:11:21 +0100 Subject: [PATCH 3/5] Docs: Remove mkgrub.sh mention --- docs/scripts.rst | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/docs/scripts.rst b/docs/scripts.rst index 6d0c81303a..fe6f00f467 100644 --- a/docs/scripts.rst +++ b/docs/scripts.rst @@ -26,30 +26,6 @@ Author `Orion Poplawski `_ -mkgrub.sh -######### - -Description -=========== - -This script will try to generate UEFI bootable bootloaders for your Cobbler installation. The script was written for Bash -but should be POSIX compliant. Be advised that only executing this script won't make your Cobbler installation UEFI -ready. - -Execution examples -================== - -.. code-block:: shell - - export SYSLINUX_DIR=/usr/share/...;./mkgrub.sh - export $GRUB2_MOD_DIR=/usr/share/...;./mkgrub.sh - ./mkgrub.sh - -Author -====== - -`Thomas Renninger `_ - settings-migration-v1-to-v2.sh ############################## From 9d44748463624492725965a061c7d4868420c5fb Mon Sep 17 00:00:00 2001 From: Enno Gotthold Date: Thu, 20 Jan 2022 11:53:55 +0100 Subject: [PATCH 4/5] Docs: Add limitation inside Uyuni Co-authored-by: Tom Schraitle --- docs/limitations.rst | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/limitations.rst b/docs/limitations.rst index faaccd15b0..278c6c47a9 100644 --- a/docs/limitations.rst +++ b/docs/limitations.rst @@ -3,21 +3,21 @@ Limitations and Surprises ************************* Templating -========== +########## Before templates are passed to Jinja or Cheetah there is a pre-processing of templates happening. During pre-processing Cobbler replaces variables like ``@@my_key@@`` in the template. Those keys are currently limited by the regex of ``\S``, which translates to ``[^ \t\n\r\f\v]``. Restarting the daemon -===================== +##################### Once you have a Cobbler distro imported or manually added you have to make sure the source for the Kernel & initrd is available all the time. Thus I highly recommend you to add the ISOs to your ``/etc/fstab`` to make them persistent across reboots. If you forget to remount them the Cobbler daemon won't start! Kernel options -============== +############## The user (so you) is responsible for generating the correct quoting of the Kernel Command Line. We manipulate the arguments you give us in a way that we add wrapping double quotes around them when the value contains a space. @@ -25,4 +25,17 @@ arguments you give us in a way that we add wrapping double quotes around them wh The Linux Kernel describes its quoting at: `The kernel’s command-line parameters `_ -Please consult the documentation of your operating system for how it deals with this if it is not Linux. +Consult the documentation of your operating system for how it deals with this if it is not Linux. + +Special Case: Uyuni/SUSE Manager +################################ + +.. note:: SUSE Manager is a flavor of Uyuni. The term Uyuni refers to both pieces of software in this context. + +Uyuni uses Cobbler for driving auto-installations. When using Cobbler in the context of Uyuni, you need to know that +Cobbler is not seen as the source of truth by Uyuni. This means, in case you don't have any auto-installation +configured in Uyuni, the content visible in Cobbler is deleted. + +Because of the same reason, during the runtime of Cobbler you may see systems popping on and off as the content of +Cobbler is managed by Uyuni (in particular, the taskomatic task ``kickstart_cleanup`` executes cleanup on the Cobbler +content) From ef8c54b85719113a8f26790faa4cff8dc5cfe682 Mon Sep 17 00:00:00 2001 From: Enno Gotthold Date: Thu, 20 Jan 2022 13:18:36 +0100 Subject: [PATCH 5/5] Docs: Add explanations for TFTP-Directory & DB Co-authored-by: Tom Schraitle --- docs/cobbler.rst | 2 + docs/user-guide.rst | 2 + docs/user-guide/internal-database.rst | 36 +++++++++++ docs/user-guide/tftp.rst | 90 +++++++++++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 docs/user-guide/internal-database.rst create mode 100644 docs/user-guide/tftp.rst diff --git a/docs/cobbler.rst b/docs/cobbler.rst index 35b832a244..a9c4e62d88 100644 --- a/docs/cobbler.rst +++ b/docs/cobbler.rst @@ -1074,6 +1074,8 @@ The flags ``--tries=N`` (for example, ``--tries=3``) and ``--no-fail`` should li crontab. They ensure network glitches in one repo can be retried and also that a failure to synchronize one repo does not stop other repositories from being synchronized. +.. _cli-cobbler-sync: + Cobbler sync ============ diff --git a/docs/user-guide.rst b/docs/user-guide.rst index dc64429e67..a4ea053f4e 100644 --- a/docs/user-guide.rst +++ b/docs/user-guide.rst @@ -12,6 +12,8 @@ User Guide Building ISOs GRUB and everything related Repository Management + The TFTP Directory + Internal Database API diff --git a/docs/user-guide/internal-database.rst b/docs/user-guide/internal-database.rst new file mode 100644 index 0000000000..3a0f184562 --- /dev/null +++ b/docs/user-guide/internal-database.rst @@ -0,0 +1,36 @@ +***************** +Internal Database +***************** + +.. note:: This document describes advanced topics for system administrators. + +The internal database of Cobbler is held at ``/var/lib/cobbler/collections``. + +Items +##### + +An item in Cobbler is a set of attributes grouped together and given a name. An example for this would be a ``distro``. +On disk those items are represented using JSON. By default, the JSON is minified, however you can make the serializer +produce "pretty" JSON files by changing ``serializer_pretty_json`` to ``true`` in the Cobbler Settings. + +The name of the saved file is the name of the item. + +Collections +########### + +A collection in Cobbler is a number of ``n`` Cobbler items that are living inside the same folder. + +Notes +##### + +If you want to have a backup use the ``scm_track`` module of Cobbler. +It will use Git for version control of the complete ``/var/lib/cobbler/`` folder. + +A rename operation does the following: Delete the item with the old name and create a new item with the new name. This is +reflected on disk and thus if Cobbler is being terminated at the wrong point in time, this specific item +can get lost. It's unlikely, but if you have items dependent onto that item you will receive errors on the +next Cobbler startup. + +If you deem yourself a Cobbler expert you may edit the JSON files directly once Cobbler is not running. If Cobbler is +running you risk a corruption of the complete application. Please take all actions here with huge precautions and +only if you have backups! diff --git a/docs/user-guide/tftp.rst b/docs/user-guide/tftp.rst new file mode 100644 index 0000000000..69572adfa7 --- /dev/null +++ b/docs/user-guide/tftp.rst @@ -0,0 +1,90 @@ +****************** +The TFTP Directory +****************** + +For booting machines in a PXE and/or HTTP-Boot environment the TFTP directory is the most important directory. This +folder contains all static files required for booting a system. + +The folder of this is dependant on your distro and can be changed in the Cobbler settings. The default should be +correctly set during the package build of your Linux distro or during the installation process (if you are use the +source installation). + +Behaviour +######### + +A good explanation of ``cobbler sync`` can be found here: :ref:`cli-cobbler-sync` + +In the following we will examine the behaviour for the TFTP directory more in details. + +#. ``cobbler sync`` is executed (we assume a full one for now). +#. The pre-sync triggers are executed. +#. If the following directories do not exist they are created: + #. ``pxelinux.cfg`` + #. ``grub`` + #. ``images`` + #. ``ipxe`` + #. A symlink from ``grub/images`` to ``images`` +#. The content of in above mentioned directories is being fully deleted. +#. All bootloaders are being copied +#. All kernel and initrds are being copied +#. All images (if created) are being copied +#. The PXE menu is being generated and written to disk +#. The post-sync triggers are being executed + +.. note:: If you only sync DHCP, DNS or specific systems the order and actions might be slightly different. + +.. warning:: A ``cobbler sync`` is not required. Due to the file copying of a lot of small files this is a very + expensive operation. Under normal operation Cobbler should move the files automatically to the right + places. Only use this command when you encounter problems. + +Layout +###### + +This is how an example TFTP-Boot Directory could look like. In the following sections we will cover the details of the +files and folders. + +.. code-block:: + + cobbler:~ # ls -alh /srv/tftpboot/ + total 105M + drwxr-xr-x 17 root root 327 Dez 17 14:29 . + drwxr-xr-x 4 root root 44 Mär 3 2021 .. + drwxr-xr-x 8 root root 4,0K Nov 18 14:30 grub + -rw-r--r-- 1 root root 429 Okt 21 16:13 grub.cfg + drwxr-xr-x 36 root root 4,0K Jan 10 14:20 images + -rw-r--r-- 1 root root 96M Jan 28 2021 initrd + drwxr-xr-x 2 root root 26 Dez 1 15:12 ipxe + -rw-r--r-- 1 root root 8,6M Jan 28 2021 linux + -rw-r--r-- 1 root root 26K Mär 17 2021 memdisk + -rw-r--r-- 1 root root 54K Mär 17 2021 menu.c32 + drwxr-xr-x 2 root root 24 Dez 11 2020 others + -rw-r--r-- 1 root root 26K Mär 17 2021 pxelinux.0 + drwxr-xr-x 2 root root 20K Jan 17 13:02 pxelinux.cfg + + +All files or folders not covered by below explanations are specific to the environment the directory listing was taken +from. Those files should not be touched by Cobbler and should survive even a ``cobbler sync``. + +* ``tftpboot/grub/``: Contains the GRUB bootloaders and additional configuration not covered by ``tftpboot/grub.cfg``. + If available this directory will also contain the ``shim.efi`` file. +* ``tftpboot/grub/system``: Normally contains the GRUB config for the MAC in the filename. + +.. note:: In case Cobbler is not able to find a MAC for the interface it tries to generate an entry for, it applies + a fallback strategy. First it tries the IP address. If that was not successful, it finally uses the name if no + IP address is known to Cobbler. + +* ``tftpboot/grub.cfg``: Rescue config file which serves as a pointer on the client side because the error message shows + that this is the wrong location for the ``grub.cfg`` file. GRUB should always try to load ``tftpboot/grub/grub.cfg``. +* ``tftpboot/images//``: Contains always the kernel and initrd of the distro you add to Cobbler. During a + ``cobbler sync`` all folder with distros will be deleted and the structure will be recreated by the paths saved in the + ``kernel`` and ``initrd`` attributes in a Cobbler distro item. +* ``tftpboot/ipxe/default.ipxe``: Cobbler will generate the iPXE menu for you. This is the file where all menu entries + will be stored. It will be overwritten regularly by either a change in a distro or by the command ``cobbler sync``. +* ``tftpboot/pxelinux.0``: The binary for executing the pxelinux bootloader. This is taken from your system at + ``cobbler sync`` time. +* ``tftpboot/pxelinux.cfg``: Normally this directory contains two types of files + #. The configuration for each system where the file name is the MAC of the system. + #. The file named ``default`` which is used for all PXE Clients not known by MAC address. + +.. note:: In case Cobbler is not able to find a MAC for the interface it tries to generate an entry for, it falls back + first to the IP and finally uses the name if no IP is known to Cobbler.