IRIX and Software

TIP: .sw/.idb distribution image format

So, I had a unique problem yesterday.
I only had Install Tools Supportfolio overlay sets, not real CDs.
And the Install Tools overlay sets don't have a stand directory, and therefore don't have fx.
So I did a little poking around, and learned that fx can be found in the eoe set.
The problem? I don't have a working IRIX host at the moment, so I found myself without inst.

So I did a little looking.
For each distribution set there's a simple .idb file which contains, in plaintext, offsets and compressed sizes (CMPSIZE).
Then, the .sw file contains the data associated with each file, compressed using the oldschool BSD compress utility (the one from the 80s).
So all you've got to do is:
1) Open up the .idb file in a text editor, and search for the file you're looking for (telling fx from fx64 takes a minute, because fx64 is also named just fx, but you can figure it out). Find the OFFSET= and CMPSIZE= lines.
2) Go to this OFFSET (it's in bytes) in the .sw, using a hex editor. Look for the filename (it should be a few bytes after the OFFSET= value).
3) Copy out CMPSIZE bytes *AFTER* the FILENAME (the area you're copying, if you're doing it right, should start with 1f 9d, the magic numbers for compress files) into a new file with extension .Z i.e. fx.Z (be *sure* to copy and count bytes starting from 1f 9d / right after the filename, NOT right after the offset, or you'll get a truncated file. uncompress will still uncompress it without error, and then you'll be in a world of confusion as everything barfs on a file you thought was correct).
4) Run uncompress on the .Z file you just got.

Ta-da! There's a file, extracted from a .sw/.idb distribution set. Not *too* hard, was it?
Nice one! :D
Ok, I've wrote a small C program to extract a file.

http://linkefong.free.fr/downloads/misc ... wextract.c

I tested it on fx.64 of my 6.5.30 overlays and it works. My fuel is re-installing right now!

Right after the offset, there's two bytes (big endian) with the size of the file name (not \0 ended), which can contain directory path.
Then we have the .Z file.
anotherlin wrote: Ok, I've wrote a small C program to extract a file.

There's a program named 'midb' that does exactly this, but works for older IRIX releases. I think I dug it up as a shar file from the comp.sys.sgi archives, but who knows ...

I'd like to reverse engineer the product descriptor file once, then I could write my own gendist. This is relevant for pre-IRIX5.3 systems, for which this utility was never released.
To accentuate the special identity of the IRIS 4D/70, Silicon Graphics' designers selected a new color palette. The machine's coating blends dark grey, raspberry and beige colors into a pleasing harmony. ( IRIS 4D/70 Superworkstation Technical Report )
jan-jaap wrote: There's a program named 'midb' that does exactly this, but works for older IRIX releases. I think I dug it up as a shar file from the comp.sys.sgi archives, but who knows ...


Why haven't you told me before ? I wouldn't have written this crappy program, if there was already one doing it right...

:evil:
Hahah man, I could have avoided going thru this entire process...

I guess you learn about a new tool every day :)
Anyone have a copy of swextract.c ?
The link in this thread is dead:
http://linkefong.free.fr/downloads/misc ... wextract.c

Thanks,
-Kevin
Here's a link to the 'midb' program mentioned above: http://persephone.cps.unizar.es/~spd/src/other/mydb.c
Looks like it will need some updating for modern systems, but should work on your Power Series and older!
:A350R: :Onyx2: :4D220VGX: :Indigo: :Octane2: :O2: :Indigo2IMP: :O3x0: :Indy: