Archive for the ‘What?!’ Category

Mounting a raw dump (using dd and losetup)

Posted on March 10th, 2009 in What?! | 1 Comment »

I’ve just picked up a DT Research WebDT366 Tablet. I’m in need of a good touchscreen for a CarPC project, and the Lilliputs are a little more expensive than I had hoped to go (Appx, $250.00 on Ebay).

First boot (I'm finishing up the Gentoo Linux Image)

First boot (I'm finishing up the Gentoo Linux Image)

The WebDT366 was only $90 (in fairly good condition), and I figured if I didn’t end up using it for a CarPC (or as simply the touchscreen for the CarPC), I could certainly find something else to do w/ it.

tschak909 has already done a good amount of work getting Linux to run on the device. (http://forum.linuxmce.org/index.php?topic=6663.0). Thankfully it’s x86, so life should be a little easier when building custom images.

Wanting to know what packages and configuration Thom has used in his installation, I needed a way to mount the raw disk image (http://www.localeconcept.com/private/webpad-beta2.dd.bz2). Googling didn’t get me at the exact answer, but it got me close enough to figure it out.

First off, use losetup and and offset (flagged by -o).  When running “file” on the image, you’ll see something like this:

lennybruce ~ # file /tmp/webpad-beta2.dd
/tmp/webpad-beta2.dd: x86 boot sector; partition 1: ID=0×83, active, starthead 1, startsector 63, 1023057 sectors

As you can see, partition one starts at sector 63. (512 bytes * 63 = 32256). Having this information, mounting is easy:

lennybruce ~ # losetup -o 32256 /dev/loop0 /tmp/webpad-beta2.dd
lennybruce ~ # mount /dev/loop0 /mnt/loop
lennybruce ~ # ls /mnt/loop/
bin   cdrom  etc   initrd      lib         media  opt   root  selinux  sys   tmp  var
boot  dev    home  initrd.img  lost+found  mnt    proc  sbin  srv      temp  usr  vmlinuz
lennybruce ~ #

That’s it for mounting a raw disk image. Using the information Thom has provided in his image (video driver, input drivers, etc)… I’m building a custom Gentoo image that will hopefully be the basis or front-end of a CarPC.

Unable to bind to the destination server in DNS

Posted on January 20th, 2009 in What?! | No Comments »

Ok, so this error message has been a royal PITA for me today. I’ve ran through numerous MS Knowledgebase articles, multiple forums, and all to no avail. The problem arose when an ASP script using CDONTs to send mail ended up placing all messages in the “Queue” directory… with no further processing. The solution: Live life by packet captures.

Oh, and make sure you’re reading them correctly.

It turns out Windows 2000 server (used for a webserver in this instance), performs DNS queries via TCP instead of UDP. The DNS servers that it was configured to use apparently had some issue – made evident by numerous TCP retransmits, and no actual query responses in any packet captures. Of course, nslookup uses UDP for DNS resolution – and UDP requests resolved fine.

Dig supports tcp queries using the +tcp flag. A simple query made it obvious that things were borked:

kovacs2 ~ $ dig +tcp -t a www.braindeadprojects.com @goofyassednameserver

; <<>> DiG 9.5.0-P2 <<>> +tcp -t a www.braindeadprojects.com @goofyassednameserver
;; global options: printcmd
;; connection timed out; no servers could be reached

I’ve scoured the net looking for a way to set Win2k to only use UDP DNS queries, to no avail. The real solution though is to fix the nameservers, which restarting the service did without issue.

I really wasted WAY too much time on this dumb issue. In retrospect, I would have installed Wireshark sooner, and performed a more controlled packet capture. Part of my problem was that I was actively using nslookup during packet captures, and not reading the captures thoroughly.

Request,response,request,response, request, response… all the while not noticing that TCP requests never received a response. RTFPcaps friends!

Embedded Devices and JTAG

Posted on August 15th, 2008 in What?! | No Comments »

Take a look at Mike Anderson and JTAGs. This is a really enlightening explanation of how to debug embedded linux devices w/ JTAG support, and it gives some great pointers for writing linux device drivers.

Mike Anderson is the Chief Scientist for The PTR Group, Inc. and really knows embedded linux devices. I didn’t get to attend the conference, actually I stumbled across this while working with the Linksys WRT54G-TM device.

The 54G-TM is a T-Mobile branded device, that apparently was (or maybe still is) sold by T-Mobile along w/ their WiFi capable phones. I guess the idea was that if you were within range of your 54G-TM, the call would run ala VOIP, otherwise it would use the actual cell network.

The device is great – the board layout has pads that male headers can be easily soldered onto. HairyDairyMaid includes schematics for a parallel port based JTAG cable, which can then be used to install DD-WRT, or whatever.

(If you look at the lower portion of the board you’ll see where JTAG headers are soldered)

As far as I can tell, using JTAG to directly write to flash is the only way to upload the firmware to the device. (TFTP and HTTP both fail). This 54G-TM also has a cpu fan soldered to the board and a heatsink installed on the CPU. (I didn’t do this myself, I actually bought this one that way. I have added headers to the other 4 I have, and flashing a 7.7M image of DD-WRT took 25423 seconds to complete on each device.)

Watch the video, it’s enlightening and Mike’s got a good sense of humor.

Magic isn’t real.

Posted on July 19th, 2008 in What?! | No Comments »

So, I’m in the process of moving – again.

I found it rather amusing the other day to see my current apartment listed on Craigslist as being “cozy”. A quick google search to define “cozy” returns an appropriate definition of “oversized dog house”.

Yeah, it’s small. Really small. So small that when I bought a small love-seat, it took forever to squeeze it through the entryway and up the flight of stairs to the ONE ROOM abode. And that room was basically the size of a large walk-in closet.

Ok, whine, whine, whine… what does this have to do with software or hardware projects? Well, getting the love-seat OUT of the apartment turned into a hard project. A REALLY HARD PROJECT. Here’s what happened:

I paid the guy that helped me move it in $40.00 to help me get it out. “If we got it in, we can get it out.” But after 45+ minutes of trying to get the P.O.S. back to the stairway, it became evident that this was a task that required some serious mathematics.

I’m not like John Nash in “A Beautiful Mind”. I’m more like Son in “Shotgun Stories”. (“I can divide up to 4 decimal spaces”.) So when the suggestion “Well, I’ve got a circular saw in the truck” came up, I knew we only had 1 solution.

Before:

Before...

After:

After...

And so now I’ve got to pay another $40.00 to have the carcass disposed of. (BTW, I love how it appears that Dylan is sadly walking thru some sort of furniture holocaust)

It’s practically an antique computer museum…

Posted on July 12th, 2008 in What?! | No Comments »

Being the nostalgic person I am, over the past 10 years I’ve accumulated a large number of old computers – everything from the Timex Sinclair 1000, TRS-80 COCO’s, and of course a Commodore 64 or 128…

The Commodore was interesting – I remember playing Exodus Ultima III, and BC’s Quest for Tires/Grogs revenge – and using this amazing “Turtle Graphics”(?) animation tool. Years before my last long-distance move, I got my hands on 5+ boxes of Commodore software from an old collector.

There’s a lot of stuff there, A LOT. A lot of games, but one of the more interesting items was the entire COMAL suite, with full documentation.

I’m using the past-tense because I found a new home for the C128 this weekend. I also offloaded an Amiga 2000. I’m tired of moving around and lugging all kinds of stuff I never use. So… anyone interested in a PowerMac 7215 running Yellow Dog Linux – it’s in need of a new home as well – AND SOON.

Toad Hall Ancient

Posted on July 11th, 2008 in What?! | No Comments »

Long, long, long ago I worked in the realm of Tech Support…. take a look over at the links for “Toad Hall Ancient” (it’s a reference to the very first ISP, many, many years ago)

While I tend to think that most everything over there is old and outdated, the sad fact is that there are a number (4, maybe 5) of people out there still running Windows 2000, 98, or CP/M. The screenshot project (which isn’t my work, aside from a couple small additions), provides a good visual layout of these OS GUI’s.

Still have a Dialup modem? There’s init strings over there somewhere too.

I’m sure something over there is of interest to someone. Enjoy.

Site Launch…

Posted on July 11th, 2008 in What?! | No Comments »

After years of scouring for answers to various things, and not contributing anything back… we now have BrainDeadProjects.

In the near future, I’ll be contributing various finds from my many ongoing projects. At the moment, I’m actively working with RTL8186 boards, building a Sebek/Argos/UML/homebrew web-based honeypot monitoring system, completely destroying my home plumbing, and rewriting a corporate website.