macOS Ventura 13.0.1: diskutil error
See original GitHub issueI have disabled timemachine via the commandline, since the GUI option is no longer available in macOS Ventura:
sudo tmutil disable
Nonetheless, the installer fails when shrinking the macOS partition to 400 GB.
11-14 13:36 root DEBUG run: diskutil (‘mount’, ‘disk3s2’) 11-14 13:36 root DEBUG process output: b’Volume Preboot on disk3s2 mounted\n’ 11-14 13:36 root DEBUG get: diskutil (‘info’, ‘-plist’, ‘disk3s2’) 11-14 13:36 root INFO mounts[Preboot]: /System/Volumes/Preboot 11-14 13:36 root DEBUG run: diskutil (‘mount’, ‘disk3s3’) 11-14 13:36 root DEBUG process output: b’Volume Recovery on disk3s3 mounted\n’ 11-14 13:36 root DEBUG get: diskutil (‘info’, ‘-plist’, ‘disk3s3’) 11-14 13:36 root INFO mounts[Recovery]: /Volumes/Recovery 11-14 13:36 root DEBUG run: diskutil (‘mount’, ‘disk3s1’) 11-14 13:36 root DEBUG process output: b’Volume Macintosh HD on disk3s1 mounted\n’ 11-14 13:36 root DEBUG get: diskutil (‘info’, ‘-plist’, ‘disk3s1’) 11-14 13:36 root INFO mounts[System]: /Volumes/Macintosh HD 1 11-14 13:36 root DEBUG run: diskutil (‘mount’, ‘disk3s5’) 11-14 13:36 root DEBUG process output: b’Volume Data on disk3s5 mounted\n’ 11-14 13:36 root DEBUG get: diskutil (‘info’, ‘-plist’, ‘disk3s5’) 11-14 13:36 root INFO mounts[Data]: /System/Volumes/Data 11-14 13:36 root INFO Trying SystemVersion.plist… 11-14 13:36 root INFO Version: 13.0.1 11-14 13:36 root INFO Admin users: [‘fred’] 11-14 13:36 root INFO BootPolicy[coih] = None 11-14 13:36 root INFO BootPolicy[nsih] = 4FD451AA85CDEAB99202CEA6801302120099A975D9A61646823706DDD64FF0B0B15914EC7A43C35B8BA12A84D66B6A12 11-14 13:36 root INFO Found [[1mMacintosh HD[m] [1;32mmacOS v13.0.1[m [disk3s1, 6DE7E5CF-A7BD-40E3-AF30-9144DD0C6658] 11-14 13:36 root INFO OSEnum.collect_recovery(part=disk0s3) 11-14 13:36 root INFO Found SROS: recoveryOS v13.0.1 [Primary recoveryOS] 11-14 13:36 root INFO Checking resizability of disk0s2 11-14 13:36 root INFO Has OS 11-14 13:36 root INFO Min space required: 38500000000 11-14 13:36 root INFO Free space: 217093931008 11-14 13:36 root INFO Can resize 11-14 13:36 root INFO Checking resizability of disk0s3 11-14 13:36 root INFO Has OS 11-14 13:36 root INFO Min space required: 38500000000 11-14 13:36 root INFO Free space: 3689537536 11-14 13:36 root INFO Cannot resize 11-14 13:36 root INFO MSG: Partitions in system disk (disk0): 11-14 13:36 root INFO MSG: [1m1[m: APFS [Macintosh HD] (494.38 GB, 6 volumes)[m 11-14 13:36 root INFO MSG: OS: [[32mB[m[1m[m] [[1mMacintosh HD[m] [1;32mmacOS v13.0.1[m [disk3s1, 6DE7E5CF-A7BD-40E3-AF30-9144DD0C6658][m 11-14 13:36 root INFO MSG: [1m2[m: APFS (System Recovery) (5.37 GB, 2 volumes)[m 11-14 13:36 root INFO MSG: OS: [ ] recoveryOS v13.0.1 [Primary recoveryOS] 11-14 13:36 root INFO MSG: [[32mB[m ] = Booted OS, [[33mR[m ] = Booted recovery, [[31m?[m ] = Unknown[m 11-14 13:36 root INFO MSG: [ [1m[m] = Default boot volume[m 11-14 13:36 root INFO MSG: Using OS ‘Macintosh HD’ (disk3s1) for machine authentication. 11-14 13:36 root INFO Current OS: Macintosh HD / disk3s1 11-14 13:36 root INFO MSG: Choose what to do: 11-14 13:36 root INFO MSG: [1mr[22m: Resize an existing partition to make space for a new OS[m 11-14 13:36 root INFO MSG: [1mq[22m: Quit without doing anything[m 11-14 13:36 root INFO MSG: [1;37m»[1;36m Action ®: [m 11-14 13:36 root INFO INPUT: ‘r’ 11-14 13:36 root INFO Has OS 11-14 13:36 root INFO MSG: We’re going to resize this partition: 11-14 13:36 root INFO MSG: APFS [Macintosh HD] (494.38 GB, 6 volumes) 11-14 13:36 root INFO MSG: Total size: [m494.38 GB[m 11-14 13:36 root INFO MSG: Free space: [m217.09 GB[m 11-14 13:36 root INFO MSG: Minimum free space: [m38.00 GB[m 11-14 13:36 root INFO MSG: Minimum total size: [m315.29 GB (63.77%)[m 11-14 13:36 root INFO MSG: Enter the new size for your existing partition: 11-14 13:36 root INFO MSG: You can enter a size such as ‘1GB’, a fraction such as ‘50%’, 11-14 13:36 root INFO MSG: or the word ‘min’ for the smallest allowable size. 11-14 13:36 root INFO MSG: Examples: 11-14 13:36 root INFO MSG: 30% - 30% to macOS, 70% to the new OS 11-14 13:36 root INFO MSG: 80GB - 80GB to macOS, the rest to your new OS 11-14 13:36 root INFO MSG: min - Shrink macOS as much as (safely) possible 11-14 13:36 root INFO MSG: [1;37m»[1;36m New size (min): [m 11-14 13:36 root INFO INPUT: ‘400GB’ 11-14 13:36 root INFO MSG: Resizing will free up 94.39 GB of space. 11-14 13:36 root INFO MSG: Note: your system may appear to freeze during the resize. 11-14 13:36 root INFO MSG: This is normal, just wait until the process completes. 11-14 13:36 root INFO MSG: [1;37m»[1;36m Continue? (y/N): [m 11-14 13:36 root INFO INPUT: ‘y’ 11-14 13:36 root DEBUG run: diskutil (‘apfs’, ‘resizeContainer’, ‘disk0s2’, ‘399999238144’) 11-14 13:36 root INFO MSG: Failed to run process: diskutil apfs resizeContainer disk0s2 399999238144 11-14 13:36 root ERROR Process execution failed Traceback (most recent call last): File “/private/tmp/asahi-install/main.py”, line 852, in <module> InstallerMain().main() File “/private/tmp/asahi-install/main.py”, line 704, in main while self.main_loop(): File “/private/tmp/asahi-install/main.py”, line 824, in main_loop return self.action_resize(parts_resizable) File “/private/tmp/asahi-install/main.py”, line 635, in action_resize self.dutil.resizeContainer(target.name, val) File “/private/tmp/asahi-install/diskutil.py”, line 208, in resizeContainer self.action(“apfs”, “resizeContainer”, name, size, verbose=2) File “/private/tmp/asahi-install/diskutil.py”, line 38, in action subprocess.run([“diskutil”] + list(args), check=True) File “/private/tmp/asahi-install/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py”, line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command ‘[‘diskutil’, ‘apfs’, ‘resizeContainer’, ‘disk0s2’, ‘399999238144’]’ returned non-zero exit status 1. 11-14 13:36 root INFO MSG: If you need to file a bug report, please attach the log file: 11-14 13:36 root INFO MSG: /private/tmp/asahi-install/installer.log
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
The main reason I haven’t done it yet is so that it doesn’t wipe old logs too easily, but it would also require flipping around the current flow because right now the installer is untarred as the user and sudo is called later, calling a script that came from the tar. It might be best to just move old asahi-install folders out of the way into a timestamped name (which should always work as they should be owned by the current user, without needing sudo), instead of deleting them altogether.
I wiped the asahi-install folder and switched to 420GB and it worked just fine. This message is send from Asahi Linux now 😃
If you don’t mind, I would like to implement this automatic wiping of the install folder when running the a installer from a different branch (main/dev) and open a PR during this week.