Skip to main content
Skip table of contents

How to Customize the Unit ID Computation for IGEL OS Creator (OSC)

In Which Cases Should I Change the Computation of the Unit ID?

Every IGEL OS device has a unit ID which must be unique and persistent. This is crucial for the administration and licensing of the device. For devices with a permanently installed IGEL OS (not UD Pocket), the unit ID is derived from the MAC address of a network interface. 

The unit ID is computed on the first boot after IGEL OS has been successfully installed by IGEL OS Creator (OSC). In almost all cases, the default algorithm for computing the unit ID will choose the appropriate MAC address. However, in the rare case that the MAC address chosen by the default algorithm is not the ideal one for your requirements, e.g. if the chosen network device is not used later on, you can define custom rules. To apply your custom rules, you must write them to a file within the IGEL OS Creator (OSC).

Changing the Unit ID of a Registered Device

When the unit ID of a device that is registered with the UMS is changed, the registration is broken. In this case, you must re-register the device, e.g. by scanning.

Requirements

What Is the Default for Computing the Unit ID?

The default algorithm for choosing the MAC address for unit ID computation is as follows:

  1. If a network interface exists that matches a license already installed on the device, discard all other network interfaces.

  2. Discard network interfaces that do not have the highest subsystem priority. The subsystem priorities are (from highest to lowest): PCI, SDIO, USB, others.

  3. Discard wireless network interfaces if a wired interface exists.

  4. From the remaining network interfaces, use the one that is first in lexicographical order.

Which Computation Rules Are Available?

The following list contains all available rules for unit ID computation. Please note that if several network interfaces meet the criteria, the first one in the lexicographic order is selected unless the rule reverse_order is applied.

  • prefer_pci: If a network interface connected via the PCI subsystem exists, discard all interfaces connected via other subsystems.

  • prefer_sdio: If a network interface connected via the SDIO subsystem exists, discard all interfaces connected via other subsystems.

  • prefer_usb: If a network interface connected via USB subsystem exists, discard all interfaces connected via other subsystems.

  • prefer_wired: If a wired network interface exists, discard all wireless interfaces.

  • prefer_wireless: If a wireless network interface exists, discard all wired interfaces.

  • ignore_licensed: Do not take into account whether an interface is licensed or not. (In contrast to the default behavior where network interfaces that match the device's license are given preference.)

  • reverse_order:  If more than one equivalent network interface is found, use the last one in the lexicographical order instead of the first one,

Creating a Custom Set of Rules

To achieve a specific computation of the unit ID, you can combine several rules.  

Example

The set of rules prefer_wireless, ignore_licensed, reverse_order leads to the following behavior:

  1. prefer_wireless: If a wireless network card is connected, all wired network cards are discarded.

  2. ignore_licensed: If there are several wireless network cards and one of them matches the device's license, this does not count as a reason to use it for unit ID computation.

  3. reverse_order: As the licensing criterion does not count, the position of a network device's name in the lexicographic order is the next criterion. By default, the first device in lexicographic order would be selected, but reverse_order defines that the last device is selected.

Applying the Set of Rules to Your OSC (IGEL OS)

In the following description, we use IGEL OS. On other Linux variants, the procedure may differ; in particular, mounting the memory stick may require sudo.

  1. Plug the USB memory stick with IGEL OSC on it into your device.

  2. Open a terminal on the device and log in as root. For details on configuring a terminal on IGEL OS, see Terminals.

  3. Create a directory to which the memory stick will be mounted, e.g. stick/

    CODE
    mkdir stick

  4. Determine the device name of the memory stick with lsblk

    CODE
    lsblk

    The output should look something like this:

  1. When you have determined which of the listed devices is your memory stick, mount the second partition to the stick/ directory. In our example, this is sdb2.

    CODE
    mount /dev/sdb2 stick/

  2.  Use your favorite text editor, e.g. vi, to create your unit_id_rules.ini file.

    CODE
    vi stick/igel/unit_id_rules.ini

     

    image-20240612-145314.png

  3. Unmount the partition.

    CODE
    umount stick

    Now you can use the modified OSC on your memory stick to install IGEL OS on your devices.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.