June 10th, 2004

ln -s /proc/mounts /etc/mtab

That's what I needed to do to fix tune2fs. It took six hours of digging through the source code to figure this out, of course, because it gave a horrible error message that said a file was missing but didn't say WHICH file, and made it seem like it was the one specified on the command line that it couldn't find, when it actually couldn't find "/etc/mtab". (And the actual build process involved the creation of libraries that were then linked together, and the dependencies were screwed up enough that updating the source file didn't cause the indermediate library to rebuild. So my printfs didn't show up until skipped the make file's build process and manually listed every darn .o file to link together by hand. There were someting like 50 of them, found by grepping the C source for the next function the linker couldn't find, one after the other, adding the relevant .o file to the list, and trying to link again...)

One of the nice things about open source software is it allows you to track down pretty much any bug if you persevere long enough. And most of the time, it doesn't require changing the actual source code, it's some strange configuration or invocation tweak, or inter process communication or need for more disk space or some other weird thing. But you've got to follow the source code for a long way to figure out what the heck is going wrong because the error messages you get positively suck. (This is universal. Well, actually, the failures where you get a GOOD error message don't require source code and a marathon debugging session to track down the problem and fix it...)

Don't ask me why mke2fs didn't fail with /etc/mtab not there, but tune2fs did. (Hey, we'll happily FORMAT the sucker if it's currently mounted, we just won't tweak it...)

Meanwhile, I'm reading more of what Eric's done on the book and responding to it, now that he's made a "one big version" so I can load a copy on my laptop and read it while I'm away from a net connection...