DevFS to the rescue.

Thursday, 20th November, 2003 :: 22:14 EST - Tech

Well, I finally figured out the usb mass storage hell this afternoon. Compile after compile after compile of the kernel still would not give me the immediate mount of media in the card reader, so I started looking up devfs stuff, and even though it isn’t supposed to be necessary to have entries in the config for devfs so that usb stuff works, well, I added them and more or less it works now. I’m still annoyed and worried that if I compile the kernel again I’ll break it again.

I have my portage tree shared via NFS now between this computer and the fileserver, quite convenient really. I now have it sync every morning and can update things fairly easily with only having to download packages once. :)

The “linux router” project is getting a bit more sorted. Gentoo doesn’t look like it’ll be very good afterall for that purpose because I can’t seem to find a “web gui” for the underlying apps. I think I’ll go with something like Clark Connect instead, that way my brother can admin his own open ports, etc. The main reason for doing this is because our ’standalone’ router might be having some issues… it disconnected both of my computers up here at the same time and I had to go downstairs and manually reset the router before it would reconnect them. We have most of the hardware required for the new router box anyway, just need an attractive case and a motherboard.

God Damnit!

Wednesday, 19th November, 2003 :: 23:05 EST - Tech

I’m am seriously sick of the fuckups in regards to usb mass storage, gentoo, and the kernel. It works, then it magically doesn’t work, and then it magically works again. I really should have left well enough alone, the kernel I was using worked, it was fast, but I wanted to tweak it just a tiny bit. I broke the damn usb mass storage yet again.

The kernel that I hadn’t touched AT ALL doesn’t do it right anymore either, so this tells me that it isn’t a kernel problem, but a gentoo problem… something in regards to the hotplugging and modules and just a whole bunch of other bullshit. This is driving me absolutely crazy with anger.

The drive is okay?

Wednesday, 19th November, 2003 :: 07:05 EST - Tech

A little while back I was having a severe filesystem issue with one of my 40GB drives in the fileserver, it would need to be fscked on every boot manually; this is a severe annoyance for a computer without a monitor of course. I moved the data off, pretty much decided that the drive itself had a problem and disconnected it from the system. I took it out the other day when I put the new 120GB drive in and finally got around to arranging an RMA for it this morning. Maxtor requires a “diagnostic code” before they’ll issue an RMA, kind of a pain, but I suppose it’s a good thing, making sure the drive does actually have a problem before agreeing to take it back. So I find a floppy disk (that was an adventure!) boot to windows to make their little floppy, hook the drive up, reboot and run the “basic” quick test, 90 seconds later it said there weren’t any problems. I was somewhat shocked. I ran the “advanced” horribly lengthy test and again it said nothing was wrong. I then decided to do a complete low-level format (aka zero out the drive). This process should reveal if there are any problems because it writes 0’s to every single possible bit of storage possible. Hours later that low-level format finished without any errors. I guess the drive just had “massive filesystem corruption” and the drive itself was okay? I’m really amazed… I’m pretty sure I used ext3 when I made the filesystem and it’s generally quite stable, hmm, don’t know. I suppose it’s time to put it to a realworld test again, get an IDE cable that is long enough to actually hold the drive and give it a try with something like ReiserFS.

Hardcore Geek

Tuesday, 18th November, 2003 :: 07:48 EST - Tech

So, right, Saturday was my birthday. I’m now twenty-five. . . a quarter of a century. JayPea was the only person that made any sort of comment about it, other than blood-family, and that was only after me telling him it was my birthday (of course he’d not have known otherwise). I think either Thursday or Friday, maybe even Wednesday, I forget at this point, I was supposed to go up there and spend some time with him, but it never really happened, as usual. I was actually rather dissapointed… the reason it didn’t happen was, well, him; he just didn’t seem as interested as he should have been, as interested as he was the night before, so I basically said “screw it.” DaVe/Cole phoned me Sunday to wish me a happy birthday, I’m not exactly sure if he realized that he was a day late or not… whatever, his reasoning was beyond any concept of stupid anyway. I guess I tend to be generally more upset with people when they try to make up for things, but fail miserably, I’d rather just let it go.

