You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Accidentally Erased Partitions, Now have black screen with White Folder with ?

Hey everyone. I'm in quite the pickle here. I feel I may have accidentally done something really bad and need some help.


I have an older 2014 MacBook Air 13" with Big Sur. I wanted to try out Linux on it, since Apple is no longer releasing security updates for it, so I could continue using this laptop for years to come.


Long story short (because this part doesn't matter as much), I had to create some partitions in the drive, so that I could install Linux PoP OS. It had me create a Root, Swap, Home and Recovery partition. Most were smaller, in the 8-15GB range, with only 2 of them being larger. I also went into my Mac Disc Utilities and dragged the drive to create a 350GB partition (out of a total of 500GB), so that there was room for the Linux partition. Then I went through all the Linux instructions on how to create these partitions and it went perfectly. I did this about 2-3 weeks ago and have had ZERO problems using the Mac side or the Linux side by booting up and holding down Option to get to the Mac startup boot menu. I would select the drive I wante and voila, I'm in Mac or Linux.


Ok, now onto the beginning of the bad. One day, I'm using the Linux side and my old battery just shuts off the computer. It happens ALL the time and nothing bad has EVER happened because of it. It's the original battery and gets maybe 1.5-2 hrs of use before it will shut off. I usually plug in the laptop when it gets down to 30-40%. Ok, so it shuts off, no big deal, it's happened a million times before. But this time, when I go try and use Linux after booting into it, I get the dreaded "Oh No! Something has gone wrong" screen. It's bad news. So I'm on the Linux forums asking for help, nobody can help, nobody real knows why. And in the meantime, I'm like, what if I just delete the partitions I made for Linux using Disc Utility? So I go into Disc Utility and erase those partitions. And then it got even worse!


I NEVER touched the partition that had to deal with the Mac side of things. And yet, my Mac boots up into the black ? mark folder screen!?


So I boot into Recovery mode, thinking I'll just be able to use my Timemachine backup (I have lots of them on my external HD. I just did a Timemachine backup before I installed Linux and did all this partitioning stuff, JUST in case something like a worst case scenario happened. Like is happening right now)! And yet, it only has TWO choices for me?!?!? One backup is from 2016?!?! And the other is from March, 2024?!?! NEITHER choices are the backup I JUST made a few weeks ago!?! Ok, I'm freaking out at this point.


I read up more, I try to verify and repair the drives. There are at least 6 if not more drives showing. Here is a photo of what comes up when I open Disc Utility:


Then I did verify discs and repair discs to all of them, and it says they're "ALL GOOD". Restarted, and now, when booting into Recovery mode, I don't get anything!? I get another black screen, but this time with a globe and a triangle with an ! in the middle telling me to go to support.apple.com/mac/startup-1007F?


I am in a BIG pickle and need some help here. Not sure if anyone here can help? Or if this a case of me having to take it back to the Apple Store and have a Mac Genius fix it? This is freaking me out! ALL my music and playlists are on this drive and I can not loose it. Thank you

MacBook Air 13″, macOS 11.7

Posted on Sep 28, 2024 8:10 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 15, 2024 7:19 PM

Thanks for the follow up and kind words. It is really nice to know that we were successful in resolving your issues. So many times we never know for sure.....having closure is really nice and refreshing.

30 replies

Oct 1, 2024 7:10 PM in response to SuperWookie68

Ok, I need to preface this with a warning. There is always a risk of data loss since there are no safety nets when using the command line. Sometimes all it takes is a simple typographical error, so make sure you issue the commands exactly as I present them.


The command I am offering is just going to change the partition code....it will not affect the actual data within that partition. The command will first "remove" the partition, then we will "add" it back so it will have the correct code (hopefully...because I am just guessing that it is an APFS Container partition and not a Filevaulted partition). As long as you do not make any other modifications to the drive & partitions, then these changes should not affect the data within that partition.


Here are the commands you need to use....please use them in order. If a command produces an error, then stop so I can analyze the command issued & the resulting error message. Also, please post all the commands & messages so I can make sure that everything has gone as planned even if successful. The second "diskutil unmountDisk disk0" command is intentional just to be safe.


diskutil  unmountDisk  disk0

gpt  remove  -i 2   /dev/disk0   

diskutil  unmountDisk  disk0


gpt  add  -i 2   -b  409640   -s  684158624   -t  7C3457EF-0000-11AA-AA11-00306543ECAC    /dev/disk0


gpt  -vv  -r  show  /dev/disk0

diskutil  list  internal

diskutil  verifyDisk  disk0

diskutil  verifyVolume  disk0s2



Hopefully if everything goes as planned, there should be no errors from any of these commands. The last two commands are meant to make sure the partition table is Ok and the "fixed" volume is Ok, however, it would not surprise that the "fixed" volume could have some issues.


Theoretically if there are no errors, you should be able to quit the Terminal app, then click on one the Apple menu and select Startup Disk item so we can try to configure it. Hopefully you will see your macOS boot drive as an option, but I have seen some online posts where it still may not show up on this screen yet, so reboot the system to see if it will automatically find the macOS boot volume.


Remember

Oct 5, 2024 1:36 PM in response to HWTech

I'm really glad it worked. And I'm glad you enjoyed the process.


I'm just glad I decided to glance at your post since many times I will skip a thread where a high level contributor is already responding (I've been very busy so I haven't had much time recently to really hang out here, but needed a distraction).


Again, THANK YOU so much for taking your time to help another human being in need! Can't thank you enough. And if you have time and don't mind, I'd LOVE to hear the explanation about those command lines you had me type in. From the last set you sent me, that seemed to fix everything. I know I'll never truly understand it all, but would love to try and get the gist of it. What was each line of command doing? What was it affecting? That would be neat to learn HOW and WHY you had me type in all those commands. Just for my own curiosity. Again, I'll never understand it like you or other experts, but it would be fun to see your thought process and what exactly was going on with those commands.


Yeah, Apple doesn't train their front line agents for anything but basic support options. Erase & reinstall is their mantra. I cannot blame them sometimes, since that can be the easiest & fastest way forward since Apple is only concerned with macOS & the Apple hardware working properly...third party hardware & software is generally the responsibility of the user or the third party vendor.


This guy was their "expert". He's a nice guy and he's helped me out before. But it was either one of two things: 1. he just didn't want to take the time to do all this stuff you did because apple wants him to just move on to the next easy fix or 2. he didn't know and is told to just do exactly as you said: whip and reinstall. Because that is exactly what he told me. That he can't help and to just whip and install.


I'm not sure whether Disk Utility will allow you to rejoin those deleted partitions back into your macOS APFS Container automatically or not. If not, then our adventure can continue a bit longer since I have some command line instructions readily available to make sure the space used by those partitions is reintegrated in the macOS APFS Container (I have provided these instructions for people who had botched Windows Bootcamp installations & removals although I'm not sure anyone bothered to follow up with confirmation of success...they worked for me in a test environment involving multiple partitions within a DMG file).


FYI, if you find that you still get an option to boot Linux, then that is another very easy fix since the Linux bootloader resides within a folder on the hidden EFI (aka ESP) partition. There is no automated Linux uninstaller or removal tool.


So how DO I rejoin those partitions back into my macOS APFS container? It's still showing that my entire SSD is 350GB for Mac. And the other drives, while no longer on the desktop, are still in the Disk Utility app, but grayed out now.


No option to boot into Linux.


I hope you don't give up on your Linux experimentation either. A lot of my knowledge comes from using Linux for the last 20+ years. The best way to go with Linux is to either install to an external drive, or use just about any older computer (64bit CPU 2007+), or install into a Virtual Machine running on macOS if your computer has enough system resources. Partitioning & dual booting to a single drive is always risky, but mostly because people usually discover one or more partitions are too small. I dual booted early on when I was learning Linux by dual booting with Windows (actually triple booted one time) since booting to external drives at the time was not a good option with USB1 or even USB2. Windows was worse since it didn't know how to play nice with others.


Definitely not giving up on Linux. I still have Kubuntu on my main desktop PC on it's own SSD (windows on another, so there is not dual booting). And I think I'll try out the external drive way of running Linux on this laptop. That way there is no partitioning or dual booting. It's definitely too old and not fast enough though to allow running Linux in a VM. My super fast really nice desktop I built can barely run a few different distress of Linux in a VM without problems. Others don't work well at all. I'm going to use Linux Mint on an external ssd.









Sep 28, 2024 4:13 PM in response to HWTech

So it's probably reverting all the way back to whatever OS came with this laptop. Maybe Mavericks or something like that. That's why the Disk Utility is so old. And I CAN boot back into Recovery mode, that's how I'm sharing these photos. It says it's version 13 (517) Copyright 2002-2012. But this laptop is an early 2014 MacBook Air. So not sure why it's so old?


And I have obviously upgraded it to each new OS when it becomes available. But because of it's age and the fact that Apple won't support things that are older than 5-8 years old, it's last OS it would update to was Big Sur.


To answer another part of your response... the SSD is a brand new 500GB drive I installed about 3 months ago. I copied everything from my old 250GB drive to the new one following approved online instructions and it worked flawlessly.


I've also gone through every single partition and verified the "disk/volume/image" as well as repaired the drives. I've done it 4-5 times now. Not once, does it find anything wrong. Meaning, I look in the details and there is NOTHING wrong in there. Everything checks out. And it says in green: The volume NO NAME (or whatever drive i'm "repairing") appears to be OK. The only drive or volume I can't do anything with is the second one from the top. The one that says disk0s2. It's greyed out and will not let me repair or verify it. It also will not let me Mount it for some reason? I clicked on get more info for the drive and this is what it says... and it's freaking me out! It says Capacity 350.29GB, and that was the size of my MacOS partition. Yet I NEVER erased that partition. I know for a 100% fact. Because I knew that was the Mac partition and to NOT touch it. Yet it's greyed out, not mounted and I can't do anything with it. And it's my Mac drive! Here's a photo of what it says:


All of these drives verify and say Everything checks out after Repair Disk:

500.28 GB Apple SSD SM051...

NO NAME

disk0s4

disk0s5

disk0s6

disk0s7


Then this is a part where you lose me: The first step is to attempt to boot into Internet Recovery Mode using Command + Option + R to access the online macOS 11.x Big Sur installer.


I don't want to install Big Sur ON TOP of anything. I want to restore everything back to normal. So my question is: will accessing and installing Big Sur in recovery mode install over all my stuff? If yes, then I'm not doing that. If no, than can you explain how this works? How would installing a new Big Sur on top of whatever my drive contains allow me to recover my drive how it was 3 weeks ago? I'm not following here. Sorry, I'm not a computer expert.


Then, I will try and get this bootable Knoppix Linux USB stick thing going and see if I can get it to spit out some report on the health of the SSD. My guess is that it should be totally fine. But you never know. I'll report back here once I get that done.


We'll just go with this part first before we go with anything else in here. And before I forget... thank you very much for taking the time to post such a thorough response.




Sep 29, 2024 9:07 AM in response to HWTech

I understand that since you mentioned you had Big Sur installed (or it seemed implied anyway). That is why I suggested using Command + Option + R to access Internet Recovery Mode to see if you can access the online Big Sur installer. Working with the newest installer will give us the best most reliable information about the system since older versions of macOS do not understand the new drive layouts or file systems used by later versions of macOS. Different key combinations are supposed to give access to different versions of the macOS installer. Unfortunately some Macs may only boot to the online installer for the older OS which originally shipped with the Mac from the factory.


Ok, I gotcha you know ;) I was able to use Cmd+Opt+R to get into Internet Recovery Mode. And yes, there is a different looking Recovery system/screen now! It looks much more modern. Says it's Disk Utility Version 20.1 (1715.2). So that's good.


That is because you are using an old OS to examine a new style partition made with a newer OS which the old OS does not understand. That is why you need to boot into a later macOS installer (Big Sur is best, but any from macOS 10.13+ we can work with). macOS 10.13+ uses the newer style APFS Containers and file systems. An APFS Container is just a specialized type of Apple partition.


Ok, I'm fairly certain I understand most of this. Thanks for explaining. I'm learning as well, so thank you.


All those other volumes are not showing any names or listings which is why using a newer macOS installer & Knoppix Linux is necessary to get more information about them.


Ok, this is another part I just realized may or may not work. You mentioned this Knoppix program. And it "seems" to me like it's for running while in Linux? If that is the case, this will do nothing for me, as I don't have Linux on the laptop anymore. It has the dreaded "Oh No! Something has gone wrong" folder and screen. I could not figure out how to get my Linux system back. Everyone on the Linux forums were saying it would be way too hard to figure out EXACTLY what went wrong and to just start over. That is when I went into my Mac Drive in Disk Utility and erased the Linux partitions. So I can't get back into Linux on this laptop (as far as I know).


I'm not asking you to reinstall anything at this point. The point of using Internet Recovery Mode is to attempt to access the Big Sur online installer so we can get more details about the drive layout and so you can run First Aid on the macOS boot volume which should be an APFS Container. We are at the information gathering stage here.


