mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-04-27 00:25:48 +03:00
[GH-ISSUE #210] APFS Image Slimming Critical Task #146
Labels
No labels
bug
documentation
enhancement
following upstream developments
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Docker-OSX#146
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sickcodes on GitHub (Mar 18, 2021).
Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/210
Big Sur is using APFS only...
Failed (read only)

APFS mountable in Linux but READ ONLY
Therefore it must be done inside OSX.
Secondly, Big Sur must be used to mount Big Sur
How to mount Big Sur writable:
Boot into recovery mode with two disks https://github.com/sickcodes/Docker-OSX#mount-a-disk-inside-osx-from-the-host
Disable SIP
Log into Big Sur good one
Unmount the only other disk that you can unmount in disk utility.
Sometimes it's disk3 disk4 or disk5
Remount as writable, as shown below thanks to https://mobile.twitter.com/ebadtweet/status/1275454103900971012
The partition to remount is always s2
sudo mount -o nobrowse -t apfs /dev/diskNsM /path/to/mntpointcd your mountpoint
ncduis handy for finding large files today deleteAfter finishing, create a snapshot and reboot
sudo bless --folder /path/to/mntpoint/System/Library/CoreServices --bootefi --create-snapshotHowever this image will not shrink when using https://github.com/sickcodes/Docker-OSX#how-to-reduce-the-size-of-the-image
This is crucial for development as we need much smaller images, 40GB is unwieldy for security research and takes even a few minutes on a good SSD to copy it.
@sickcodes commented on GitHub (Mar 18, 2021):
Ultimate
Okay
Fail
Not sure
@Diassico commented on GitHub (Mar 18, 2021):
@sickcodes commented on GitHub (Mar 19, 2021):
Reasonable explanation for 40GB image lol!
@sickcodes commented on GitHub (Mar 19, 2021):
Testing non-qcow images currently!
EDIT: useless code below do not use!
FAIL READ ONLY
Boot two disks
Installing now...
@sickcodes commented on GitHub (Mar 19, 2021):
Image can be shrunk later, using a second disk's Big Sur image.
Must be done on another Big Sur.
And must be done on a separate disk as above code because you can't resize while you're booted off recovery EFI disk.
@sickcodes commented on GitHub (Mar 20, 2021):
Got it down to 17GB, will be adding
:big-sur-autoor:auto-big-surshortly, or just name it both lol