# initramfs and udev predictable network interface names

## yzh

I built a custom livecd with catalyst and the initramfs does not seem to use the new predictable network interface names when acquiring an ip in the initramfs environment. (PXE boot).

It will boot and userland will have eth0 instead of the predictable enp2s0.

Any idea on how to use the predictable network names in initramfs?

----------

## John R. Graham

Who's initramfs are you using? I believe that, for instance, genkernel's initramfs does not use udev, but rather mdev instead, which follows the old scheme of just exposing the kernel namespace names.

- John

----------

## yzh

Yes, i'm using catalyst + genkernel.

Ok that's too bad.. any ideas on how to enable this, or would I have better luck by switching to dracut instead?

Are there any future plans to have the new udev integrated in the initramfs since Gentoo basesystem itself uses new udev as well? (http://wiki.gentoo.org/wiki/Udev/upgrade)

----------

## John R. Graham

You'd have to ask the genkernel developers, but I doubt it. The general philosophy being pursued is that anything that can be done outside the initramfs should be done outside the initramfs. Normally, this includes networking. What's your reason for moving network bring up into the initramfs?

- John

----------

## yzh

 *John R. Graham wrote:*   

> You'd have to ask the genkernel developers, but I doubt it. The general philosophy being pursued is that anything that can be done outside the initramfs should be done outside the initramfs. Normally, this includes networking. What's your reason for moving network bring up into the initramfs?
> 
> - John

 

The main reason is for PXE booting which requires network and NFS mounting within the initramfs.

----------

## Ant P.

Are you planning on using this livecd on more than one hardware configuration?

----------

## yzh

 *Ant P. wrote:*   

> Are you planning on using this livecd on more than one hardware configuration?

 

Mainly for one hardware configuration and ofcourse also supporting future model of the hardware. But in some cases also new hardware configuration.

----------

## yzh

I did not solve the problem, but used the following workaround:

 - lookup oldname interfaces using "udevadm test-builtin net_id "/sys/class/net/<iface>" to the predictable name.

 - use this lookup method in my installer scripts on the livecd.

 - After reboot it is not necessary anymore as I only use the PXE boot during the installation.

----------

