Announcing scsi2sd_to_hda, a quick and dirty script I wrote to convert SCSI2SD images to .hda files compatible with RASCSI/BlueSCSI

dburr

Member
Recently I finally finished restoring my beloved SE/30. I'm a major Unix geek, and I have dreamed of being able to run A/UX on one of my machines. Unfortunately, during its heyday, it was way beyond my starving-student budget. Recently I found the A/UX SCSI2SD easy install and wanted to give it a try... but I didn't have a SCSI2SD. So I dug into it and figured out that the XML file contains offsets to the various SCSI "devices" in the SD card image file. And I hacked together a script that parses the XML and splits out the various SCSI devices into their own .hda files that I could use with my RASCSI and/or BlueSCSI. ;-)

Get it here!
 

chillin

Well-known member
If that's what you call "quick and dirty," I'd like to see your idea of leisurely and clean. It's a neat script. Unless I missed something, it's coded entirely with bash builtins. Though I don't think echo is builtin to Bourne, I bet it'd even work on A/UX sh without modification, though the conversion would be very slow across the SE/30 SCSI bus.

bah, I missed cut and dd. And I was looking for dd. Still neat, and I still think it'll run on A/UX, not that anyone would want to
 
Last edited:

dburr

Member
If that's what you call "quick and dirty," I'd like to see your idea of leisurely and clean. It's a neat script. Unless I missed something, it's coded entirely with bash builtins. Though I don't think echo is builtin to Bourne, I bet it'd even work on A/UX sh without modification, though the conversion would be very slow across the SE/30 SCSI bus.

bah, I missed cut and dd. And I was looking for dd. Still neat, and I still think it'll run on A/UX, not that anyone would want to
Thanks :) I was trying to find a way of doing this with the minimal amount of external tools (there are a few xml parsers I could have used) and I was able to come up with a kinda hacky (but it works ;-) ) way of doing it completely within bash.
 

shirsch

Well-known member
I'm able to mount the larger extracted image (HD1..) from my A/UX boot drive but fsck reports it as badly damaged. Anyone else see this issue? It does mount without complaint and I'm able to see the contents. Is it possibly too large for the OEM fsck tool to handle properly?
 

Huxley

Well-known member
I just wanted to pop into this old thread and say a big loud THANK YOU to @dburr for making and sharing this awesome tool! I recently swapped out a failing SCSI2SD device for a BlueSCSI in my NeXT Computer (aka Cube) but had no way to recover the multiple partitions of apps and tools that were on the SCSI2SD's MicroSD card.

Unfortunately, the only modern Mac I have access to currently is heavily locked down (it's a work computer with some intense MDM software installed), so doing the conversion there was a no-go. Given this, I set up an Ubuntu virtual machine in VirtualBox on my PC, so I'd at least have an unrestricted Linux environment to use for this project.

Because the SCSI2SD's card doesn't have any volumes or partitions that a modern computer can make sense of (it's literally a bunch of raw data dumped onto the card), I could not get it working with this script in my VM. I did manage to make a raw "dd" type image file of the MicroSD card, which was a big step in the right direction.

Using this tool was an ordeal for a non-Linux person like me, but after much trial-and-error and many confused Google searches, I got it to work and it elegantly and swiftly created separate, correctly-named HDA images from the 'raw data' on the MicroSD card. Amazing!

Here's a Pro Tip for anyone doing this who (like me) isn't a Linux wizard: if you're going to do this from Ubuntu like I did, you can't just invoke the script - you have to literally type the word "bash" before the script name, image name, and XML file. Also, you might find that your life is easier if you remove any spaces from the filenames of the script, your image, and the XML file. Here's a screenshot of the output once I got it working - I hope this helps someone else down the road!
SCSI2SD_to_HDA working.jpg
(note that "rob" is the name of the MicroSD card image I created with the "dd" tool - it's named after Rob Blessin, the awesome NeXT vendor who sold me the original SCSI2SD setup loaded with software)
 
Top