Multiple NIC problem

Hello,
i am developing custom debian iso(based on stretch image and i am using foreman with pxegrub2 boot for network provisioning purpose.
i am trying to select known interface because at some point if another link is up then device will try to reach foreman from that interface and this situation is problem for us.

Do you guys know how i can do that ? If foreman supports that kind of feature i want to use it. If foreman does not supports these kind of features,

i also tried

  • give interface name from preseed file like
    netcfg/choose_interface eth3 ->> did not worked. still scanning all interfaces and then selecting one.

and grub.cfg file
interface=eth3 , bootif= ->> did not worked either.
(i used this example https://github.com/theforeman/community-templates/blob/develop/provisioning_templates/PXEGrub2/kickstart_default_pxegrub2.erb)

Foreman 1.15.6

Thank you.

Hello, I am not really sure what you are really doing from your description, but if Debian Installer is initializing wrong network device and you are actually PXE booting, then you need to tell the installer which device this is.

In PXELinux there is an option “IPAPPEND 2” and when present, it will add BOOTIF=01-XXXXXXX parameter to the kernel command line which most installers accept. At least Red Hat Anaconda does, not sure how Debian.

Now Grub2 does not have such an option, but you can trick provide it just like that:

... BOOTIF=01-$net_default_mac

We have that in discovery snippets, not sure why we don’t do that in default grub templates, I am filing a PR for that: