One Night of Work -- carton 2007-02-11

I overcame the Alpha XP1000's firmware bugs using the Debian workaround: Linux tftpd-hpa with the -r blksize argument. Now it will boot a NetBSD kernel.

Gentoo xinetd is crap. It has an only_from feature that by default won't allow any connections except from localhost, but what they forget, is that many UDP daemons are wait daemons, so once you test the daemon with tftp localhost it will run for 15 minutes and accept connections from anyone. But if you haven't tested the daemon recently, it won't respond to outsiders. This cost me about 15 minutes. what crappy irritating security. and it applies to any wait daemon, so xinetd has enough information available to it to know it's leaving this gaping security hole. It's really a pain in my ass. I miss NetBSD inetd, which has very few extensions except a way to listen on specific IP addresses.

I found that the XP1000 built-in Ethernet could not autodetect. A lot of crappy chips have trouble auto-detecting duplex (they set themselves to full-duplex on a hub), but the Alpha XP1000 has more trouble than usual. It actually prints error messages during boot and pauses for ten seconds and stuff. so, without thinking it a big deal, I had done this in SRM console:

>>>set ewa0_mode Fast
Change mode to FAST.
>>>

It solves the problem, and is correct for my hub-only network. With that (and the pacifier hard disk on the SCSI bus), I can boot SRM pretty quickly, and boot ewa0 now promptly and consistently loads a NetBSD kernel.

but when NetBSD boots, it can't mount its NFS root filesystem. I bet it's because the Ethernet chip can't even tell whether it's 10 or 100Mbit/s link, much less the duplex. I made a patch to sys/dev/ic/tulip.c:

Index: tulip.c
===================================================================
RCS file: /scratch/cvsroot/netbsd/src/sys/dev/ic/tulip.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 tulip.c
--- tulip.c	18 Jul 2005 14:07:43 -0000	1.1.1.8
+++ tulip.c	12 Feb 2007 00:22:34 -0000
@@ -5238,7 +5238,7 @@
 			tm->tm_get = tlp_2114x_nway_get;
 			tm->tm_set = tlp_2114x_nway_set;
 
-			defmedia = IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0);
+			defmedia = IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, 0);
 			ifmedia_add(&sc->sc_mii.mii_media, defmedia, 0, tm);
 
 			sc->sc_statchg = tlp_2114x_nway_statchg;

It's building now. I hope it works. I wish I were more clever and could test this with ddb. I really want to get out of this head-above-water sysadmin crap and start using some high-quality toolchains.


One Night of Work / map / carton's page / Miles Nordin <carton@Ivy.NET>
Last update (UTC timezone): $Id: 20070211-carton.html,v 1.1 2007/02/12 03:59:15 carton Exp $