Closed bretton closed 7 months ago
Driver detection includes a of PCI ids, in case of intel, also some inspection of the mac potentially to decide if it's em or igb. Then there's the question of device ordering. Seems like a lot of work.
Maybe it makes more sense to provide some sort of firstboot rc script that corrects the issue automatically the first time the bare metal server boots?
It affects me for unattended install. I'm passing in an interface name in depenguin_settings.sh
that has to be setup.
The value defaults to igb0
here
conf_interface="igb0"
Whatever is passed in gets renamed to untrusted
as part of INSTALLERCONFIG
sysrc ifconfig_%%interface%%_name="untrusted"
My issue is some systems show em0
within mfsBSD, and then when booted, the system sees igb0
and has no network. It was the same with bsdinstall
or unattended install script.
One server I had to change to em0
and the other back to igb0
. So the info is useful at the mfsbsd stage.
What do you suggest on firstboot side?
My issue is some systems show em0 within mfsBSD, and then when booted, the system sees igb0 and has no network. It was the same with bsdinstall or unattended install script.
Yeah, it's em0, because that's what qemu emulates (it's not passing the actual hardware to you).
What do you suggest on firstboot side?
A script that detects the primary interface (either automatically based on a priority list or based on a stored value we passed in when running qemu [e.g., a mac address to find it]). Automatic based on priority should be fine for a start (igb0, em0, bge0...).
Once detected, it will run the proper ifconfig commands to rectify the situation and modify /etc/rc.conf to persist the change (basically removing ifconfig_whatever_name=untrusted and setting ifconfig_detected_name=untrusted).
Alternative dirty hack on install:
sysrc ifconfig_em0_name=untrusted
sysrc ifconfig_igb0_name=untrusted
sysrc ifconfig_bge0_name=untrusted
Which will work, until you encounter a system with multiple network interfaces using different drivers ;)
is ifconfig_DEFAULT
always applicable to the plugged in NIC, or a DHCP thing?
is
ifconfig_DEFAULT
always applicable to the plugged in NIC, or a DHCP thing?
Nope, it's for everything, so not useful for this purpose.
I think the easiest way is to go the firstboot approach, should be fairly easy to accomplish. I can help you with it, just need to find a good place to test this.
just need to find a good place to test this.
I can test with a hetzner host
when the script has loaded up qemu and outputs this text
it should also indicate the likely name of the resulting network interface in the installed system.
I don't know an easy way to do this, however I found the following
source
It's tricky because Xneelo servers show
eno0
in rescue system,em0
in mfsBSD, andigb0
when in resulting installed FreeBSD system.However in some Hetzner server-bidding servers it would be
em0
in mfsBSD and installed FreeBSD system.Detecting the likely result in end system, and informing user, or automatically setting, would be useful.