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

  • Ubuntu 8.10 Server Setup: Tweaks & Glitches

    Having just bumped the basement file server from Kubuntu 7.10 to Xubuntu 8.10, a few notes are in order…

    The general idea was to saw an existing 20 GB partition in half, maintain the existing 7.10 installation, and install 8.10 in the liberated part. The overview:

    • partimage — back up the 7.10 installation in sda6 and the data in sda7
    • resize2fs -p /dev/sda6 5G — squish the filesystem down
    • partimage — save the squished filesystem
    • cfdisk — delete sda6 and create a pair of 10 GB partitions sda6 and sda7
    • partimage — restore the squished filesystem to sda6
    • e2fsck -fv /dev/sda6 — prep it for resizing
    • resize2fs -p /dev/sda6 — expand to fill entire partition
    • tweak /etc/fstab to reflect the fact that sda7 has become sda8
    • reboot and shazam 7.10 started up just fine

    Then install 8.10 in sda7 and configure from there, using the 7.10 installation as a reference to help remember what’s needed.

    The only complication was that the Ubuntu 8.10 mini-ISO install enumerated the USB backup drive as sda, so things got a bit weird; evidently, the USB drive now has the grub MBR. Unplugging that drive, then deploying a bit of grub fu from SystemRescueCD fixed that up:

    • find /boot/grub/stage1 — appears in (hd0,5) and (hd0,6), thus sda6 & sda7
    • root (hd0,6)
    • setup (hd0)

    Then apply the relevant installation info from the series starting there, omitting all the user apps and foo-foos that won’t be needed on the basement box.

    Add useful server programs:

    • nfs-kernel-server
    • xinetd
    • swat

    There’s an authorization bug that may kill local login and sudo, as documented there, triggered when you configure CUPS printers (among other causes). The quick-and-dirty solution seems to be:

    • boot in recovery mode
    • remove samba*
    • install samba
    • install xubuntu-desktop

    It’s worth noting that I’d just finished configuring ssh for public-key logins, so I could get into the box from my Comfy Chair upstairs, but I couldn’t reconfigure anything because sudo segfaulted.

    Create mountpoints, then set up /etc/fstab to automount the various partitions:

    /dev/sda8 /mnt/music		ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
    /dev/sdb1 /mnt/bulkdata		ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
    /dev/sdb2 /mnt/diskimages	ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
    /dev/sdb3 /mnt/userfiles	ext3	defaults,noatime,auto,rw,nodev,noexec,nosuid 0 0
    UUID=069e50dc-1994-47d2-9c7e-0b5179a89041 /mnt/backup ext2 defaults,noatime,noauto,nodev,noexec,nosuid 0 0

    It would be more sensible to use UUIDs for those partitions, but that stuff hasn’t broken yet. If the USB backup drive enumerates as sda again, then I’ll be forced to tweak it.

    Add stanzas like this to /etc/exports:

    /mnt/bulkdata *(rw,async,subtree_check,root_squash,no_all_squash)

    That gets the files served to the other boxes.

    Install Turboprint and tweak the printer drivers accordingly.

  • Zero-dollar Power Screwdriver Repair

    I’m in the midst of cleaning up the shop after a winter of avoiding the too-cold basement. The best way I’ve found to pull this off is to pick up each object, do whatever’s needed to put it away, and move to the next object. Trying to be clever leads to paralysis, so I devote a few days to fixing up gadgets and putting tools back in their places. After a while, it gets to be rather soothing.

    Broken wire in power screwdriver
    Broken wire in power screwdriver

    Some months ago I snagged a power screwdriver from a discard pile; while it didn’t work, un-bending the battery pack connector solved that. It runs from a quartet of AA cells, which means I can use alkalines and it’ll always be ready to go. It’s not a high-torque unit, so I’m using it for case screws and similar easy tasks.

    But it quickly became intermittent and finally would turn only clockwise. Onto the to-do heap it went…

    Power screwdrivers consist of a battery, a motor with a planetary gear reduction transmission, and a cross-wired DPDT switch in between. Not much can go wrong and, if it turns at all, most likely the problem has something to do with the switch or wiring.

    Opened it up, pulled out the motor, and, lo and behold, one of the wires has broken off the switch. As nearly as I can tell, pushing the switch that-a-way forced the solder tab down on the wire and made the connection, pushing it the other way pulled the tab off the wire.

    While I had the hood up, I replaced the wires with slightly thicker and longer ones. Soldered everything back together, mushed the grease blobs back into the planetary gearing, and it works like a champ…

    Now, fairly obviously, there’s absolutely no economic sense to this sort of thing, given that the driver probably cost under ten bucks, but I just can’t stand to see a perfectly good gadget wind up in the trash.

    I’d love to do this sort of thing for a living, if only I could figure out how to avoid going broke while doing so. Maybe I can get me some of that my economic stimulus money that’s sloshing around these days?

  • Bullet Hole in Plate Glass

    Pellet gun hole in plate glass
    Pellet gun hole in plate glass

    Found this hole in the plate glass window of a church.

    The conchoidal fracture pattern is characteristic of a bullet impact at more-or-less right angles to the pane. I suppose, based on the very small entry hole and no damage to the opposite wall, that it was something like a BB gun at close range, rather than a 0.22-cal handgun or rifle far away.

    Somehow, you just know the lunkheads doing this sort of thing have never repaired a window themselves… when you’re a constructor, you just don’t go around destroying things.

    But maybe that attitude marks me as a fuddy-duddy.

  • XFCE Keyboard Mapping: Random Jots

    The multimedia keyboard on this box doesn’t work, which likely has something to do with the fact that I’m running separate X sessions on two monitors. I described what does work on my laptop there.

    Here are some random & incomplete notes, with no good outcome…

    Key and keyboard definitions are in /usr/share/X11/xkb/keycodes with:

    • xfree86 mapping the symbolic name (as in <I1E>) to key number 158
    • inet mapping from XF86AudioRaiseVolume to symbolic name

    The Microsoft Comfort Curve Keyboard 2000 V1.0 (don’t you love how they name things?) seems to be a subset of the microsoftprousb keyboard definition.

    Manually assigning a key works like this:

    xfconf-query -c xfce4-keyboard-shortcuts \
      -p /commands/custom/XF85AudioRaiseVolume \
      -t string
      -n
      --set="amixer -c 0 sset Master 10%+"

    Use xev to find key numbers, which turn out to be more or less common values (contrary to what I initially thought)…

    • Back = 234 I6A
    • Forward = 233 I69
    • Vol down = 174 I2E
    • Mute = 160 I20
    • Vol up = 176 I30
    • Play/Pause = 162 I22
    • Home = 178 I32 XFree86HomePage
    • Search = 299 I65 XFree86Search
    • Email = 236 I6C XFree86Mail
    • Calculator = 161 I21 XFree86Calculator

    The first two keys are defined in nav_common and the rest are in media_common, with the combination in, of course, media_nav_common.

    But none of this actually works.

  • Attention: Patent Litigation Attorneys

    Read that before contacting me; it’ll save us both some time.

    Thanks…

  • Sunglasses Repair: New Hinge Holes

    Milling to remaining hinge plate
    Milling to remaining hinge plate

    With the epoxy cured overnight, I fired up the Sherline CNC mill to poke screw holes in the brass hinge splice.

    The first step was to mill a flat-bottomed hole in the lower surface of the thin brass to expose the threaded hole in the remaining hinge plate. I crunched the end of the frame in a machinist’s clamp, then grabbed that in the Sherline milling machine vise; the frame is upside-down in the picture.

    The brass stock was 0.015 inches, so I milled downward 0.020 inches to get through the epoxy. I’d love to say that worked perfectly, but I had to fiddle around a bit and eventually put a slight divot in the hinge plate.

    That alignment was by pure eyeballometric guesstimation, but poking a small epoxy disk out of the threaded hole revealed that the 2 mm milled hole was centered on the hinge hole. Pretty close. Kinda-sorta. Good enough for my purposes, anyway.

    Laser alignment to hinge hole
    Laser alignment to hinge hole

    I aligned the spindle to the actual hinge hole with my laser aligner, a process that turned out to be surprisingly easy: note where the red dot vanishes on each side of the hole, split the difference, repeat for the Y axis, and you’re done.

    Through-drilling top hole
    Through-drilling top hole

    With the spindle centered, I ran a #60 drill through the threaded hole (which it just barely cleared) and poked a hole in the thicker top plate (which is on the bottom here, remember). The packing under the hinge is a cut-up credit card; a handy source of thin sheets of stiff plastic.

    Then I flipped the frame over and drilled out the top hole with a #54 drill to clear the threads on a 00-90 machine screw. I’d like to say I did a precision alignment job, but what I actually did was chuck that little bitty drill up in my big drill press, run it on the slowest spindle speed (maybe 400 rpm), brace my arms on the table, and feed the frame onto the drill by hand. Works perfectly… if only because I’m enlarging the hole by, what, 7 thou on each side.

    Finished hinge - top view
    Finished hinge – top view

    A bit of filing cleaned up the drill chaff inside the hinge so I could mount the earpiece on the frame and screw it in place. I don’t have a 00-90 tap and wouldn’t use it in a titanium frame anyway, so you can tell this isn’t going to have a happy outcome, but, by and large, the undoubtedly metric threads in the frame did a pretty good job of re-forming the 00-90 brass threads. Ugly, but serviceable.

    Some Dremel-tool work with an itsy grinding wheel on the flexy shaft eroded the back side of the U-shaped brass and new hinge plate to clear the earpiece; I think it only took half a dozen trial fittings & tiny grindings before the earpiece folded properly.

    A dab of low-strength purple Loctite in the threads and I’d say that screw is in there for life!

    Finished hinge - side view
    Finished hinge – side view
    Finished hinge - bottom view
    Finished hinge – bottom view

    Then I cleaned it up with a miniature wire wheel and, hey, it’s got a certain geeky charm, doesn’t it?

    I have my doubts about how well the epoxy affixes itself to the brass, so I suspect I’ll be drilling a hole or two to mechanically lock it in place with some urethane adhesive when it falls off.

    If the remaining hinge plate fractures, however, then the frame is toast.

    Until I get around to having the optical shop dye up another pair, these should suffice for my simple needs.

    Trivia:

    The plastic film on the lenses comes from a big roll of the stuff they use to protect CRT monitors in shipping. Works great for shop projects and, back in the day, I used it when I was hauling monitors around. I think it’d suck the front right off an LCD panel, so I haven’t used much of it lately.

    If you’re following the pictures, you’ll notice that the dsc* numbering series resets right in the middle of the story. That’s where my Sony camera gagged while writing an image and explains why I don’t have pix of the first drilling steps.

    The color balance is weird on the milling machine pix because the shop lights are much cooler than the warm compact fluorescent bulb hovering over the table.

  • Sunglasses Repair: Half a Hinge Is Better Than None

    Broken hinge and brass shim stock repair parts
    Broken hinge and brass shim stock repair parts

    Some years ago I managed to talk one of the local optical shops into stripping the anti-reflective coating off my second-oldest pair of glasses, dunking the lenses in the gray dye pot, then re-coating them. I got a fine set of variable-bifocal sunglasses for 75 bucks; that’s why it took some persuasion. The near vision lens is a bit under my current prescription, but it’s good enough for driving and biking.

    All good things must come to an end: the right-side hinge broke. The bad news is that it’s a titanium frame (can’t be brazed, at least by me) and the whole affair is old enough that it’s not worth sinking a bunch of money into a new frame. This year calls for new glasses anyway, so with any luck they’ll be able to do it again.

    The good news: I can fix this thing with JB Weld epoxy and a few brass bits. So off to the Basement Laboratory, Machine Shop Division, we go…

    Resistance soldering brass parts
    Resistance soldering brass parts

    Fortunately, the unthreaded top hinge plate broke off, leaving the threaded bottom plate intact. The plan: replace the plate with a suitable bit of brass shim stock, solder it to a U-shaped sheet of brass, epoxy the thing to the temple, drill a hole through the new plate, and run a screw into the threaded plate.

    The top picture shows the broken hinge and the tediously cut-and-filed brass parts. The tab on the end of the flat plate fits around the remaining part of the hinge, the upper part is flush against the frame, and most of the plate will be trimmed off.

    Rough-filed hinge splice
    Rough-filed hinge splice

    After demonstrating that my smallest torch can satisfactorily melt tiny bits of brass shim stock, I (tediously) re-cut and re-fit another set of parts, then deployed the resistance soldering gadget I built a while back (and wrote up for Circuit Cellar, Feb / Apr / Jun 2008) and silver-soldered the bits together. I must describe that thing here one of these days; it’s built around a rewired kilowatt-class microwave oven transformer with triac pulse-duty-cycle switching to control the heat.

    A bit of diagonal cutter and file work produced a U-shaped channel that exactly fit over the remaining hinge. The rounded end (in the rear) is too wide, but that’ll get trimmed to fit when it’s in place.

    Aligning earpiece and frame for epoxy
    Aligning earpiece and frame for epoxy

    Wisely is it written that you cannot have too many clamps, which is what I used to build a fixture and align the earpiece with the lens frame to epoxy the hinge splice in place. As is always the case, nothing is square, plumb, true, or parallel. Fortunately, the glasses weigh basically zilch, so after I get the pieces aligned, they won’t shift out of place.

    That done, I worked some JB Weld epoxy into the hinge stub’s crevices, then slipped the splice into place. A small blue clamp applied a bit of pressure to make the friction fit marginally more secure…

    Final clamping overview
    Final clamping overview

    The trick here is to leave the plastic lid with the rest of the mixed epoxy sit on the workbench; if the epoxy in the lid isn’t cured, then there’s no point in moving the glasses and breaking the bond.

    Clamping with epoxy applied
    Clamping with epoxy applied

    Then I let the epoxy cure overnight… when the story continues.