Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BIN/CUE images, "ISO" images and tar.gz archives #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

sjlongland
Copy link

This adds support for distributions in the following formats:

  • Gzipped tar (.tar.gz)
  • BIN/CUE image format
  • "ISO" format (raw SGI disklabel)

Haven't tried booting a SGI machine with this yet (still downloading some of the needed files), but this seems to make the right motions.

Worth noting that SGI boot CDs are _NOT_ ISO-9660.  For those of us used
to 2048-byte sectored discs with a raw ISO-9660 or UDF file systems, SGI
CDs are weird.

They use 512-byte sectors and a SGI disklabel like a SGI hard drive
would.  They have multiple partitions (up to 16), and use the same
file systems as they would on a hard drive.

Typically the convention is:
- 8 is used for general-purpose device file system data
- 9 is the volume header partition, and is used to store the
  layout of the device.  It *must* start at sector 0.
- 11 represents the "whole device"

https://irix7.com/techpubs/007-2825-001.pdf page 6 details all the
various conventions (note IRIX counts partitions from 0 not 1).

Our support just loads from partition 8 without considering other
partitions, since this seems to be the structure used for the foundation
discs.
@sjlongland sjlongland force-pushed the feature/cue-bin-targz branch from 7ddc35b to 82f7983 Compare July 3, 2022 00:33
`losetup` doesn't always trigger a partition scan, so let's just do it
ourselves using `partprobe`.
@sjlongland sjlongland marked this pull request as ready for review July 4, 2022 01:06
@sjlongland
Copy link
Author

Right now, the VM seems to go through the motions of extracting data out of bin/cue images as well as "ISO" images (really, raw SGI disklabel images).

I'm having fun and games with my old SGI RM5200 O2: looks like the fan isn't working, so the machine goes into a thermal shutdown… and sometimes Ethernet doesn't initialise properly (MAC address appears as ff:ff:ff:ff:ff:ff) so clearly the machine needs some TLC to get working properly (the problem is intermittent).

So I'll open this up for others to check out while I get the last bit of working SGI hardware I have working.

@sjlongland
Copy link
Author

Well… I've just gotten rid of the hardware that I was going to test this with. The O2 pretty much died and refused to power on (might just be the PSU) so was unable to try this out.

However, I leave this open for others to try out and report back.

@halfmanhalftaco
Copy link
Owner

hey, thanks for the PR, I guess I hadn't really logged into github in a while and didn't notice this had been submitted. It's been a little while since I've worked on this project but I'll take a look at it.

I did actually write an entire "version 2" of irixboot that eliminates the whole image extraction process and just uses a ton of overlay mounts but I didn't get it to where I was happy with it before moving on to other things.

Sorry to hear that your hardware failed on you. Power supply failure is a common problem unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants