Solved NIC not working after upgrading from 9.2 to 10.0

Hi,

I've upgraded my VIA pc1000 low budget low power server from FreeBSD 9.2 to FreeBSD 10.0.
After I restarted to the upgraded version the network card was not working anymore:

Code:
# ifconfig
: flags=8803/<BROADCAST,SIMPLEX,MULTICAST>
ifconfig: ioctl(SIOCGIFINFO_IN6): Device not configured
: flags=8008<LOOPBACK,MULTICAST>
ifconfig: ioctl(SIOCGIFINFO_IN6): Device not configured

In my dmesg log I see that the network card is recognized. Further more I do not see any errors at in my dmesg log.
Code:
# dmesg | grep vr0
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xee00-0xeeff mem 0xfdffe000-0xfdffe0ff irq 23 at device 18.0 on pci0
vr0: Quirks: 0x0
vr0: Revision: 0x78
miibus0: <MII bus> on vr0
vr0: Ethernet address: 00:1b:b9:91:71:3e

in my messages.log I see all kind of errors from applications that complain about a missing network card. But I can not figure out what the root cause is of my NIC failing.
Does anybody have a suggestion where I can go from here?

Thanks!

Guido
 
Re: NIC not working after upgrading from 9.2 to 10.0

  • -STABLE or -RELEASE?
  • i386 or amd64?
  • GENERIC or custom kernel?
  • The output of uname -a will answer the above questions
  • Did you use freebsd-update(8) to update FreeBSD?
  • Please provide the contents of your /etc/rc.conf file.
 
Re: NIC not working after upgrading from 9.2 to 10.0

I found this in the FreeBSD 10.0-RELEASE Release Notes:
Code:
2.2.3.2. Network Interface Support
The vr(4) driver has been overhauled to fix a number of outstanding issues. It also now works on all architectures.
It's possible the overhaul introduced a regression. I did not find any open PRs regarding the vr(4) driver.
 
Re: NIC not working after upgrading from 9.2 to 10.0

Some interfaces experience an up/down cycle at boot, or don't come up until after the startup scripts run. Does it work if service netif restart is run after the system is done booting?
 
Re: NIC not working after upgrading from 9.2 to 10.0

Hi,

Thanks for your response. Here is the requested information.

I was running a custom kernel but before upgrading with freebsd-update I build a GENERIC kernel for wich I used the RELEASE sources:

Code:
hazelaar# uname -a
FreeBSD hazelaar.fritz.box 9.2-RELEASE-p4 FreeBSD 9.2-RELEASE-p4 #0: Tue Apr  8 18:05:06 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

And this is the content of my /etc/rc.conf:
Code:
hazelaar# cat /etc/rc.conf 
# -- sysinstall generated deltas -- # Fri Dec 25 14:32:56 2009
# Created: Fri Dec 25 14:32:56 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="hazelaar.fritz.box"
ifconfig_vr0="DHCP"
inetd_enable="YES"
keymap="us.iso"
smartd_enable="YES"
zfs_enable="YES"
nfs_server_enable="YES"
rpcbind_enable="YES"
dnsmasq_enable="YES"
cnid_metad_enable="YES"
netatalk_enable="YES"
scrnmap="iso-8859-1_to_cp437"
keymap="us.iso"
ntpdate_enable="YES"
winbindd_enable="YES"
supervisord_enable="YES"
supervisord_flags="-c /usr/local/etc/supervisord.conf"
nginx_enable="YES"
postgresql_enable="YES"
lpd_enable="YES"

#the firewall 
ipfilter_enable="YES"             # Start ipf firewall
ipfilter_rules="/etc/ipf.rules"   # loads rules definition text file
ipmon_enable="YES"                # Start IP monitor log
ipmon_flags="-Ds"                 # D = start as daemon
                                  # s = log to syslog
                                  # v = log tcp window, ack, seq
                                  # n = map IP & port to namesS

gateway_enable="YES"
arpproxy_all="YES"

#openvpn
openvpn_leeuwerik_enable="YES"
openvpn_leeuwerik_if="tun"
openvpn_multiple_clients_enable="YES"


The command service netif restart did not succeed. However, it gave a list of errors that might shed a light on what is wrong:
Code:
hazelaar# service netif restart
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
Stopping Network:  .
ifconfig: interface  does not exist
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
Starting Network:  .
ifconfig: interface  does not exist
ifconfig: interface  does not exist
ioctl(SIOCGETFS): Invalid argument
User/kernel version check failed
filter sync'd

Between the underscore and the dots there are unprintable subtitution placeholders like ACK, CAN or ETX.

Hope this helps to provide some feedback.

Best regards,

Guido
 
Re: NIC not working after upgrading from 9.2 to 10.0

What happens when you do service netif restart?

