mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2024-12-01 23:02:21 +08:00
Add APFS extraction instructions.
This commit is contained in:
parent
4e41e2bc08
commit
54774ab91e
39
README.md
39
README.md
@ -961,6 +961,45 @@ docker run -it \
|
|||||||
|
|
||||||
See also: [here](https://github.com/sickcodes/Docker-OSX/issues/222).
|
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
|
### USB Passthrough
|
||||||
|
|
||||||
Firstly, QEMU must be started as root.
|
Firstly, QEMU must be started as root.
|
||||||
|
Loading…
Reference in New Issue
Block a user