Git Product home page Git Product logo

apmtool's People

Watchers

Peter Hosey avatar  avatar

apmtool's Issues

New command: wrap

This command would take one or more bare volumes (or other data files, such as drivers) and wrap them in an Apple Partition Map.

Options:

  • --format=im4/im5 (default: im5)
  • --default-driver=auto/yes/no: determine whether to automatically add a default driver such as the one from Drive Setup or something (auto=only if no driver partitions are specified)
  • --output=path (default: stdout)

A single argument is taken to be an Apple_HFS partition. (Can we auto-detect other volume types such as ProDOS and switch the partition type accordingly?) Other arguments are parsed as follows:

  • Apple_* (or --partition-type=blah): Partition type for next argument
  • size-spec (or --size=size-spec): Partition size for next argument (default: smallest fitting size)
  • anything else: interpreted as a path to a file containing partition contents (e.g., a bare HFS volume image)

A size-spec not sufficient for the partition contents assigned to that partition is an error.

Any partition type other than Apple_HFS, in a partition map of type IM4, is an error. (For IM4 partition maps, it must be translated to the partition type of 'TFS1'; no other types were defined for that format as far as I know.)

New command: cat

Given one or more raw disk images, create a new partition map containing those partitions in order.

For source images that contain bare volumes, the bare volume will be added as a new (probably Apple_HFS) partition. For source images that contain partitions, those partitions will be added in the same order as in the source.

Options include:

  • --partition-map-format=im5/im4: IM4 partition maps will reject any partitions that aren't of type Apple_Driver (added to the DDB but not the partition map) or Apple_HFS (added to the partition map as 'TFS1').
  • --driver=…: Specify a driver to include in the new partition map. Default is auto: if any source images contain a driver, don't add any new drivers; otherwise, add the default driver. default adds a yet-to-be-chosen driver from the old days (likely from some version of Apple HD SC Setup). none adds no driver partition, like pdisk

New command: unwrap

It should be possible to say “unwrap partitioned-image.img” and get a bare-volume image for every HFS volume in it. (Maybe also every ProDOS, A/UX, etc. volume.)

Possible options:

  • --include-driver-partitions
  • --include-free-partitions
  • --only-volume-labeled=NAME: find a volume whose label is NAME and extract that one, ignoring any volumes not explicitly named (note: functionally requires being able to parse HFS et al, as the partition map often doesn't have the accurate name of the volume)
  • --output-directory=PATH: path to a directory into which to dump the extracted images (default: input-image.out)

The output directory path defaults to the input image's path plus a .out suffix (e.g., images/input.img → images/input.img.out). Files in the output directory are created with names like “partition-number, partition-type—volume-or-partition-name.img”.

(Disambiguation is important because multiple partitions may have the same volume name.)

New command: overwrite-partition

populate partition-number file-path overwrites the contents of some partition with the contents of some file (if the partition's size is greater than or equal to the length of that file).

In particular, you could use this to create a partition map with pdisk, with full control over the extents of the partitions, and then fill the contents of each partition more easily than with dd.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.