Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I fix my partition issue? Disk utility won't let me do anything.

Hi,


I was messing around with the drive on my mac and now I can't reinstall macos or do anything in disk utility.


I booted to a terminal and this is my disk layout



I'm pretty sure all I need to do is create a new partition on that free space on disk0 but when I try to do anything to disk0 it says it's busy and inuse by the kernel.


Also this is what I see in disk utility



What should I do to fix this?

MacBook Pro (2020 and later)

Posted on Mar 27, 2022 10:04 AM

Reply
Question marked as Best reply

Posted on Mar 27, 2022 8:02 PM

Hi georgecc,


Thanks for the detailed post! The output from "diskutil list" in Terminal was especially helpful.


It looks like you deleted your primary APFS container. You'll need to re-add it back in Terminal using the steps below.


Erasing the entire internal drive on an Apple silicon Mac won't work, because that never truly happens (unless you perform a DFU restore). This is because the iBoot System Container (Apple_APFS_ISC, disk0s1) is system critical; your Mac literally cannot start up without it. The System Recovery Container (Apple_AFPS_Recovery) is also super important; it contains an additional copy of macOS Recovery in case the regular copy gets damaged (or in your case, outright deleted).


To re-add your primary APFS container:


  1. Start up in macOS Recovery, and open Terminal.
  2. Run "diskutil list". Confirm that your internal drive is disk0, and that the Apple_APFS_ISC container is disk0s1.
  3. Run this command to add your primary APFS container in its usual place (between the iBoot System Container and the System Recovery container): diskutil addpartition disk0s1 APFS "Macintosh HD" 0
  4. If successful, the APFS container should be created and use the maximum size available (245 GB). An empty APFS volume named "Macintosh HD" will also be created inside the new container.
  5. Quit Terminal and reinstall macOS.



7 replies
Question marked as Best reply

Mar 27, 2022 8:02 PM in response to georgecc

Hi georgecc,


Thanks for the detailed post! The output from "diskutil list" in Terminal was especially helpful.


It looks like you deleted your primary APFS container. You'll need to re-add it back in Terminal using the steps below.


Erasing the entire internal drive on an Apple silicon Mac won't work, because that never truly happens (unless you perform a DFU restore). This is because the iBoot System Container (Apple_APFS_ISC, disk0s1) is system critical; your Mac literally cannot start up without it. The System Recovery Container (Apple_AFPS_Recovery) is also super important; it contains an additional copy of macOS Recovery in case the regular copy gets damaged (or in your case, outright deleted).


To re-add your primary APFS container:


  1. Start up in macOS Recovery, and open Terminal.
  2. Run "diskutil list". Confirm that your internal drive is disk0, and that the Apple_APFS_ISC container is disk0s1.
  3. Run this command to add your primary APFS container in its usual place (between the iBoot System Container and the System Recovery container): diskutil addpartition disk0s1 APFS "Macintosh HD" 0
  4. If successful, the APFS container should be created and use the maximum size available (245 GB). An empty APFS volume named "Macintosh HD" will also be created inside the new container.
  5. Quit Terminal and reinstall macOS.



Mar 27, 2022 1:28 PM in response to georgecc

georgecc wrote:

I was messing around with the drive on my mac


First, how about if you tell us what you were messing around with and what happened?


Second, you cannot partition the drive when you are already booted into macOS. You can only do it if you are booted directly into Recovery Mode ... and you probably need to use Internet Recovery Mode and run Disk Utility from there. But normally there should be no reason to partition your boot drive, especially if it's only a 256GB SSD.


Your first screen shot looks normal to me. The first partition is your ~256GB drive and it contains ~245 GB free space. From the free space, it looks like macOS is not installed ... In Disk Utility do you see an APFS Container with 2 Volumes inside it (Mac HD and Mac HD-Data)?


See Use macOS Recovery on a Mac with Apple Silicon. Scroll down to the section entitled "Repair your internal storage device" and read/follow the instructions to basically re-set your SSD from scratch. In this sequence you will do a First Aid Repair on each existing Volume; then on each Container; and finally on the full drive. If you do this, follow the instructions exactly as they are written.

Mar 27, 2022 7:57 PM in response to MartinR

MartinR wrote:

georgecc wrote:
I was messing around with the drive on my mac

First, how about if you tell us what you were messing around with and what happened?

Second, you cannot partition the drive when you are already booted into macOS. You can only do it if you are booted directly into Recovery Mode ... and you probably need to use Internet Recovery Mode and run Disk Utility from there. But normally there should be no reason to partition your boot drive, especially if it's only a 256GB SSD.

Based on the screenshots, OP already appears to be booted from macOS Recovery, which makes sense considering that the main APFS container is completely missing.


Also, Apple silicon Macs can't use Internet Recovery at all. Instead, they have up to two additional copies of macOS Recovery installed in the Apple_APFS_Recovery container (which OP is most likely booted into).

Mar 27, 2022 11:12 AM in response to PRP_53

Yes it's a 256GB SSD M1 Macbook pro


I just want to reinstall mac os but I can't because any option on the disk utility just shows an error saying the disk is in use by the kernel.


When I boot the computer the only thing I can do is go to recovery and when trying to reinstall mac os the installer can't even see the disk.


I'm trying to create a partition becasue there is 250GB of free space and I'm assuming the installer can't see it becasue it's not partitioned.


Here is the error I get in disk utility

Mar 27, 2022 2:01 PM in response to georgecc

Good advise from previous poster and suggest following.


Mucking around in areas one may not be familiar with could result in a required visit to the Apple Genius Bar to get things back.


This becomes even more so on the Apple Silicon M1 computes.


Things do not work the same as the Intel units we have all learned on over the year.


That and Apple using a " Sealed and Read Only " Volume that only Apple can allow changes to. It adds additional possible complications.



How do I fix my partition issue? Disk utility won't let me do anything.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.