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

Format m1 disk totally

I tested Asahi Linux on my M1 Mini. Now I want to go back to macOS but that doesn't work. The Mac partition is 60GB in size (to small to instal macOS) and 940GB of empty space that I can no longer approach.

How can I format the disk in such a way so that I can install macOS again.


Anyone an idea how I can do that?


Sincerely

WebHeer

Mac mini, macOS 12.5

Posted on Oct 17, 2022 4:15 AM

Reply
Question marked as Best reply

Posted on Oct 17, 2022 9:54 AM

Where is the 940GB of empty space relative to the Mac partition?

If it is immediately after the Mac Partition in a clockwise direction, you should be able to grab the handle in the Partition pie and rotate around to the end of the free space. That will add the free space to the Mac partition.

Partition a physical disk in Disk Utility on Mac - Apple Support

You may have to do that while started in Recovery.

Use macOS Recovery on a Mac with Apple silicon - Apple Support

There are some instructions for erasing the drive in the Recovery article, if needed.

18 replies
Question marked as Best reply

Oct 17, 2022 9:54 AM in response to WebHeer

Where is the 940GB of empty space relative to the Mac partition?

If it is immediately after the Mac Partition in a clockwise direction, you should be able to grab the handle in the Partition pie and rotate around to the end of the free space. That will add the free space to the Mac partition.

Partition a physical disk in Disk Utility on Mac - Apple Support

You may have to do that while started in Recovery.

Use macOS Recovery on a Mac with Apple silicon - Apple Support

There are some instructions for erasing the drive in the Recovery article, if needed.

Oct 17, 2022 4:55 AM in response to WebHeer

Have the computer evaluated by the Professionals who have the Special Hardware / Software and Expertise to diagnose the issue and offer possible solutions


Having Erased the Entire Drive by any means, especially on Apple Silicon Computers is very risky at Best.


Even the Revive or restore a Mac with Apple silicon using Apple Configurator may not work because the computer can not access the About Startup Security Utility


Oct 20, 2022 9:06 AM in response to WebHeer

Within Disk Utility you need to click "View" and select "Show All Devices" so that the physical SSD appears on the left pane of Disk Utility. I believe your picture is showing you viewing a single partition or Container. It may be better to use the following command in the Terminal app so we can see the complete layout of the drive (the Terminal app is located on the Utilities menu):

diskutil  list  internal


You do need to be extremely careful here because you do not want to erase the whole SSD or delete some of the hidden Containers/partitions since the SSD contains a hidden Container(s)/partitions which are required just to boot the M1 Mac to the special startup screen menu as @P. Phillips mentioned. You should only have to delete just the Linux created partitions, then create a new APFS volume or Container group if necessary.


If you have access to another Mac running macOS 10.15+, then it will be much easier to just "Restore" the firmware on this Mac which will configure the drive automatically and push a clean copy of macOS onto the internal SSD.

Revive or restore a Mac with Apple silicon using Apple Configurator - Apple Support


Oct 21, 2022 8:47 AM in response to WebHeer

You always have the very simple fallback option of using another Mac running macOS 10.15+ to "Restore" the firmware of this Mac which will do all the heavy lifting for you (or have an Apple Store or AASP assist you with the firmware "Restore"):

Revive or restore a Mac with Apple silicon using Apple Configurator - Apple Support


You can also try asking on the Asahi forums for assistance.


While I have worked with drives and partitions a fair amount, I rarely use macOS to manipulate them, nor do I normally customize a macOS setup since macOS doesn't like any surprises from the OS defaults. While macOS provides some of the same utilities as used with Linux, the macOS versions tend to be very old & outdated with far fewer features and abilities. Very few contributors on the Apple forums are familiar with dealing with the more complex partition manipulations and even fewer know much about the M1 Mac drive layouts. Unfortunately the one contributor who is a macOS partition expert, LonerT, has not been seen on these forums for quite some time.


Please let us know how it works out as the information will help us to help others in a similar situation.


Good luck.

Oct 20, 2022 9:56 AM in response to HWTech

> You do need to be extremely careful here because you do not want to erase the whole SSD or delete some of the hidden Containers/partitions since the SSD contains a hidden Container(s)/partitions which are required just to boot the M1 Mac


I do not yet have a Silicon Mac but I am curious if the user really has to be careful not to erase the whole internal disk if it renders the Mac unbootable?


Or does the Disk Utility prevent the user from doing that??


https://tidbits.com/2021/05/27/an-m1-mac-cant-boot-from-an-external-drive-if-its-internal-drive-is-dead/

Oct 20, 2022 10:09 AM in response to Matti Haveri

I recall seeing a post on these forums where a user erased the entire internal SSD on an M1 Mac. That user had to resort to "Restoring" the firmware since the keys used to enter DFU Mode are able to be accessed at a lower level than needing to access the entire startup menu options on an M1 Mac. It is possible that Disk Utility has since been updated to prevent accidentally deleting the critical hidden system area. Plus some people will resort to the command line where those utilities may have no safety net. I have not personally experimented on an M1 Mac yet as I haven't had a spare M1 Mac to risk, nor the time although I do have the curiosity (woe be the M1 Mac when my curiosity gets the better of me).

