Fuck you, FreeBSD
dsfargeg I know I promised I’d post more rants about Haskell but I lied. I’ve been trying to set up a fucking router for my house, which means netbooting FreeBSD then installing from that. FUCKING HELL WHAT A PAIN IN THE ASS. I mean, netbooting is easy as fuck to set up, but occasionally there are strange hardware issues which cause everything to shit itself without reason.
can’t work out which disk we’re booting from
This nasty little fuck crawled out of the PXE loader somewhere. It didn’t make much sense to me — why the fuck would PXE be trying to load from a disk when we’re fucking netbooting? A little searching turned up this tidbit, which instructs you to rebuild pxeboot with -DLOADER_TFTP_SUPPORT=yes.
Fuck my life.
bootpc_fakeup_interface: set if addr, error=22
This kernel panic happens like 95% of the time when booting the fucking machine. I’m staring at the code right now, and at the core, it’s simply reporting the failure of the following call –
ifioctl(so, SIOCSIFADDR, (caddr_t) ireq, td);
It’s trying to set the inet4 address of the interface to 0.0.0.0 and failing somewhere. Piece of shit. As a note, error 22 is EINVAL — invalid argument. Now to figure out what the fuck would throw that shit.
Here’s a hand-generated call graph for ifioctl (because it takes about an hour to recompile a kernel on this old machine, it’s faster to do it this way than to put debug printfs in -_-) –
ifioctl - ifhwioctl - *so->so_proto->pr_usrreqs->pru_control
Actually, that wasn’t too bad. ifhwioctl doesn’t return EINVAL anywhere, which means it’s coming from the other call. It looks kind of messy (yeah, that’s a function call using a function pointer) but it makes sense — this is part of the networking code, and that’s a callback provided by the driver. In this particular case, the hardware is using the fxp driver, which makes the following lines in net/if.c make me scratch my head (since I run without INET6) –
2287 if ((oif_flags ^ ifp->if_flags) & IFF_UP) { 2288 #ifdef INET6 2289 DELAY(100);/* XXX: temporary workaround for fxp issue*/ 2290 if (ifp->if_flags & IFF_UP) { 2291 int s = splimp(); 2292 in6_if_up(ifp); 2293 splx(s); 2294 } 2295 #endif 2296 }
Actually, my buildkernel just finished, so I’m going to first try moving that one line of code outside the INET6 block (since I can re-run buildkernel with -DNOCLEAN to quickly apply the changes)… yeah that didn’t work. FUCK. Into the fxp driver to look for the function being called.
And the PSU just died.
FUUUUUUUUUUUUUUUUUUUUUUUCK.
2 comments