Ok, so just to be crystal clear. At this point DO NOT click on the Reinstall macOS Big Sur button in the Recovery Mode? The second option of the four shown in this photo. Instead, run Disk Utility again? Verify Disks and Repair Disks? Anything else you need me to do?


If the missing macOS, presumably on partition "disk0s2", had Big Sur installed, then reinstalling Big Sur over top of itself will not hurt anything assuming the file system and SSD and laptop are all healthy. As long as you do not erase the drive or modify any partitions, then your data should be relatively safe.


Ok, understood. It "should" be healthy and have no problems. As mentioned, I just purchased this drive and have had zero issues. Same with the laptop.


If Big Sur was completely up to date, then reinstalling macOS over top of itself should not make any difference. If, however, Big Sur was not completely up to date, then reinstalling Big Sur would not leave it exactly as it was before although any update patches really should not cause any problems for most software & setups.


Yes, Big Sur was completely up to date.



***Update***

Ok, I ran First Aid on all the drives. I first clicked on the little View box and Selected: Show All Devices. For some reason, it's not "showing" disk0s2 (which is the Mac partition, the 350GB part). It only shows:

Apple SSD SM0512G

NO NAME

disk0s4

disk0s5

disk0s6

disk0s7

Then My external drive. Then below that, it shows Disk Images and says Apple disk image Media and macOS Base System.


Awaiting further instructions. Thank you


Sep 30, 2024 3:58 PM in response to HWTech

Ok, so here is what comes up when I open terminal and type in the command: diskutil list internal


disk0s2 is showing up. But instead of a type name, it just has FFFFFFFFFFFFFF? No idea what that is. And as "far as I know", I never used filevault. But I could be wrong. It's been forever since I've done anything major with this laptop. I pretty much only use it to rip CD's, put in Apple Music and then transfer to my iPhone.


When I type in the command: diskutil ap unlockVolume disk0s2, this is what terminal says:

disk0s2 is not an APFS Volume


Then when I type in the command: diskutil mount readOnly disk0s2, it says the following:

Volume on disk0s2 failed to mount
Perhaps the operation is not supported (kDAReturnUnsupported)
If you think the volume is supported but damaged, try the "readOnly" option

Oct 1, 2024 6:10 AM in response to HWTech

Ok, so that command does nothing. But I did put that into google and searched and find a few other posts with similar-ish problems and the commands they used. Not exactly sure what they are for, but I'm including a few different photos here for you to view, hoping any will help. The commands I used in order were:

diskutil info /dev/disk0
diskutil info /dev/disk2
gpt show /dev/disk2


Sep 28, 2024 9:38 AM in response to BDAqua

Yep, I can get back to a super old version of MacOS now. But again, nothing is working to restore my computer back to it's original state 3 weeks ago. The Restore from TimeMachine option only gives me TWO choices?!?! Its not showing all my backups I've done over the years. And one of them is from 2016 and the other from March, 2024. I've done a LOT of stuff with my music since then and it will all be lost. Why is my Timemachine backup from 3 weeks ago and another one from this summer not showing up?! Is there anything I can do?

Oct 4, 2024 9:06 AM in response to HWTech

Hey there, I just wanted to get back with you, so you know I didn't flake out and leave. I've been really busy after work the last few days and for some reason, all of a sudden, the laptop will NOT connect to my WiFi at work, so I can't work on this stuff in the day and report back at night. But I'm still here and still going to try all of this! I really appreciate you helping this much so far. At this point, it's almost like a fun journey to see if we (basically you) can fix this problem! And yes, I realize I could lose everything. I do have a backup showing from March, 2024, so that just in case, everything goes wrong, I can get back to at least that. Still not great at all, I'm going to lose a TON of ripped music I just did this summer, but at least I'll have most of my stuff back.


Also, not sure why the laptop is doing this now, but when I boot into Internet Recovery Mode, it's usually giving me a Startup Error and a number and not even letting me get into Disk Utility or anything! The one # it says is: -1007F and I think the other is something like 3000? Can't remember now. But I know for sure it's throwing -1007F a lot now. One time it did boot into the Recovery Mode but it was back to that super old version of MacOS, not Big Sur!!! I don't know why it all of a sudden started doing this stuff again?! I was ready to put all your commands into the terminal and see if it worked, and now I can't even get the computer to the Recovery Mode! This is so frustrating.


But just wanted to let you know I'm still here and will be working on this today and this weekend. Thanks

Accidentally Erased Partitions, Now have black screen with White Folder with ?

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