The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Author: Ed

  • Why You Should Replace PCI Card Slot Covers

    Mouse-infested PC Overview
    Mouse-infested PC Overview

    My eagle-eyed daughter spotted a Dell PC by the side of the road on her way home from school, so we snagged it en passant to a school meeting later that evening. We dropped it in the workshop, figuring that she could do some forensics, then install Puppy Linux or some such.

    The next morning the entire Basement Laboratory was filled with the unmistakable odor of stale piss and I noticed that the back panel of the PC had two missing card slot covers. I immediately hauled the carcass outside and set a bunch of mouse traps around the basement.

    When we popped the cover, we found a very well-built mouse nest covering the entire surface of the system board. The previous owners had evidently run the PC flat on the floor (it’s a Dimension 8100 beside-the-desk tower) with two of the back-panel card slot covers missing and the mice decided this was just about the finest neighborhood in the building.

    Mouse nest below power supply
    Mouse nest below power supply

    The power supply in this model covers the system board with an inch or so of clearance. We swung the supply box up on its hinges and found a thick layer of furry padding underneath; perhaps this was the sleeping quarters?

    The mouse latrine was over by the CD burner, which was a dead loss, and corrosion had eaten one corner of the DVD ROM drive’s case. The previous owners had removed the hard drive (good for them!) and dislodged the CPU and heatsink. I think this model had an exhaust duct over the heatsink, which was missing.

    We salvaged the CPU (for show-n-tell), heatsink (aluminum plate), DVD drive (amusement value), and the Soundblaster Live! audio card (on general principles). The rest wasn’t worth the risk of huffing more hantavirus; we tipped it into the trash. In theory, we’re supposed to recycle this stuff, but I’m not going to keep it around for a few months until hazmat day.

    [Update: I just got a flyer saying that the next town hazmat day is mid-April, so I dug the damn thing out of the trash. I’ll run a bunch of dead PCs and toxins down the road; depending on the load, maybe I can use the bicycle trailer. That’s always good for a laugh around the dumpsters.]

    All the prizes except the DVD drive’s guts went into a dishpan of hot soapy water and ought to be in good condition when they dry out. If the drive doesn’t smell bad, we’ll put it to some good use.

    Clogged air inlets
    Clogged air inlets

    Now, you might think the mice moved into a dead PC stored in a corner. As nearly as I can tell, that’s not the case: the CPU chip was in (relatively) pristine condition and, when we removed the front cover, the air inlets were clogged with a thick layer of fuzz. So I think the mice had a nice, heated nest with plenty of ventilation, right up until the system quite literally crapped out.

    According to Dell’s records, this box shipped 20 August 2001 with WinXP home, 64 MB of Rambus memory, and a 40 GB hard drive.

    Times have changed since then, in more ways than one…

  • TaxAct vs TurboTax: The Bottom Line

    After considerable bashing & crashing, both TurboTax and TaxAct produced the same bottom-line number. TA requires considerably more manual intervention in spots where TT simply does the right thing.

    The NY state tax refund apportionment issue is entirely non-obvious; if we hadn’t been running TT in parallel we’d have missed that one entirely. The need to manually patch up the maximum IRA contribution limits took a while to figure out, too, as we’d based our contributions on half the total, which put one of us over the “limit” computed by TA.

    TA does have linkages to (some of) the source lines used in its calculations, but doesn’t have nearly the same level of hand-holding as TT.

    TaxAct is far less expensive overall: $20 with “free” Fed plus $8 for NYS e-file. TurboTax is about $45 with “free” Fed and $20 NYS e-file. Basically, you can buy TaxAct and file both returns for less than the base cost of TurboTax.

    You could probably use TaxAct for most personal returns with no problems other than the state tax refund gotcha. It’s marginal for the complexity of our return.

    So our bottom line is that we might just continue to run both in parallel next year:

    • TurboTax wins hands-down for closely following the gruesome details of the tax code.
    • TaxAct wins for cross-checking and less-expensive filing
  • TaxAct: Roth IRA Calculation Puzzlement

    Another issue with TaxAct, which seems to have arbitrarily divided our Earned Income amount between us for the purpose of computing the maximum IRA contributions.

    My query to Tech Support:

    Line 8 of the Roth IRA Contribution Worksheet produces the correct value for our return.

    Line 9 divides that number into two unequal parts, placing the larger part in the first column as a calculated (blue) value and the smaller part in the second column as an editable (green) value.

    The two parts in Line 9 add up to Line 8, which is correct.

    However, we do not understand why the two values in Line 9 are not equal. There is no link to an explanation and the “Forms Help” does not address this issue; we cannot find any basis in IRS Pub 590 for initially dividing Line 8 into anything other than two equal parts.

    We have changed the smaller part to half of Line 8, whereupon the larger part correctly adjusts itself to the same value.

    What is the tax-law basis for the initial calculated values in Line 9?

    Thanks…

    The reply:

    Dear TaxACT(R) Customer:

    Initially the TaxACT program will divide the amount proportionately to income.  If you follow the questions and answers through to complete your return, you are prompted to make the needed adjustment.

    Now, as it happens, there dosn’t seem to be any division of our income that produces the observed difference; it’s not obvious how TaxAct defines “income” for this purpose.

  • TaxAct: State Tax Refund Apportionment FAIL

    We’re running TurboTax and TaxAct in parallel this year and came across a difference in how they handle state tax refunds.

    As nearly as I can express it, if you itemize deductions and made estimated tax payments for 2007 and made a payment for 2007 in January 2008 and got a state tax refund in tax year 2008 for 2007, then you must reduce the refund by the fraction of your 2007 estimated tax paid in January 2008.

    The question I submitted to TaxAct was:

    According to IRS Pub 525 (2008), state tax refunds must be apportioned according to the estimated tax amounts paid in each quarter for users making itemized deductions. The Pub 525 “Example” in the middle of the second column on page 22 explains our situation.

    TaxAct accepts the total refund amount as an input from our 1099G and accepts the 2008 estimated tax payments, but does not (seem to) have any mechanism for allocating the refund based on 2007 (not 2008!) estimated payments.

    There is no provision on the “State and Local Tax Refund” worksheet for this calculation.

    We are using TurboTax to cross-check our work. It prompts for the actual 1099G amount and the 2007 estimated payments, then calculates the correct amount on a separate “Sched A Line 5 Worksheet” and feeds the result into Form 1040 Line 10.
    However, TurboTax has imported our 2007 return, so it (presumably) knows about the dates for those estimated tax payments. TaxAct does not and we have not found a place to enter those dates and amounts.

    We think the workaround is to input a bogus 1099G amount by subtracting the unrecoverable part of the refund ($100 in the IRS example) from the actual 1099G amount ($400 in the IRS example), then also subtracting that amount from the “Prior year state and local estimates” line in the Sched A Line 5 calculations.

    Does TaxAct handle this situation in a manner we have not discovered?

    If not, is our workaround the correct way to handle this situation?

    We were unable to find any TaxAct documentation explaining this situation, but perhaps we were not looking in the right place. Is it documented anywhere, other than in Pub 525?

    Thanks …

    Which generated this reply:

    Dear TaxACT(R) Customer:

    The TaxACT program does not make these calculations.  The work around that you suggested is the easiest solution to this problem.  If you make this adjustment to the 1099-G, you may want to attach a note to the return showing what you did.  To do this:

    Preparer Notes can be used by the paid preparer, electronic return originator or taxpayer to provide additional, voluntary information related to the tax return but NOT required to be attached to it.

    To access these screens in the Online return:
    1. Click on the Federal Q&A tab
    2. Click on Miscellaneous Topics and then Click on Review Topic on the Quick Q&A Topics screen (you will only see the Quick Q&A Topics screen if you have been through the Federal interview questions once already)
    3. Click on Additional Information for Electronic Filing (the last one in the list) and then Click on Continue
    4. Click on the electronic filing information option for your situation and then Click Continue

    This will electronically file with the Federal return, however, will not be transmitted to the state.

    So, basically, unless you happen to be intimately familiar with this bit of tax arcana or you’re using TurboTax, you’ll get sucker punched. As nearly as we can tell, it doesn’t make much difference to the bottom line, but you don’t want to find that out the hard way.

  • Changing the Xubuntu 8.10 GDM Login Splash Screen

    OK, this is frippery and I admit it, but I vastly prefer my login background to theirs

    My GDM background
    My GDM background

    The right way to change the background is to create a whole new gdm theme and then fiddle gdm to use it. Easier than that: tweak an existing theme’s XML file to point to your image.

    The default Xubuntu theme for gdm is in /usr/share/gdm/themes/xubuntu, so cd there. This is a command-line thing …

    The background is stored in, oddly enough, background.png, a 1680×1500 image that doesn’t mind being stretched or cropped or smushed to fit your screen.

    Copy your favorite background image to that folder, perhaps renaming it on the fly:

    sudo cp /path/to/my-new-background.png danger.png

    I don’t know if JPG images will work, as I just saved that screen capture as a honkin’ big PNG; knock yourself out trying other formats.

    Adjust the first stanza in Xubuntu.xml to point at the new background file:

    <!-- background -->
    −
    <item type="pixmap">
    <normal file="danger.png"/>
    <pos y="0" x="0" width="100%" height="100%"/>
    </item>
    

    Squash the Xubuntu logo (in logo.png) so it’s not so obtrusive and move it out of the way of the background text. Modify the stanza that displays the logo file:

    <!-- ubuntu logo -->
    −
    <item type="pixmap">
    <normal file="<strong>logo.png</strong>" alpha="1.0"/>
    <pos x="<strong>50</strong>%" y="<strong>70</strong>%" width="scale" height="<strong>10%</strong>" anchor="n"/>
    </item>
    

    Log out. Enjoy…

    FWIW, replacing the background is far easier in KDE (3.x, at least), which has an actual GUI interface (System Settings -> Advanced -> Login Manager). But, of course, KDE 4.x is on the outs with this dual-screen box.

    And don’t you love those Beware Static Damage warning stickers on the Nostromo’s scuttling control panel?

    Default Xubuntu GDM background
    Default Xubuntu GDM background
  • UUIDs for External USB Drives

    I use an external USB drive to hold daily file-server backups. My backup scripts mount & unmount the drive around the rsnapshot backup, which allows the drive to spin down for most of the day, plus protecting it from random finger fumbles and possible system breakage. Whether that affects the drive’s long-term reliability or not, I cannot say, but it’s been chugging along for a year so far.

    In any event, hotplugging precludes the usual /dev/sd?? notation notation for disk mounting, because the drive tends to have a different device name depending on what’s plugged in. It turns out one of my printers has a USB port for memory gadgets (from whence it can print directly, not that I ever want to) which looks like an unmounted drive which may come up either before or after the USB backup drive.

    Sooo, I must use the drive’s UUID (Univerally Unique ID). Or, more accurately, the filesystem’s UUID, which has some implications.

    Figure out which drive it is by looking in dmesg

    [   18.436000] scsi 4:0:0:0: Direct-Access     Maxtor   OneTouch         0122 PQ: 0 ANSI: 4
    ... snippage ...
    [   18.444000] sd 4:0:0:0: [sdd] 976773168 512-byte hardware sectors (500108 MB)
    [   18.444000] sd 4:0:0:0: [sdd] Write Protect is off
    [   18.444000] sd 4:0:0:0: [sdd] Mode Sense: 2d 08 00 00
    [   18.444000] sd 4:0:0:0: [sdd] Assuming drive cache: write through
    [   18.448000] sd 4:0:0:0: [sdd] 976773168 512-byte hardware sectors (500108 MB)
    [   18.448000] sd 4:0:0:0: [sdd] Write Protect is off
    [   18.448000] sd 4:0:0:0: [sdd] Mode Sense: 2d 08 00 00
    [   18.448000] sd 4:0:0:0: [sdd] Assuming drive cache: write through
    [   18.448000]  sdd: sdd1 sdd4
    [   18.456000] sd 4:0:0:0: [sdd] Attached SCSI disk
    [   18.456000] sd 4:0:0:0: Attached scsi generic sg4 type 0
    

    The sdd1 partition occupies nearly the entire drive and holds the backup files. The sdd4 partition is a tiny FAT thing for the Maxtor utilities that set the spin-down time and suchlike. Every now and then you do need a Windows box, alas.

    Find the UUID by looking in /dev/disk/by-uuid/

    lrwxrwxrwx 1 root root 10 2009-03-21 08:08 069e50dc-1994-47d2-9c7e-0b5179a89041 -> ../../sdd1
    ... snippage ...
    

    Plunk that in /etc/fstab

    UUID=069e50dc-1994-47d2-9c7e-0b5179a89041 /mnt/backup ext2 defaults,noatime,noauto,nodev,noexec,nosuid 0 0
    

    Then I (and, more importantly, my scripts) can mount the drive with a simple sudo mount /mnt/backup regardless of what drive name it sports today.

    The UUID comes from the filesystem written in the partition, so rebuilding the filesystem with mke2fs gives the partition a new UUID; the old entry in /etc/fstab stops working. You can use tune2fs to copy the old UUID to the new filesystem or do as I do: just plunk the new UUID in /etc/fstab.

    The system reads the partition’s UUID when it boots, so regenerate the /dev/disk/by-uuid entry using sudo udevtrigger or replugging the drive (which is awkward because it’s in the basement and I’m upstairs). That also re-jiggers all the hotpluggable devices, which shouldn’t matter, right?

    The reason I use mke2fs rather than sudo rm -rf /mnt/backup is that it takes basically forever to delete a whole drive full of files.

  • Terabyte Backup for the Backup

    Now that terabyte drives sell for under 100 bucks, there’s no longer any reason to worry about backup space. Just do it, OK?

    My file server runs a daily backup (using rsnapshot, about which more later) just around midnight, copying all the changed files to an external 500 GB USB drive. On the first of each month, it sets aside the current daily backup as a monthly set, so I have a month of days and a year of months.

    Roughly once a quarter, I copy the contents of that drive to another drive, empty the file system, and start over again.

    Right now there’s about 380 GB of files on the server, but rsnapshot maintains only one copy of each changed file on the backup drive and we typically change only a few tens of megabytes each day, sooo a 500 GB drive doesn’t fill up nearly as fast as you might think.

    Our daughter’s doing a science fair project involving ballistics and video recording, so she recently accumulated 36 GB of video files in short order… and re-captured the entire set several times. Of course the external drive filled up, so it’s time for the swap.

    Recently I picked up a 1 TB SATA drive and it’s also time to document that process.

    You will, of course, have already set up SSH and added your public key to that box, so you can do this from your Comfy Chair rather than huddling in the basement. You’ll also use screen so you can disconnect from the box while letting the session run overnight.

    Plug the drive into a SATA-to-USB converter, which will most likely pop up a cheerful dialog asking what you want to do with the FAT/NTFS formatted empty drive. Dismiss that; you’re going to blow it away and use ext2.

    Find out which drive it is

    dmesg | tail
    [25041.488000] sd 8:0:0:0: [sdc] 1953525168 512-byte hardware sectors (1000205 MB)
    [25041.488000] sd 8:0:0:0: [sdc] Write Protect is off
    [25041.488000] sd 8:0:0:0: [sdc] Mode Sense: 00 38 00 00
    [25041.488000] sd 8:0:0:0: [sdc] Assuming drive cache: write through
    [25041.488000]  sdc: sdc1

    Unmount the drive

    sudo umount /dev/sdc1

    Create an empty ext2 filesystem

    sudo mke2fs -v -m 0 -L Backup1T /dev/sdc1

    The -v lets you watch the lengthy proceedings. The -m 0 eliminates the normal 5% of the capacity reserved for root; you won’t be running this as a normal system drive and won’t need emergency capacity for logs and suchlike. The -L gives it a useful name.

    Create a mount point and mount the new filesystem

    sudo mkdir /mnt/part
    sudo mount /dev/sdc1 /mnt/part

    You may have to fight off another automounter intervention in there somewhere.

    The existing backup drive is in /etc/fstab for easy mounting by the the rsync script. Because it’s a USB drive, I used its UUID name rather than a /dev name that depends on what else might be plugged in at the time. To find that out

    ll /dev/disk/by-uuid/
     ... snippage ...
    lrwxrwxrwx 1 root root 10 2009-03-17 09:54 fedcdb1c-ec6e-4edc-be35-22915c82e46a -> ../../sdd1

    So then this gibberish belongs in /etc/fstab

    UUID=fedcdb1c-ec6e-4edc-be35-22915c82e46a /mnt/backup ext3 defaults,noatime,noauto,rw,nodev,noexec,nosuid 0 0

    Mount the existing backup drive and dump its contents to the new one:

    sudo mount /mnt/backup
    sudo rsync -aHu --progress --bwlimit=10000 --exclude=".Trash-1**" /mnt/backup/snapshots /mnt/part

    You need sudo to get access to files from other users.

    Rsync is the right hammer for this job; don’t use cp.

    The -a preserves all the timestamps & attributes & owners, which is obviously a Good Thing.

    The -H preserves hard links, which is what rsnapshot uses to maintain one physical copy in multiple snapshot directories; if you forget this, you’ll get one physical copy for every snapshot directory and run out of space on that 1 TB drive almost immediately.

    The -u does an update, which is really helpful if you must interrupt the process in midstream. Trust me on this, you will interrupt it from time to time.

    You will also want to watch the proceedings, which justifies –progress. There’s a torrent of screen output, but it’s mostly just comfort noise.

    The key parameter is –bwlimit=10000, which throttles the transfer down to a reasonable level and leaves some CPU available for normal use. Unthrottled USB-to-USB transfer ticks along at about 15 MB/s on my system, which tends to make normal file serving and printing rather sluggish. Your mileage will vary; I use –bwlimit=5000 during the day.

    You probably want to exclude the desktop trash files, which is what the –exclude=”.Trash-1**” accomplishes. If your user IDs aren’t in the 1000 range, adjust that accordingly.

    How long will it take? Figure 500 GB / 10 MB/s = 50 k seconds = 14 hours.

    That’s why you use screen: so you can shut down your Comfy Chair system overnight and get some shut-eye while rsync continues to tick along.

    When that’s all done, compare the results to see how many errors happen while shuffling the data around:

    sudo diff -q -r --speed-large-files /mnt/backup/snapshots/ /mnt/part/snapshots/ | tee > diff.log

    The sudo gives diff access to all those files, but the tee just records what it gets into a file owned by me.

    You’ll want to do that overnight, as it really hammers the server for CPU and I/O bandwidth. Batch is back!

    That was the theory, anyway, but it turned out the new drive consistently disconnected during the diff and then emerged with no filesystem. A definite disappointment after a half-day copy operation and something of a surprise given that diff is a read-only operation.

    A considerable amount of fiddling showed that running USB-to-USB copies simply didn’t work, even if the drives were on different inside-the-PC USB controllers, with failures occurring around a third of a terabyte. So, rather than debugging that mess, I wound up making copies directly from the file server’s internal drives, which ran perfectly but also ignored the deep history on the backup drive.

    But, eh, I’ve been stashing a drive in the safe deposit box for the last few years, so there should be enough history to go around…