Created attachment 149608 [details] Add hostid to REQUIRE: for hostid_save and netif When /etc/rc.d/zvol is removed hostid is run after hostid_save and netif. hostid is required by hostid_save in case /etc/hostid doesn't exist so the correct hostid will be written. hostid is required by netif for the bridge interface MAC address. If hostid is run after netif a random MAC address will be generated on each boot. rcorder with zvol sysctl hostid zvol ... rcorder without zvol ... hostid_save ... netif ... hostid ... Verified behavior on virtual machine installed from FreeBSD-11.0-CURRENT-i386-20140525-r266655-disc1.iso. /etc/rc.conf ... cloned_interfaces="bridge0" ifconfig bridge0 # (first boot) bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 22:b3:11:79:51:3d ifconfig bridge0 # (second boot) bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 5e:dc:bd:ed:43:5d When hostid is added to netif REQUIRE line: dmesg -a ... Setting hostid: 0x49d109e4. ... ifconfig bridge0 # (on every boot) bridge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 02:49:d1:09:e4:00
I'll take a look at this bug because I want to remove the ZFS dependency from mountroot.
A commit references this bug: Author: ngie Date: Sun Oct 25 05:59:03 UTC 2015 New revision: 289919 URL: https://svnweb.freebsd.org/changeset/base/289919 Log: Make hostid_save and netif REQUIRE hostid netif needs hostid to be generate first in the event that bridging is being setup via netif. The reason for hostid_save needing it is fairly straightforward PR: 195188 Changes: user/ngie/detangle-rc/etc/rc.d/hostid_save user/ngie/detangle-rc/etc/rc.d/netif
A commit references this bug: Author: ngie Date: Sun May 29 02:59:03 UTC 2016 New revision: 300931 URL: https://svnweb.freebsd.org/changeset/base/300931 Log: Make netif REQUIRE hostid As noted in the PR, if etc/rc.d/zvol is removed, netif will be run before hostid, and the MAC address generated for any bridge devices will be non-deterministic. Make the MAC address generated be deterministic for bridge devices by explicitly REQUIRE'ing hostid. This fixes up the rest of the PR, inadvertently committed in r299844 MFC after: 1 week PR: 195188 Sponsored by: EMC / Isilon Storage Division Changes: head/etc/rc.d/netif
A commit references this bug: Author: ngie Date: Wed Jun 8 13:40:07 UTC 2016 New revision: 301615 URL: https://svnweb.freebsd.org/changeset/base/301615 Log: MFC r299844,r300931: r299844: Make hostid_save depend on hostid r300931: Make netif REQUIRE hostid As noted in the PR, if etc/rc.d/zvol is removed, netif will be run before hostid, and the MAC address generated for any bridge devices will be non-deterministic. Make the MAC address generated be deterministic for bridge devices by explicitly REQUIRE'ing hostid. This fixes up the rest of the PR, inadvertently committed in r299844 PR: 195188 Changes: _U stable/10/ stable/10/etc/rc.d/hostid_save stable/10/etc/rc.d/netif
A commit references this bug: Author: ngie Date: Wed Jun 8 13:41:52 UTC 2016 New revision: 301616 URL: https://svnweb.freebsd.org/changeset/base/301616 Log: MFstable/10 r301615: MFC r299844,r300931: r299844: Make hostid_save depend on hostid r300931: Make netif REQUIRE hostid As noted in the PR, if etc/rc.d/zvol is removed, netif will be run before hostid, and the MAC address generated for any bridge devices will be non-deterministic. Make the MAC address generated be deterministic for bridge devices by explicitly REQUIRE'ing hostid. This fixes up the rest of the PR, inadvertently committed in r299844 PR: 195188 Changes: _U stable/9/ _U stable/9/etc/ _U stable/9/etc/rc.d/ stable/9/etc/rc.d/hostid_save stable/9/etc/rc.d/netif