Never mind, I missed it.
 
Re: NIC not working after upgrading from 9.2 to 10.0

guidors said:
The command service netif restart did not succeed. However, it gave a list of errors that might shed a light on what is wrong:
Code:
hazelaar# service netif restart
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
Stopping Network:  .
ifconfig: interface  does not exist
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
ifconfig: interface  does not exist
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv4_addrs_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
eval: ${wlans_...}: Bad substitution
eval: ${vlans_...}: Bad substitution
eval: ${ifconfig_...}: Bad substitution
eval: ${ipv6_prefix_...}: Bad substitution
eval: ${ipv6_ifconfig_...}: Bad substitution
Starting Network:  .
ifconfig: interface  does not exist
ifconfig: interface  does not exist
ioctl(SIOCGETFS): Invalid argument
User/kernel version check failed
filter sync'd
I'm guessing the errors are because no interfaces are configured, so they are not very instructive ... at least for me. I have not found anything on the mailing lists or PRs for this problem.
 
Re: NIC not working after upgrading from 9.2 to 10.0

Those errors can be a result of a typo in /etc/rc.conf or an incomplete update of /etc files during an OS upgrade. How was this machine upgraded from 9.2 to 10.0?
 
Re: NIC not working after upgrading from 9.2 to 10.0

I found the issue. I performed freebsd-update -r 10.0-RELEASE upgrade followed by a freebsd-update install. After rebooting in the GENERIC kernel I got the issue.
I did not issue another freebsd-update install since the documentation states it will remove all old shared libraries and object files and I did not want that to happen since my NIC was not even working.

However, I did perform the additional freebsd-update install and then the NIC worked. Glad that that is sorted out. Thanks for the help.
 
Re: [Solved] NIC not working after upgrading from 9.2 to 10.

The first install only updates the kernel, after the reboot the second install will install the rest of the world. A final third install will remove old libraries and files.
 
I've been upgrading 9.3 to 10.3 with freebsd-update and had the same issue.
Code:
#uname -a
FreeBSD ns 9.3-RELEASE-p43 FreeBSD 9.3-RELEASE-p43 #0: Sat May 28 00:15:23 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
The system was previously updated with freebsd-update fetch install and reboot.

I ran freebsd-update upgrade -r 10.3-RELEASE, then freebsd-update install and then shutdown -r now, as said in handbook.
Since I did it remotely, I didn't managed to connect to the system after reboot. I had to use console.

There was exactly a situation like in the 1st post. ifconfig didn't "see" interfaces correctly. It looked like old ifconfig was incompatible with new kernel which was just booted. I ran freebsd-update install, it installed new ifconifg, and its output became normal. Right after it netif and routing services restarting fixed network and I finished upgrading.

So the question is: what should be correct way to upgrade FreeBSD remotely?
Maybe is it OK not to reboot after the 1st freebsd-update install? E.g. install new kernel, install new world, reboot, upgrade packages, remove old shared files.
Or maybe to enable root autologin and add freebsd-update install and shutdown -r now for one time right after kernel upgrading.
Or maybe one-time rc script with BEFORE: netif and freebsd-update install lines.

Code:
hostname="ns"
ifconfig_re0="inet a.b.c.10/24"
defaultrouter="a.b.c.1"

sshd_enable=YES
sendmail_enable=NONE
dumpdev=AUTO
syslogd_flags="-C $syslogd_flags"
altlog_proglist="named"

firewall_enable=YES
firewall_script="/etc/firewall.script"

named_enable=YES
named_chrootdir="/var/named"

ntpdate_enable=YES
ntpd_enable=YES
ntpd_sync_on_start=YES

exim_enable=YES
 
Maybe is it OK not to reboot after the 1st freebsd-update install? E.g. install new kernel, install new world, reboot, upgrade packages, remove old shared files.
That should be fine. I've only ever encountered one upgrade that actually required booting the new kernel first. And this was an upgrade from 4.x to 5.0 and the reason was because of the UFS to UFS2 migration. For all other upgrades after that the reboot is more a recommendation than a requirement.
 
For all other upgrades after that the reboot is more a recommendation than a requirement.
Just tested 10.2->10.3 upgrade without reboot, it worked. But it's interesting that installation instructions have this info (10.4, 11.1):
The system must now be rebooted with the newly installed kernel before the non-kernel components are updated.

Besides can it be so that new /sbin/shutdown will not be compatible with old kernel? Maybe backup old shutdown somewhere and use it if fail?
 
I think the "must" needs to be changed to "should". You should reboot. But on the other hand, it's probably the safer option to have "must" in the documentation (so the same text is always valid).

But, like I said, the last time there's been a change that actually required booting the new kernel first was with the 4.x -> 5.0 upgrade. For now it should be fine if you don't.
 
Back
Top