sgi-demos / sgi-efs2tar

Tool to convert SGI efs filesystems to tarballs, with auto generation of tar filenames to make batch conversion easier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

efs2tar

efs2tar is a tool that converts SGI EFS-formatted filesystem images (.iso, .img, .efs) into tarballs. It was based entirely on NetBSD's sys/fs/efs (source).

The Internet Archive has several SGI discs in its collections that are formatted with EFS and a few non-EFS.

This fork adds the following:

  • Generates a .tar filename if no -out parameter is provided, making it easier to run batch conversions, e.g. find iso_directory -name "*.iso" -print -exec efs2tar -in {} \;. The tarball name is generated by replacing the source file extension with .tar. If no extension is found on the source filename, then .tar is simply appended. If the tarball already exists, no action is taken.
  • Makes -in optional, if only an input EFS filename is supplied then -in is assumed, e.g. efs2tar ~/my-sgi-disc.iso.
  • Adds a -check option, to check the validity of an input EFS, e.g. efs2tar -check ~/my-sgi-disc.iso.

Example usage

go install github.com/sgi-demos/efs2tar
efs2tar -in ~/my-sgi-disc.iso -out ~/my-sgi-disc.tar
efs2tar -in ~/my-sgi-disc.iso
efs2tar ~/my-sgi-disc.iso
find iso_directory -name "*.iso" -print -exec efs2tar -in {} \;
find iso_directory -name "*.iso" -print -exec efs2tar -check {} \;

"Edge cases" not covered

  • any type of file other than directories and normal files (which is to say, links in particular do not work)
  • partition layouts other than what you'd expect to see on an SGI-produced CDROM
  • minimal error handling
  • does not verify magic numbers
  • preserving the original file permissions

About

Tool to convert SGI efs filesystems to tarballs, with auto generation of tar filenames to make batch conversion easier.

License:BSD 2-Clause "Simplified" License


Languages

Language:Go 100.0%