OK, I solved my interface renaming issue. I'm putting what I found out here to try to help others who might have similar problems. I am running a hard drive install of knoppix 3.4.
Basically I had 2 problems: /etc/init.d/knoppix-autoconfig was running pump and bringing up the built in interface too soon, before nameif could rename it; and that the other interface, which is a pcmcia card, needed to have nameif run after it was inserted but before cardmgr brought it up. I did this by modifying the /etc/pcmcia/network.opts file.
Here is a more detailed report on solving the problem:
My laptop has a built in ethernet interface and (sometime) a
pcmcia wireless ethernet interface. When it boots, the kernel
would name them eth0 and eth1. It wasn't consistent which would
be named which; if I booted without the pcmcia card inserted
and put it in later it would call the built in eth0, otherwise
it would be eth1.
Some research indicated that nameif might be the solution.
I tried installing it but it didnt seem to work. I had to
remove the laptop-net package first (that was interfereing
with ifupdown on the built in port). I also had to edit my
lilo.conf file to set the kernel boot options to nodhcp
and nopcmcia. These are knoppix options that just cancel
those sections in the /etc/init.d/knoppix-autoconfig file.
This file gets run prior to the other init.d scripts and
was starting the interfaces before nameif could run properly.
In order to rename an interface, nameif must run with the interface
installed but not up. This was a bit of a challenge for the pcmcia
interface since it gets brought up imediately after being inserted.
The total solution was as follows:
First, I edited my lilo.conf to add the kernel options as mentioned... these
just affect the knoppix-autoconfig file. The point was to stop
it from bringing up the eth0 interface with DHCP, and running the
pcmcia cardmg, and let the /etc/init.d/networking and /etc/pcmcia/network
scripts do it later on with the modifications I had made.
After modifying lilo.conf I had to run 'lilo' of course to make the changes
/etc/lilo.conf changes (added nodhcp nopcmcia):
append="ramdisk_size=100000 init=/etc/init lang=us acpi=off apm=on apm=power-off nomce quiet nodhcp nopcmcia desktop=kde"
Set up /etc/network/interfaces as follows:
auto lo eth-port
iface lo inet loopback
iface wifi inet static
iface eth-port inet static
Set up /etc/mactab as follows:
#built in ethernet
Edited the 'start' section of /etc/init.d/networking to run nameif:
case "$1" in
doopt spoofprotect yes
doopt syncookies no
doopt ip_forward no
# if /etc/mactab exists then set up the named interfaces
if [ -e /etc/mactab ]
echo -n "Configuring network interfaces..."
Edited the /etc/pcmcia/network.opts file. I added a case section
to match my pcmcia card's mac address to run nameif after its
inserted before bringing it up. Also to add a WEP key.
case "$ADDRESS" in
log /sbin/ifup wifi
INFO="Sample private network setup"
Now, the laptop interfaces work correctly:
eth-port Link encap:Ethernet HWaddr 00:HW:AD
inet addr:192.168.0.108 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 b) TX bytes:6120 (5.9 KiB)
Interrupt:11 Base address:0x7000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:658 errors:0 dropped:0 overruns:0 frame:0
TX packets:658 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:174894 (170.7 KiB) TX bytes:174894 (170.7 KiB)
wifi Link encap:Ethernet HWaddr 00:30:BB
inet addr:192.168.0.50 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25657 errors:3 dropped:3 overruns:0 frame:0
TX packets:19756 errors:213 dropped:0 overruns:0 carrier:0
RX bytes:32200866 (30.7 MiB) TX bytes:7447465 (7.1 MiB)
Interrupt:3 Base address:0x100
Naming Network Interfaces
10.9 Dealing with inconsistent naming of interfaces by the kernel