Page 1 of 1

Netinstall stuck at "Waiting for RouterBOARD..."

Posted: Sat Oct 07, 2023 7:26 pm
by minfrin
Been stuck trying to un-brick a CAP XL ac, and have not got netinstall to work.

Most specifically, netinstall hangs having done this:
[root@netinstall ~]# ./netinstall-cli -a 192.168.88.1 routeros-7.11.2-arm.npk 
Version: 7.12rc1(2023-10-05 06:32:41)
Interface Mask: 255.255.255.0
Using Client IP: 192.168.88.1
Using Server IP: 192.168.88.2
Starting PXE server
Waiting for RouterBOARD...

I have a dedicated virtual machine running Rocky9 that is installed for the sole purpose of netinstall.

The network is configured as follows:
[root@netinstall ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:d7:28:34 brd ff:ff:ff:ff:ff:ff
    inet 192.168.88.2/24 brd 192.168.88.255 scope global noprefixroute enp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fed7:2834/64 scope link 
       valid_lft forever preferred_lft forever
3: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:6d:44:7b brd ff:ff:ff:ff:ff:ff
The CAP XL ac is connected through an RB5009. The netinstall virtual machine sees bootp traffic as below. I have confirmed that the MAC address matches the MAC address printed on the outside of the bricked device.
16:16:06.489445 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 18:fd:74:3e:d7:b0 (oui Unknown), length 300
16:16:06.689581 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 18:fd:74:3e:d7:b0 (oui Unknown), length 300
16:16:06.889717 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 18:fd:74:3e:d7:b0 (oui Unknown), length 300
16:16:07.089877 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 18:fd:74:3e:d7:b0 (oui Unknown), length 300
16:16:07.290036 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 18:fd:74:3e:d7:b0 (oui Unknown), length 300
16:16:07.490184 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 18:fd:74:3e:d7:b0 (oui Unknown), length 300
Looking at the netinstall process, it appears to have forked itself, one process listens on port "commplex-main", the second listens on "bootps" and "tftp":
[root@netinstall ~]# ps -auxwww | grep netinstall
root       48231  0.0  0.0  44088   208 ttyS0    S    17:16   0:00 ./netinstall-cli -a 192.168.88.1 routeros-7.11.2-arm.npk
root       48232  0.0  0.0  44088    44 ttyS0    S    17:16   0:00 ./netinstall-cli -a 192.168.88.1 routeros-7.11.2-arm.npk
root       48238  0.0  0.0   6408  2188 ttyS0    S+   17:16   0:00 grep --color=auto netinstall
[root@netinstall ~]# lsof -p 48231
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF    NODE NAME
netinstal 48231 root  cwd    DIR  253,0     4096 4194434 /root
netinstal 48231 root  rtd    DIR  253,0      235     128 /
netinstal 48231 root  txt    REG  253,0 44954972 4207421 /root/netinstall-cli
netinstal 48231 root    0u   CHR   4,64      0t0      94 /dev/ttyS0
netinstal 48231 root    1u   CHR   4,64      0t0      94 /dev/ttyS0
netinstal 48231 root    2u   CHR   4,64      0t0      94 /dev/ttyS0
netinstal 48231 root    3u  IPv4  75332      0t0     UDP *:commplex-main 
[root@netinstall ~]# lsof -p 48232
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF    NODE NAME
netinstal 48232 root  cwd    DIR  253,0     4096 4194434 /root
netinstal 48232 root  rtd    DIR  253,0      235     128 /
netinstal 48232 root  txt    REG  253,0 44954972 4207421 /root/netinstall-cli
netinstal 48232 root    0u   CHR   4,64      0t0      94 /dev/ttyS0
netinstal 48232 root    1u   CHR   4,64      0t0      94 /dev/ttyS0
netinstal 48232 root    2u   CHR   4,64      0t0      94 /dev/ttyS0
netinstal 48232 root    3u  IPv4  76463      0t0     UDP *:bootps 
netinstal 48232 root    4u  IPv4  76465      0t0     UDP *:tftp 
[root@netinstall ~]# 
There is no firewall:
[root@netinstall ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
[root@netinstall ~]# 
Strace shows we're stuck at this point:
sendto(4, [{nlmsg_len=20, nlmsg_type=RTM_GETADDR, nlmsg_flags=NLM_F_REQUEST|NLM_F_DUMP, nlmsg_seq=2, nlmsg_pid=0}, {ifa_family=AF_UNSPEC, ...}], 20, 0, NULL, 0) = 20
recvfrom(4, [[{nlmsg_len=76, nlmsg_type=RTM_NEWADDR, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=2, nlmsg_pid=48248}, {ifa_family=AF_INET, ifa_prefixlen=8, ifa_flags=IFA_F_PERMANENT, ifa_scope=RT_SCOPE_HOST, ifa_index=if_nametoindex("lo")}, [[{nla_len=8, nla_type=IFA_ADDRESS}, inet_addr("127.0.0.1")], [{nla_len=8, nla_type=IFA_LOCAL}, inet_addr("127.0.0.1")], [{nla_len=7, nla_type=IFA_LABEL}, "lo"], [{nla_len=8, nla_type=IFA_FLAGS}, IFA_F_PERMANENT], [{nla_len=20, nla_type=IFA_CACHEINFO}, {ifa_prefered=4294967295, ifa_valid=4294967295, cstamp=130, tstamp=130}]]], [{nlmsg_len=88, nlmsg_type=RTM_NEWADDR, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=2, nlmsg_pid=48248}, {ifa_family=AF_INET, ifa_prefixlen=24, ifa_flags=IFA_F_PERMANENT, ifa_scope=RT_SCOPE_UNIVERSE, ifa_index=if_nametoindex("enp1s0")}, [[{nla_len=8, nla_type=IFA_ADDRESS}, inet_addr("192.168.88.2")], [{nla_len=8, nla_type=IFA_LOCAL}, inet_addr("192.168.88.2")], [{nla_len=8, nla_type=IFA_BROADCAST}, inet_addr("192.168.88.255")], [{nla_len=11, nla_type=IFA_LABEL}, "enp1s0"], [{nla_len=8, nla_type=IFA_FLAGS}, IFA_F_PERMANENT|IFA_F_NOPREFIXROUTE], [{nla_len=20, nla_type=IFA_CACHEINFO}, {ifa_prefered=4294967295, ifa_valid=4294967295, cstamp=545, tstamp=545}]]]], 8192, MSG_DONTWAIT, NULL, NULL) = 164
recvfrom(4, [[{nlmsg_len=72, nlmsg_type=RTM_NEWADDR, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=2, nlmsg_pid=48248}, {ifa_family=AF_INET6, ifa_prefixlen=128, ifa_flags=IFA_F_PERMANENT, ifa_scope=RT_SCOPE_HOST, ifa_index=if_nametoindex("lo")}, [[{nla_len=20, nla_type=IFA_ADDRESS}, inet_pton(AF_INET6, "::1")], [{nla_len=20, nla_type=IFA_CACHEINFO}, {ifa_prefered=4294967295, ifa_valid=4294967295, cstamp=130, tstamp=130}], [{nla_len=8, nla_type=IFA_FLAGS}, IFA_F_PERMANENT]]], [{nlmsg_len=72, nlmsg_type=RTM_NEWADDR, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=2, nlmsg_pid=48248}, {ifa_family=AF_INET6, ifa_prefixlen=64, ifa_flags=IFA_F_PERMANENT, ifa_scope=RT_SCOPE_LINK, ifa_index=if_nametoindex("enp1s0")}, [[{nla_len=20, nla_type=IFA_ADDRESS}, inet_pton(AF_INET6, "fe80::5054:ff:fed7:2834")], [{nla_len=20, nla_type=IFA_CACHEINFO}, {ifa_prefered=4294967295, ifa_valid=4294967295, cstamp=545, tstamp=545}], [{nla_len=8, nla_type=IFA_FLAGS}, IFA_F_PERMANENT]]]], 8192, MSG_DONTWAIT, NULL, NULL) = 144
recvfrom(4, [{nlmsg_len=20, nlmsg_type=NLMSG_DONE, nlmsg_flags=NLM_F_MULTI, nlmsg_seq=2, nlmsg_pid=48248}, 0], 8192, MSG_DONTWAIT, NULL, NULL) = 20
close(4)                                = 0
setsockopt(3, SOL_SOCKET, SO_BINDTODEVICE, "enp1s0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 32) = 0
writev(1, [{iov_base="Waiting for RouterBOARD...", iov_len=26}, {iov_base="\n", iov_len=1}], 2Waiting for RouterBOARD...
) = 27
recvfrom(3, 
Am I correct in understanding that seeing the bootp incoming traffic means that the CAP XL ac is in etherboot mode, and is correctly broadcasting bootp packets?

Why does netinstall hang?

Re: Netinstall stuck at "Waiting for RouterBOARD..."

Posted: Sat Oct 07, 2023 8:15 pm
by minfrin
There are multiple ways for firewalls to break things. In the case of Rocky9 you need to disable the firewall like this:
[root@netinstall ~]# service firewalld stop

Re: Netinstall stuck at "Waiting for RouterBOARD..."

Posted: Sat Oct 07, 2023 10:13 pm
by tangent
You needn't be so heavy-handed. My Netinstall on EL9 guide shows a more enlightened path. You may find that it helps you with more than the firewalling aspect.