Oct 21, 2022 8:47 AM in response to WebHeer

You want to make sure not to touch the two "Apple" partitions shown as #1 and #4. Delete the other two partitions listed as "Windows Basic Data" and "Asahi" which are partitions #2 and #3. Or maybe see whether deleting #3 Asahi will allow it to be merged into #2 "Windows Basic Data". I don't know how the layout will look afterwards since macOS tends to do things much differently than Linux and Windows in regards to working with & displaying partitions.


It may be best to see if partitions #2 & #3 can be merged together, plus merging the "free space" area into it as well. I don't usually do a lot of partition manipulations like this with macOS (I usually just split or add them) because Disk Utility and diskutil are really terrible partition manipulators, but they are the only options for correctly creating the disk layout required by macOS.


FYI, it is rare to see a "free space" area on a macOS drive because Disk Utility normally doesn't allow for it since Disk Utility will just make what would be "free space" into another partition, but as you can see the "free space" area is not part of any partition as it has no identifier. I'm not sure how Disk Utility treats this in the GUI in order to select the free space to create a new APFS Container for macOS since actual "free space" is so rare of an occurrence. I would try to see if the #3 Asahi & "free space" areas can be merged into #2 Microsoft Basic Data" even though there is no name for the #2 partition.


The goal is to get the area currently listed as partition #2 & #3 & "free space" together where you can create a new single APFS volume occupying that same space. It may involve using the "Partition" tab in Disk Utility, or it may involve the "Erase" tab in Disk Utility to create the APFS volume/Container, but make sure not to touch either the #1 or #4 Apple partitions since these are required by the M1 Mac.


Here is an article which shows the drive layout for the M1 Macs along with a visual representation (no details on modifications):

https://eclecticlight.co/2021/01/14/m1-macs-radically-change-boot-and-recovery/


You may be able to use the command line utility "diskutil" to deal with the space, but it is a bit confusing to use for manipulating partitions even if you are used to using the Linux command line utilities for modifying partitions. Looking over the "diskutil" options, the best I can see is making partition #2 & #3 into free space and hoping that the Disk Utility GUI can then be used to create an APFS volume by utilizing the free space. I don't see anyway of using the "diskutil" command to creating a volume from the free space since there are no identifiers for the free space and the "diskutil" commands all require an identifier to know what part of the drive to utilize. From the screenshot the following commands should remove partitions #2 & #3 and make it "free space" (according to "man diskutil" and an example at the end of the manual):

diskutil  eraseVolume  free  free  disk0s2
diskutil  eraseVolume  free  free  disk0s3


There is another macOS command line utility, "gpt", which should be able to take that free space and make it into a partition which the Disk Utility GUI should be able to utilize if it cannot work with the "free space" area on its own. I have never used the "gpt" utility for manipulating partitions, although I have used it to restore the backup partition table. According to the gpt "man" pages the following command should create a new APFS partition in the first available free space and utilize all of that free space (in theory):

gpt  add  -t  apfs  disk0


To understand these commands you can view the commands help or manual "man" pages:

man  diskutil
man  gpt


If none of this works, then I would suggest using the Asahi Linux installer to create a partition within the free space. I've never used Asahi Linux yet, but many Linux installers will provide an option for customizing the partition layouts, but Asahi is still a work in progress too. Then boot back into Recovery Mode and use the Disk Utility GUI to properly erase the volume as APFS. You always want to use the tools provided by the OS you want to install to properly configure the boot drive even if Linux tools can do the work as well since only the macOS tools know all the little secrets for what macOS needs to work properly. Same rule applies to every OS.


Oct 21, 2022 4:55 PM in response to WebHeer

I'm guessing that it won't add the partition because one of the other partitions is in use. You may have the chicken & the egg problem here which cannot be solved with macOS.


Did you try using the Disk Utility GUI app to see whether it can create a partition within that free space or perhaps "erase" that free space into an APFS volume?


If you run:

diskutil  list  internal


does it show the "free space" with a "line number" which is really just a partition identifier? If the "free space" line has a number at the left, then we may be able to use the "diskutil" command to create a partition there.


Otherwise, your only two options are to use the Asahi Linux installer to make the free space area into a partition so you can later use the Disk Utility GUI to make it into an APFS Container, or "Restoring" the firmware using the link I provided previously.

Oct 22, 2022 2:48 AM in response to WebHeer

Unfortunately the free space does not have a line number.

I'm going to try to put Asahi back.

I also have the opportunity to search the forum of Asahi for possibilities.

Maybe in the near future there will be a possibility to install linux via a usb stick so that I can try something via disk-util from linux. For now I want to thank everyone for thinking along.

Sincerely

Format m1 disk totally

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