diff options
| author | sickcodes <[email protected]> | 2021-05-28 22:21:57 +0000 |
|---|---|---|
| committer | sickcodes <[email protected]> | 2021-05-28 22:21:57 +0000 |
| commit | 54774ab91e90939c96804ba23800702ed5a9af8b (patch) | |
| tree | 8a8703cbdbf40530f6f3346c781d0ca870a8b64a | |
| parent | Fix hero image cache. (diff) | |
| download | docker-osx-54774ab91e90939c96804ba23800702ed5a9af8b.tar.xz docker-osx-54774ab91e90939c96804ba23800702ed5a9af8b.zip | |
Add APFS extraction instructions.
| -rw-r--r-- | README.md | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -961,6 +961,45 @@ docker run -it \ See also: [here](https://github.com/sickcodes/Docker-OSX/issues/222). + +#### Extracting the APFS disk on Linux + +In Docker-OSX, we are using `qcow2` images. + +This means the image grows as you use it, but the guest OS thinks you have 200GB available. + + +**READ ONLY** + +```bash +# mount the qemu image like a real disk +sudo modprobe nbd max_part=8 +sudo qemu-nbd --connect=/dev/nbd0 ./image.img +sudo fdisk /dev/nbd0 -l + +mkdir -p ./mnt +sudo mount /dev/nbd0p1 ./mnt + +# inspect partitions (2 partitions) +sudo fdisk /dev/nbd0 -l + +# mount using apfs-linux-rw OR apfs-fuse +mkdir -p ./part + +sudo mount /dev/nbd0p2 ./part +sudo apfs-fuse -o allow_other /dev/nbd0p2 ./part + +``` + +When you are finishing looking at your disk, you can unmount the partition, the disk, and remove the loopback device: + +```bash +sudo umount ./part +sudo umount ./mnt +sudo qemu-nbd --disconnect /dev/nbd0 +sudo rmmod nbd +``` + ### USB Passthrough Firstly, QEMU must be started as root. |