Anyway, so Saturday morning I set off on my birthday shopping trip. I went only to Staples, bought the 120GB harddrive that I’d been wanting and a USB memory stick (Sandisk Cruzer Mini 128MB). Turns out that the Cruzer has some issues with linux so I ended up spending quite a bit of time fiddling with it, but eventually just gave up. Lastnight I went back to Staples and exchanged it for a PNY Attache, it works as one would expect… for $20 more of course.

The days are sort of blurring together, I tend to just keep working here, alone, hiding in my room, and getting a little sleep here and there.

I swapped out the cdrom/cdrw between my workstation and file server, that was fairly painless. The devfs (which is, with irony, obsolete in the 2.6.x kernel series) was giving me some drama, but I got that sorted out. Adding the new harddrive and arranging the existing drives wasn’t too horrible either, huzzah for removable drive cages.

So I started to install gentoo… starting at stage2 since at this point stage1 is sort of useless. It would make sense to bootstrap if the compiler provided was current, but once you’ve installed it ‘needs’ updated anyway. Turns out that there were some hardware issues with the fileserver too; that isn’t too terribly surprising. I kept trying and trying… and trying some more, but eventually determined that I would need to start swapping around RAM, blah! I don’t know if it is the second dimm slot or the RAM itself, but with only one stick (a pitiful 512MB) the server is stable. I tried out stage3 in this process, but I sort of didn’t like it, too much would need to be updated, and while this could save time, it’s ultimately more of an annoyance. It took me 24 hours to get the server back online, but that was because I, for one needed sleep, and for two I had to deal with the hardware issues. One of the dumbest things was that I still had the mouse plugged in, which seemed strange, so I removed it. It turns out that for some idiotic reason I need to have the mouse plugged in otherwise the IDE/ATA card (for supporting the other harddrives) wouldn’t load into BIOS. I swear, something so simple and yet so stupid… it caused me so much grief.

The fileserver is mostly configured… the new drive is in, partitioned, has a filesystem, and mounted. I have BIND running to query for DNS and cache results (makes internet soooo much faster when you have only .5ms latency between you and the DNS server!) I also installed SQUID to proxy/cache webpages, it seems to work really well too. SAMBA is up and running and sharing the drives without issue, at least for me in Linux and on the iBook, I haven’t tested it in windows yet. I have installed apache and all that, but I haven’t configured it yet… For those that don’t know I use Apache to load up a sweet php script that allows one to search and build a playlist of all the mp3s. So that it still on the list. I’m also considering adding NFS shares, I think it has less overhead than SMB, which would make access faster. I also need to actually move around all of the data so that the shares actually make sense now, versus the mess I created when the 40GB drive started failing out with I/O errors.

So, back to the USB stick mess. These things are supposed to work in pretty much any OS, well, except for windows 98 and older, hehe. They use, shock, a ’system’ called “USB mass storage” which is also used for things like my 6in1 card reader. It’s so ridiculously complicated in implementation though and here’s why: It’s a vfat (that’s pre-NT-kernel windows filesystem for windows folks, aka FAT32/FAT16 versus NTFS) filesystem/partition on a FLASH memory chip connected via USB, which is then emulated as a SCSI harddrive using “scsi generic support” and a whole bunch of other shit, so there are tons of kernel-level drivers/modules required for something like that. As a sidenote, this is true in windows also, if I recall correctly, same as with cd/dvdwriting, it’s IDE emulated as SCSI, except outside of *nix it’s made totally transparent to the user.

I put the USB stick into the port and try to mount it, keeping in mind that my card reader uses the same protocols and works, but nothing happens. I look at “ps aux” and discover that my mount process has gone zombie. I fiddle and fiddle until I have smoked an entire pack of ciggies it seems and only get marginal success. I ask for help on the gentoo forums and NOBODY replies… figures, whenever I have a problem I can’t get a damn bit of useful help… I guess that’s why I stopped going to forums for the most part. I guess it sounds pretty snobbish, but the reality of it is that if I can’t figure it out, in general, nobody else can either… or the people that could are even more snobbish than I am and won’t help either for probably the same reasons.

