-
Ensure that you haven’t installed any package that needs udev:
equery depends udev -
Disable USE udev in /etc/portage/make.conf.
-
Enable USE
mdevfor busybox (and disablepam, it supposedly doesn’t work withstaticwell):echo 'sys-apps/busybox static mdev -pam' >> /etc/portage/package.use -
Reemerge busybox:
emerge -av busybox -
Copy configuration /etc/mdev.conf (see mdev.conf).
-
Add mdev to runlevel sysinit:
rc-update add mdev sysinit -
Remove udev* init scripts from runlevels:
rc-update del udev sysinit rc-update del udev-mount sysinit rc-update del udev-postmount -
Finally unmerge udev:
emerge --unmerge -a sys-fs/udev virtual/udev sys-fs/udev-init-scripts -
Mask udev:
echo -e "# we're using mdev from busybox instead\nsys-fs/udev" >> /etc/portage/package.mask/udev -
Reboot and hope that everything will be okay. :)
If you want to rename network interfaces (e.g. lan1 instead of eth1), then create file /etc/mactab with pair of an interface name and a Ethernet MAC address on each line.
For example:
# Allow busybox's "nameif" to rename downed interfaces on the basis of their
# MAC addresses.
wan0 12:34:56:78:9a:bc
lan0 12:34:56:78:9a:deThis file is read by busybox’s nameif during mdev initialization (see line 55 in mdev.conf).
Read man nameif for more information.
Note: Desired interface names should be different than eth[0-9] (nameif can’t swap names).
Thanks to Stuart for his article https://blog.stuart.shelton.me/archives/891.