Network interface names

Rémy Dernat remy.d1 at gmail.com
Thu Nov 22 09:54:20 CET 2018


Hi,

I am facing the same issue. However, I would like to adopt the new naming
style, and so, retrieving the interface name dynamically.

The Debian script previously cited seems to do the job at the FAI nfsroot
step, during installation. However, when it reboots, it looses the ability
to get this new name.

What I did :
  - copying this debian script (
https://github.com/faiproject/fai-config/blob/master/scripts/DEBIAN/30-interface
) into a BIONIC64 (ubuntu 18.04) class (script/BIONIC64/),
  - In the files/ subdirectory in fai-config directory, I created 2 files :
    - etc/cron.d/dhclient/BIONIC64 (to launch dhclient at reboot),
    - etc/netplan/01-netcfg.yaml/BIONIC64.

I tried to put $NIC1 in those files thinking it would be replaced by the
right interface name, but it is not.

So, I think that FAI variable cannot be used in the files/ subdirectory
because it is not avalaible anymore at this step (after the install).

$NIC1 is used in this script
https://github.com/faiproject/fai/blob/master/lib/get-boot-info

Any idea on how to achieve this according to the new naming convention ?

Kind regards,
Rémy.

Le lun. 15 oct. 2018 à 09:37, Steffen Grunewald <
steffen.grunewald at aei.mpg.de> a écrit :

> Hi,
>
> thanks for the responses which may turn out to be helpful in some way (if
> it's
> already too late to get hold of the old-style if names) - during a
> half-hearted
> test, the grub cmdline trick did not work for me.
>
> What still makes me curious is
>
> > > What I still haven't found is which magic FAI uses to avoid the
> renaming
> > > to "predictable network interface names" (a term that's completely
> misleading
> > > to me as I'm unable to predict the network names if I'm given a
> brand-new
> > > machine). Thomas, can you shed some light on this?
>
> If I run FAI sysinfo, I see eth0, ..., wlan0, etc., and dmesg.log doesn't
> contain any "renamed to" strings, so this renaming must have been avoided
> somehow, and it's the "how" I am still looking for. (I.e., was makes the
> NFSROOT special in this respect as it uses the default kernel?)
>
> > > My plan is to read the (old-style) interface names assigned by FAI,
> then
> > > create a $target/etc/udev/rules.d/70-persistent-net.rules file from
> that
> > > information. Is there a hidden trap? When is it best to write that
> file?
>
> As long as the un-renamed if names are available witin FAI, it's simple to
> create that rules file. The devil may be in the detail when it's required
> to exist (I suspect there's some initrd magic?)...
>
> Thanks again,
>  Steffen
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20181122/81b29d48/attachment.html>


More information about the linux-fai mailing list