The Haus

Wednesday, March 9, 2005

Bleh: Windows Rebuild

I spent yesterday evening rebuilding Eeyore's Windows XP installation from scratch, since it had gotten the infamous crud-up-slow-to-death disease. Learned that a PC run in a kitchen can collect a TON (literally) of cruft inside the case. The dust brontosauruses were very impressive. I also learned that you should back up your DRM license database BEFORE you reformat the drive. Thankfully the vendor was good enough to unlock her collection so I could re-aquire the licenses for her mp3's. Apple's DRM method is so much easier--just hit play on a tune, then iTunes asks for your iTunes account info, and bingo you're good to go on up to 5 PCs or Macs.

Tonight's entertainment is going to consist of dishes, hardware cleanup, Mythbusters, and a Quakeworld install. That's right, TM is going to reinstall the original Quakeworld server someplace around here. I feel the need to play some Ziggurat Vertigo :-) Then it will be time to re-exercise my UT2004 skillz.

A.T. Hun comments: Example #245 why DRM is evil.

The Master comments: I agree, but if that's what it takes to be able to get legal copies of single tracks of music for our mp3 players, at a reasonable price, then I guess we get to suck it up. I'm extremely sick of paying $15+ for a disc that I want one track off of. Thankfully, Apple's method is only mildly intrusive. Unlike Microsoft's demonic possession version.

Monday, March 7, 2005

Messing with udev

Since I upgraded to the 2.6.10 kernel (I'm now using 2.6.11), I had problems getting my card reader to work. The problem turned out to be a new driver called "ub" which will replace "usb-storage". It will allow USB devices to be dealt with without having to treat them as if they were SCSI devices. It sounds good in theory, but practically it's not quite there yet. I ditched it and went back to the more familiar usb-storage.

Initally I thought I could solve the problem by moving to udev instead of using a static /dev filesystem. While that did not turn out to be the case, I did learn a lot. I began to realize the power that udev offers. Unfortunately, it is very poorly documented right now. Basically udev works with hotplug to automatically create device nodes as needed. The really cool thing is that you can create rules of your own choosing. Let me give you some examples from my /etc/udev/rules.d/10-local.rules file.

# Card reader
BUS="scsi", ID="*:0", SYSFS{model}="STORAGE DEVICE ", NAME{all_partitions}="compactflash"
BUS="scsi", ID="*:2", SYSFS{model}="STORAGE DEVICE ", NAME{all_partitions}="securedigital"

# USB drive
BUS="scsi", SYSFS{vendor}="OTi", SYSFS{model}="Flash Disk", NAME="usbdrive"

The first two rules are for my card reader. It looks on the SCSI bus for a product that calls itself "STORAGE DEVICE " (which is how my SanDisk reader reports itself). It then sets up /dev/compactflash[1-15] for it (I need it to create all the extra devices because the cards use the first partition for some reason). So I can insert a compact flash card and mount /dev/compactflash1 and away I go! I don't have to worry about device numbers changing since I'm looking for the actual name of the device. The second rule does the same thing for my secure digital slot. The third rule is for my USB drive. My SimpleTech drive reports itself as "OTi". When that is plugged in, udev/hotplug creates /dev/usbdrive. Pretty slick, actually. It also seems to have matured quite a bit and isn't quite as flaky as it once was.

By the way, to find out the vendor name, etc., look under /sys/bus/scsi/devices/ to see how things are being reported. I really hope someone is working on better documentation for all of this. It's quite sparse right now. I spent many hours Googling trying to pick this all up.

No Old News

Recent Headlines

January 5, 2015: It Returns!
August 10, 2007: SCO SUCKS IT DOWN!
July 5, 2007: Slackware 12.0 Released
May 20, 2007: PhpBB 3.0 RC 1 Released
February 2, 2007: DOOM3 1.31 Patch

January 27, 2007: Join the World Community Grid
January 17, 2007: Flash Player 9 for Linux
December 30, 2006: Darkness over Daggerford 1.2
December 19, 2006: Pocket Tunes 4.0 Released
December 9, 2006: WRT54G 1.01.1 Firmware OK with Linux/Mac

All original information on this website is copyright © TheHaus.Net, 1999-2005. The use of original images, text, and/or code from this website without expressed written consent is prohibited. The authors of this site cannot be held responsible for any damage, real or imagined, which comes from the use of information presented on this site. All trademarks used are the properties of their respective owners. This site is not to be used as a floatation device (but if you try, I want a video tape of it).