Deleted content of EFI partition!

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
Hey,

in the attempt to install Ubuntu on mr rMBP I accidentally deleted the content of the EFI partition. I am still logged in and afraid that if I log off all my data will be gone or at least inaccessible.

Is there a way to fix this, i.e. get the content back?

Help!!

Thank you in advanced! Let me know if you need any more details!
 

grahamperrin

macrumors 601
Jun 8, 2007
4,942
642
With one of my disks as an example –

Code:
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:       Microsoft Basic Data PC-BSD                  250.0 GB   disk2s2
   3:                  Apple_HFS 10.9.5                  199.9 GB   disk2s3
   4:                 Apple_Boot Recovery HD             650.0 MB   disk2s4
   5:                  Apple_HFS Graham                  684.1 GB   disk2s5
   6:          Apple_CoreStorage                         665.8 GB   disk2s6
   7:                 Apple_Boot Recovery HD             650.0 MB   disk2s7
– the slices (partitions) that include data of value are slices of the following types:
  • Apple_HFS
  • Apple_CoreStorage
If your experiment with a different operating system has lost only the EFI slice – typically slice 1 (s1) – then your data in other slices should be intact.

The following post is not directly comparable to your situation, but it exemplifies use of GParted. You can use GParted to see the state of your own disk.

http://askubuntu.com/questions/386306/recover-zapped-gpt
 
Last edited:

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
So what do I need to do now? Sorry I do not quite get what you are saying.
 

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
Well I am gonna get a external hard drive tomorrow for back ups i guess. haha ... In the mean time is there anything that you would suggest to fix it?
 

grahamperrin

macrumors 601
Jun 8, 2007
4,942
642
… Sorry I do not quite get what you are saying.
With Ubuntu running, you can run GParted.

GParted can visualise the layout of partitions on the internal disk of your MacBook Pro.

If you can describe what's shown by GParted, it will be easier to know whether the data that you require can be made available with not too much difficulty.
 

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
Okay see the problem is that I am running OS X at the moment and I am afraid if I restart my computer I won't be able to get back here. Is there anything I can do from this OS?
 

grahamperrin

macrumors 601
Jun 8, 2007
4,942
642
Okay see the problem is that I am running OS X at the moment …
Ah, OK. From your opening post I imagined that you had installed, and were running, Ubuntu.

With Terminal in OS X, enter the following command (two words) then please copy and paste the result to this topic.

Code:
diskutil list
 

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
Oh sorry!

#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 399.9 GB disk0s2
3: Microsoft Basic Data BOOTCAMP 100.0 GB disk0s3
 

grahamperrin

macrumors 601
Jun 8, 2007
4,942
642
OK –

Code:
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            399.9 GB   disk0s2
   3:       Microsoft Basic Data BOOTCAMP                100.0 GB   disk0s3
– that shows that the EFI slice is still present, disk 0 slice 1 (disk0s1).

At a glance, nothing in that listing suggests that data has been overwritten.

Use the Startup Disk pane of System Preferences. If you can select 'Macintosh HD' and then quit System Preferences, you should be OK.

If in doubt, perform a backup before attempting a restart of the Mac.
 

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
Well I mounted the EFI partition and deleted the APPLE folder and emptied my trash. So I am pretty sure there is nothing left on there.
 

grahamperrin

macrumors 601
Jun 8, 2007
4,942
642
Well I mounted the EFI partition and deleted the APPLE folder …
As far as I can tell, that folder and its contents are not essential.

Here on an external disk drive that boots both Yosemite and Mavericks, there's no such folder.

Here on an internal drive that boots Mavericks, there's this:

/Volumes/EFI/APPLE/EXTENSIONS/Firmware.scap

That .scap file is a firmware update, which I can delete (the update has already been applied).
 

macoroni

macrumors newbie
Original poster
Sep 23, 2014
8
0
Okay, so I guess I am gonna get the external hard drive tomorrow, back everything up and give it a try. I don't want to risk losing all my files! Haha!
Thank you so much any way!!
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
30,346
10,115
California
Okay, so I guess I am gonna get the external hard drive tomorrow, back everything up and give it a try. I don't want to risk losing all my files! Haha!
Thank you so much any way!!
My understanding of the EFI partition is the same as grahamperrin, that it is only used as space for firmware updates. I think you are fine.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.