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

Partition map rewriter #61

Open
boredzo opened this issue Mar 1, 2024 · 2 comments
Open

Partition map rewriter #61

boredzo opened this issue Mar 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@boredzo
Copy link
Owner

boredzo commented Mar 1, 2024

There are two cases in which impluse may need to make changes to a partition map:

@boredzo boredzo added the enhancement New feature or request label Mar 1, 2024
@boredzo
Copy link
Owner Author

boredzo commented Mar 1, 2024

One thing that may be important/necessary is including a driver in the rewritten partition map.

My default inclination is to transfer any and all drivers from the original partition map. When it's an IM5 partition map and we're just resizing a partition, that should be fine. When it's an IM4 partition map, that may get trickier—a driver included in an IM4 partition map might try to read the disk's partition map, and panic (or, worse, corrupt data) if the partition map is in a different format.

@boredzo
Copy link
Owner Author

boredzo commented Mar 7, 2024

One consequence of this is that the converter should not simply copy any bytes before and after the volume. Those should be left to the partition map copier/rewriter to copy anything not in a partition or in a non-HFS partition.

Also part of this work: Finally deciding what impluse does for multiple HFS partitions. My guess is going to be to convert all HFS partitions by default, maybe with an option like --only-partition[s] that specifies one or more partitions by either order in the partition map, partition name, or volume name.

Possible optional syntax: <partition type>:<partition/volume name>. Like, Apple_HFS:Macintosh HD. Dunno if there's a need for that.

Also, partition: and volume: prefixes before partition/volume names, with p: and v: accepted as synonyms. So the partition-spec syntax would be (?P<partition_type>[^:]+:)?(?P<key_prefix>(?:partition|p|volume|v):)?(?P<name>.+). Valid partition-specs would include Macintosh HD, v:Macintosh HD, Apple_HFS:Macintosh HD, and the fully-qualified Apple_HFS:v:Macintosh HD.

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

No branches or pull requests

1 participant