mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-14 07:33:30 +01:00
APFS Image Slimming Critical Task #146
Reference in New Issue
Block a user
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).
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 20, 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