I eventually gave up and set myself out to staples, a I said earlier, and exchanged it. The new one worked right away, so this means there is something wrong with Sandisk’s implementation. I did notice that the partition table on the sandisk is fux0red. I fixed that, but it still was being gatesy. I then can focus back onto another weird-ass problem that I hadn’t ever encountered before; whenever I would mount a removable device like compact flash, etc, I would need to mount it twice because the first time it couldn’t figure out the partition info, so doing a “mount -t vfat /dev/sda1 /mnt/flash” would result in either “special device sda1 doesn’t exist” or “bad superblock, bad filesystem or some other horrible thing” even though when doing it a second time it worked fine. As usual I fiddled with that wasting countless hours, but eventually came to conclusion that the kernel, specifically the usb portion of the kernel, was just as fux0red as my sandisk mini cruzer was. I compiled, blah blah, the gentoo stable kernel, based on the pre-release of 2.4.23 and wouldn’t you know, that double mounting problem went away! This really wasn’t a surprise and fully supported my conclusion that the usb in the “gentoo” kernel was b0rked. The problem with the stable kernel is that, well, it’s meant for servers that don’t need to be “responsive” to the user, thus it’s slow like honey (cold of course), even though it is better than the vanilla kernel, which is more like molassas in Antartica. So the conclusion here is that *somewhere* between 2.4.20 and 2.4.23pre the usb stuff was fixed… I took my chances and went back to my ck sourced kernel. The CK-Sources kernel is breathtakingly fast, but that comes at a price — possible instability. I haven’t had any problems with it, and thankfully it worked properly too, based from 2.4.22. In this whole process I also decided to take a leap to the 2.6.0-beta9 kernel, only to discover that I hadn’t a damn clue how I was supposed to get my SB Audigy or Nvidia card to work with it — the packages I have won’t compile against 2.6.0. I promptly decided that I needn’t waste even more time on this shit and removed the dev kernel. I’m sure there’ll be copious amounts of information in regards to how to make this stuff work once it goes ‘final’ anyway.

Phew, that was a lot and there’s still more. I was having this decision crisis over getting the USB stick in the first place. I didn’t really want to spend all sorts of money so I chose to get EITHER a secure digital card or the USB storage stick… I chose the usb because it would work with my workstation and laptop and anybody else’s near to modern computer. The frustration with the USB stick prompted me to want to get the SD card too, so I bought a 64MB one at walmart in the middle of the night. I remembered reading about how the Palm Tungsten could play mp3s, eventually, back when I bought it, and now having 64MB of additional storage I could actually PUT an mp3 on the device. Turns out that the whole mp3 playing thing works out pretty damn well and I’m sort of wishing I would have bought the larger SD card. I’ve been toying with the idea of taking it back to exchange it for a 128MB one, but I don’t know about that really. It harkens back to the whole ‘I want an iPod, but I have no use for an iPod’ problem. I think I’ll just stick with the card I have.

I also attempted to get bluetooth working in linux, but sort of didn’t succeed. I almost have it working, but all of the howtos for it just assume that the /dev/hci0 device actually appears, mine never did. The curious thing is that I have a supported adapter… turns out that the Dlink USB Bluetooth for Mac is not only for Mac, hah! Anyway, I haven’t exhiled the bluetooth stuff to emerge -C quite yet, but it’s getting close. I really don’t care if I had it working or not, especially now with the SD card.

One thing I sort of wanted to do, which relates to the Palm too, is getting it to sync with Evolution. The only real benefit would be if it syncs email, but I don’t think it does. Palm in their infinite wisdom in cooperation with Microsoft (Entourage Conduits) never gave the Mac software the ability to sync email like in windows. Palm and MS cleverly do not tell you anywhere before you actually own one that this is the case though, bastards! The whole Palm/linux thing with the Tungsten seems like more trouble than it is worth though anyway. I used to sync my Vx with Evolution, but it never really worked as well as one would want. Once I had the Tungsten and iBook it just seemed right to sync them together, but it was more fun when I had the .Mac account because I could use iSync and upload my contacts, etc.

I’m still very much lusting after a Bluetooth cellphone… I just think it would be a great gadget to have. I might breakdown and just get it from T-Mobile, hopefully they won’t charge some wretched price because I’m an ‘existing’ customer of theirs. I’d need to check and make sure they don’t do something strange to it that would prevent me from swapping the card for use with another provider though.

