
Emulating an old HP-IB disk drive with HPDrive

I pulled out the HP 9000/360 (link to previous article here) and connected the HP-IB cable up to the PC. I ran the HPDrive program and told it to emulate a 7937H 571MB drive and netbooted the 9000 into NetBSD. It wasn’t immediately obvious that NetBSD saw anything, but digging through the logs I found a message that it had identified a 7937H drive with 1116102 blocks and had set it up as /dev/rd0.
I was able to use dd to write some data to the emulated drive and read it back. However since I couldn’t successfully find a way to get NetBSD to format the disk, I got out the HP 150 to see if I could get the HP 150 to format an emulated disk. I hooked up the real 9133D and HPDrive and booted the HP 150. After several attempts to format an emulated 9134H drive and failing I gave up. It either failed during the format, or if I chose a smaller 9134D disk size, it would fail when it started copying files.
After struggling to get the emulated drive to format, I had another idea! Why not hook up the real 9133D and see if I can use dd to make an image of it? I disconnected the 9133D from the HP 150 and hooked it up to the 9000 and booted everything up. The 9000 saw the drive and after a bit of searching to figure out that under NetBSD a raw device is /dev/rd0c I let dd go to it. After several minutes I had a 19 meg file, however dd wasn’t stopping. I force killed dd and examined the file with hexdump. As I paged through it I could see that it had the filenames I would expect, even though somehow the image was larger than the actual drive.
