Open requested to merge Ba3Hf/mkinitfs:Ba3Hf-master-patch-75981 into master
there is a case:
- there are 2 interfaces, one is is connected to public (eth0), one is for internal (eth1)
ip=is used, usually
- when device is not assigned in
here is the logic :
- when linux kernel boots, all interfaces status are
- linux kernel parse
ip=, according to
<device> Name of network device to use. Default: If the host only has one device, it is used. Otherwise the device is determined using autoconfiguration. This is done by sending autoconfiguration requests out of all devices, and using the device that received the first reply.
- internal (eth1) is always faster than public (eth0) to response kernel's
- kernel only
using the device that received the first reply, and brings up eth1, but keep eth0
downat it's default state.
- alpine init finds
eth1has no internet connection
- alpne fails to do netboot
this patch let alpine init bring up all interfaces before
grep operstate and find the first one that is
up, which is eth0. this fixes the boot issue in such case.
without this patch, one has to use parameter
ip=:::::eth0:dhcp (parsed by linux kernel and alpine init) or
BOOTIF=eth0_macaddr (parsed by alpine init)