UGh, I have this drinking problem. Yes, I’m switching gears away from computer shit. I don’t drink ENOUGH. I’m pretty sure I’ve managed to waste the bottle of wine I bought Saturday… urgh… I had a single glass, and now it’s been just long enough that it’s probably gone bad. Damnit!

D’oh Need a New CD!

Saturday, 15th November, 2003 :: 03:48 EST - Tech

I’m sitting here planning out how I might convert my local file server over to Gentoo and finally realize that my P4 optimized livecd will NOT work on the file server because it’s an AMD Duron chip, whoops! I don’t intend to start on stage1 for the fileserver because for one it’ll take a century to bootstrap on an 800Mhz Duron and secondly there really aren’t that many optimizations available for such a system anyway. All this means is that I need to wait until the ‘generic’ i686 livecd is downloaded and burned before I can start the install.

The main reason for switching is that Redhat Linux is EOL. Redhat is doing this thing called Fedora for the ‘general public’ as a means to test software for their ‘enhanced’ linux (not free) and has essentially ceased support for the ‘normal’ Redhat Linux.

I’d been using Ximian’s Redcarpet to keep the file server updated, but I was able to use the gui frontend that tunnels into the server before. Now with Gentoo I don’t have that option, that in itself isn’t such a big deal because I could use the command line “rug” to do it. This hooks into RHL being EOL though, and as such the updates will not exist anyway.

Realistically the portage system of Gentoo is superior to that of rug/redcarpet anyway. With two commands I can see if there are any updated packages and update them. Of course if they’re large packages it’ll take a while to compile, but I do feel that the tradeoff of time versus speed is worthwhile.

The fileserver is working fine… I’m just concerned about the future and I might as well get it ready now. One big thing is that I want to use the xfs filesystem on a new 120/160GB harddrive (that I have yet to purchase) for my multimedia (video) files. I don’t have XFS in the current kernel and as such will need to recompile that anyway. It just seems like a good choice considering how peppy and wonderful gentoo seems on this system.

The only unresolved issue at the moment is that I don’t have a monitor connected at the moment. I “loaned” my old Viewsonic 19″ CRT to my brother David in ‘exchange’ for a monitor cable… lol. The monitor cable was so that I could connect this LCD (it has 3 spots for cables versus the normal single connector) to the fileserver, but it turns out that the cable is painfully too short. I can either disconnect this monitor, reborrow the 100 pound CRT, or just grab a little 15″ from downstairs (mom’s computer). I’m leaning towards temporarily borrowing the 15″ because I don’t want to disconnect this one. I probably could do it without a monitor… I know I need to hit enter to load up the livecd’s kernel, then I should be able to change the root password and start ssh, from then on I’m cool.

Oh well, I’ll figure something out, it’ll be an hour or so before I have the install cd downloaded and burned anyway.

I’ll probably wait until ‘daytime’ to do this switch so that I can just go ahead and get that new HD too, that way I can rearrange everything and only have to bring the server offline once, versus twice.

Another thing I’d been meaning to do that I will during this process is swap out the “ordinary” cdrom from this computer with my “fancy” Sony cdrw that currently sits unused in the fileserver. While I mainly burn DVDs now, the dvdrw/cdrw combo drive is sort of slow when it comes to burning cdrs, the Sony is significantly faster because it’s just a cdrw.

I’m still slowly working toward my goal of having 1TB of total drive storage. If I get the 120GB drive then I’ll be at 457.2GB, almost halfway there. My biggest stumbling block is starting to be the smaller drives I have. I took out the 1.7GB drive a very long time ago and likewise removed the 8.4GB drive when I bought the 80GB drive a bit over a year ago. My smallest drive now is a 17.2GB, which is the primary drive for the fileserver. This brings me to wondering if perhaps it would be better to just go ahead and replace that one now with the new one, and delegate the 17.2GB one to some other relatively meaningless task. I don’t really fancy that idea though, putting it on the same IDE cable as the cdrom will kill its speed benefits. Using a drive only capable of ATA33 on the same cable as a cdrom (which is only capable of ATA33) just seems the right thing to do, plus drive reads/writes on the primary drive are few and far between.