This is on a very recently synced/updated 2.6.11-mm2, ifconfig reports "Don't know how to set addresses for family 2.", this seems reasonable - the inet address is hardwired to 127.0.0.1, however the line in question is used in /etc/init.d/net.lo start() (and I haven't edited it by hand, and I have a minimal system).
Removing the 127.0.0.1 from /etc/init.d/net.lo fixes the problem. (Removing the 2>/dev/null also helps, because there is no error checking, so why bitbucket the error?)
Don't know what changed, but it looks like ifconfig (I can't imagine that line wasn't actually tested - lo does not come up on the system.)
Steps to Reproduce:
3. observe: no lo
lo wasn't up
Brought up lo
Minimal system - genkernel, it's 2.6.11-mm2 and the root is reiser4, maybe mm
has a patch to detect an attempt to set an inet on lo?
what version of net-tools ?
you neglected to provide `emerge info` like the bug report page told you to
Try updating to 2.6.11-mm3 - if it worked previously to 2.6.11-mm2 update, I assume it is a kernel issue.
Created attachment 53336 [details]
output of "emerge info"
See attachment emerge-info.txt
The original bug was not submitted from this machine which was minimally configured, configuration has changed since then, however the behaviour of ifconfig still reproduces with the current configuration (elinks added, kde emerge started but build failed)
emerge --pretend net-tools outputs:
[ebuild R ] sys-apps/net-tools-1.60-r9
I can't see any other way of getting version information
This *is* 2.6.11-mm3, but it also happened with 2.6.11-mm2
John, so you cannot really think of anything else that changed since it last worked?
Roy, mind having a look as you are our network scripts guru.
The more I think about it the more I think it *never* worked. The primary symptom is that ping <self> doesn't get any packets back, but when this *did* work my system did not have /sbin/ifconfig. I bootstrapped as follows:
1) LiveCD minimal, 2005 rc5? Follow stage1 instructions. The network is fine (automatically, from DHCP). Presumably it used ifconfig/scripts off LiveCD
2) Create reiserfs system, bootstrap into that (2.6.11-mm2), fine, but no /sbin/ifconfig, no /sbin/domainname (I emerged udhcpc).
3) From the new system re-bootstrap but now with a Reiser4 enabled kernel on a completely clean (new) partition. Because of the missing ifconfig etc from rc5 I reverted to 2004.3. Standard bootstrap: mkfs(reiser4), untar stage1, chroot (all exactly as in the instructions), reboot into the new, reiser4, partition.
And this is where the system is at (I'm in the process of emerging kde). It *does* have an ifconfig, but the initscript ifconfig line doesn't work - so I changed it to work (remove 127.0.0.1 and the pipe into devnull).
I did notice that genkernel/initrd brings up eth0, but not, apparently, lo and does not take it down - the net.lo re-runs (and fails), but net.eth0 does not run on the main bootstrap (yet eth0 is there). Presumably busybox and a different script are being used (and that means a different ifconfig and for sure udhcpc, not dhcpcd). I'm now using a non-initrd system.
1) /sbin/ifconfig lo 127.0.0.1 up
This should fail with a meaningful error message (it doesn't matter if lo is already up).
2) /sbin/ifconfig lo up
This should succeed (return status 0)
3) Examine /etc/init.d/net.lo
It should contain the equivalent of (1) above, not (2)
nosferatu build-default-i686-pc-linux-gnu-nptl # ifconfig lo down
nosferatu build-default-i686-pc-linux-gnu-nptl # /sbin/ifconfig lo 127.0.0.1 up
nosferatu build-default-i686-pc-linux-gnu-nptl # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:6E:C8:2F:86
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
RX packets:330326 errors:0 dropped:0 overruns:0 frame:0
TX packets:327486 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:75332050 (71.8 Mb) TX bytes:28812897 (27.4 Mb)
Base address:0xcf80 Memory:fe9e0000-fea00000
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:15267 errors:0 dropped:0 overruns:0 frame:0
TX packets:15267 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:4252356 (4.0 Mb) TX bytes:4252356 (4.0 Mb)
nosferatu build-default-i686-pc-linux-gnu-nptl #
Created attachment 53342 [details]
Small shell script to test ifconfig/lo
This script executes ifconfig with the option string which fails on my system
and checks the result
Created attachment 53343 [details]
Output of lo.sh (>lo.txt 2>&1) on the problem computer
nosferatu build-default-i686-pc-linux-gnu-nptl # ifconfig --version
ifconfig 1.42 (2001-04-13)
nosferatu build-default-i686-pc-linux-gnu-nptl # epm -q net-tools
nosferatu build-default-i686-pc-linux-gnu-nptl #
Address family 2 is IPv4 - so if ifconfig cannot add family 2 addresses, how did you give eth0 an IPv4 address? DHCP? Are you able to give eth0 an IPv4 address using ifconfig?
Can you try iproute2?
ip addr add 127.0.0.1/8 dev lo broadcast
ip link set lo up
If iproute2 works and ifconfig fails, try re-emerging net-tools.
If it still fails and iproute2 works then it's an ifconfig bug.
ifconfig on eth0 fails with the same message.
$ip addr add 127.0.0.1/8 dev lo broadcast
>> the 'broadcast' seems to need a parameter, but:
$ip addr add 127.0.0.1/8 dev lo
>> RTNETLINK answers: File exists
$ip link set lo up
>> this brings up lo, with the expected inet address
$ip addr add 18.104.22.168/8 dev lo
>> this gives no message, however ifconfig shows that the inet
>> address of the loopback interface is still 127.0.0.1
ldd shows that both ifconfig and ip are pulling in linux-gate.so.1, which, curiously, has no matching file.
emerge net-tools hangs after the compile of mii-tool.c, it's waiting for input from a configure script.
Typing a sufficient number of returns to that script completes the build, but ifconfig is still in the same state.
My conclusion is that 'emerge net-tools' is broken because of the configure script. Presumably on my original system build the hang caused net-tools not to get installed at all and on my new system the config is somehow broken.
emerge net-tools hangs at:
/bin/sh -c "if [ config.status -nt config.in ]; then ./configure.sh config.status; else ./configure.sh config.in; fi
It executes the else clause. It's in work/net-tools-1.60, config.in exists, config.status does not.
I added sys-apps/net-tools to package.keywords, redid the emerge net-tools, picking up r11. This doesn't have the same problem - the ebuild completes without error or hang.
After doing this ifconfig lo 127.0.0.1 up works correctly.
On reboot lo comes up fine with my still-hacked /etc/init.d/net.lo (i.e. ifconfig lo up still works ok and the loopback interface still has the correct inet address and netmask).
r11 marked stable
That fixes it.