Skip to content

Prevent NetworkManager to manage the interface on install #39

@xtor

Description

@xtor

Add an install hook in the Debian installer that:

  1. Checks if NetworkManager is running, and if it is running:
  2. Presents the user with a list of the network interfaces that detd is expected to manage and allows to select one or more
  3. Adds the selected interfaces to the list of devices not managed by NetworkManager
  4. Reloads NetworkManager

A list of all the relevant network interfaces can be generated with the command:
find /sys/class/net/ -type l -exec bash -c "realpath {} | grep -v virtual | xargs --no-run-if-empty basename" \;

The list of unmanaged devices should be in the file:
/etc/NetworkManager/conf.d/99-detd-managed-devices.conf

It should contain one entry in [keyfile] for each unmanaged device. E.g. to blacklist enp1s0 and enp2s0, add the following line:

[keyfile]
unmanaged-devices=interface-name:enp1s0;interface-name:enp2s0

The outcome can be tested with:
nmcli d

This post explains how to present multiple choices in an installation template:
https://ubuntuforums.org/showthread.php?t=2290840

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions