I have a file called
BaseSystem.dmg which contains a hfs+ system image as well as other files. I am trying to extract just the hfs+ system image file using
7z from the
I have tried all these commands and others too...
7z x BaseSystem.dmg 7z e BaseSystem.dmg 7z x BaseSystem.dmg 4.hfs
Instead of extracting just the 4.hfs file I either get nothing or 7z goes straight to extracting all files and folders in BaseSystem.dmg.
I am able to use
dmg2img like this and it works...
dmg2img -p 4 -i BaseSystem.dmg -o 4.hfs
But my question is about how do I use the
7z command to extract just the 4.hfs file from BaseSystem.dmg?
I get the same result when I use 7-Zip 19.00 (32 bit or 64 bit) on Windows and also when I use 16.02 (64 bit) on Ubuntu.
I know that this is possible because Boot Disk Utility uses 7-Zip 19.00 (32 ) and IS able to extract 4.hfs from BaseSystem.dmg. However I don't know what parameters it uses. I actually also downloaded 7-Zip 19.00 (32 ) separately for my Windows OS and again when I run it myself it does not extract just the 4.hfs file.
So it must be something about what 7z parameters I am using?