To make space for a Linux installation, I tried to shrink the native MacOS partition that occupied the whole hard disk with the disk utility on macOS Monterey 12.7.6, both in normal and in recovery mode. It always failed:
APFS-Datenstrukturen verkleinern
Fehlercode beim Ändern der Größe des APFS-Containers: 49187
Bei der Größenänderung der Strukturen des APFS-Containers ist ein Problem
aufgetreten. : (-69606)
Aktion fehlgeschlagen ...
As usual with MacOS: The UI looks sleek, but once you try to do something more sophisticated than viewing an image, you'll stumble over unfixable errors.
There were no official documents describing this problem, and the Apple forums were full of "helpful" people repeating the question and then telling the user to reboot.
Solution: umount
A ticket for the Asahi Linux installer had the solution:
- Boot into recovery and open a terminal
- diskutil unmountdisk /dev/disk3
- fsck_apfs /dev/disk3 (and hit y in response to the various prompts)