Remove rEFIT Linux partition

Hello, I installed linux usign rEFIT correctly, but now I want to remove the partition and combine the Linux and the Linux swap partition back into the whole partition. If you were wondering why I want to uninstall it, I just wanted to use a Virtual Machine to run Linux, because that is what I was advised to do recently, instead of dual botting. So, I was wondering if anyone knows how to simply combine the partitions and remove the Linux Partition off of my computer.


Thanks,


John Short

OS X Mountain Lion (10.8.5)

Posted on Nov 1, 2013 4:49 PM

Reply
13 replies

Nov 1, 2013 6:00 PM in response to Jshortz

You can use Disk Utility to remove the partitions, and if the partitions are contiguous, then Disk Utiltiy can mrge the free space to extend your MacOS partition.


Before you do anything, you will want to make sure you have a known good backup of your MacOS partition, just in case you encounter problems. You will also want to make sure you follow teh instructions for rEFIt for removing the Linux Boot sequence, and for making sure that your MacOS partition is set to be the default boot volume.

Nov 1, 2013 6:40 PM in response to Jshortz

I just wanted to use a Virtual Machine to run Linux, because that is what I was advised to do recently, instead of dual booting.


Smart decision, that's exactly what I recommend as well.


Jt's rare that one will need the full hardware performance of Linux on a Mac, and if so, then it's better direct installed on a PC.


Apple doesn't make it easy to install Linux, nor provides the hardware drivers for it. So someone has to hack those and since Apple has went all AppStore crazy...


anyway.


Install Windows or Linux into VirtualBox


Jshortz wrote:


Hello, I installed linux usign rEFIT correctly, but now I want to remove the partition and combine the Linux and the Linux swap partition back into the whole partition.


So, I was wondering if anyone knows how to simply combine the partitions and remove the Linux Partition off of my computer.


With rEFIt it hasn't been updated in ages, there is another like EFI program that has taken over their function in that area.


http://refit.sourceforge.net/



The uninstall instructions to remove the EFI program from your EFI firmware parittion is here, but like the rest it hasn't been updated since Snow Leopard days back in 2011. So it's unknown how things will go with Lion, Mountain Lion or Maverick.


You should FOR SURE, clone your OS X partition to a external JHFS+ (GUID OS X Extended Journaled) drive using Carbon Copy Cloner, which you can then hold option/alt key and boot from it (provided your EFI firmware is still working. LOL. (but you can still direct access files from another Mac, or Windows with MacDrive or Linux)


Make a bootable clone of your boot drive


Create a data recovery/undelete external boot drive


http://refit.sourceforge.net/doc/c1s3_remove.html



You likely should also create a EFI firmware restore cd, this will return the at boot key commands at the second attempt to boot the machine after the firmware has been applied.


Get your model identifier correct (OS X System Profiler or Apple's Hardware Test)


http://support.apple.com/kb/ht1509


and download (on another Mac) the correct firmware: https://support.apple.com/kb/HT1237


Apply using these instructions: http://support.apple.com/kb/HT2213



Now you should be WAY overprepared for nearly anything.



As you should know, EFI is a firmware partition, and programs like rEFIt can be installed there and then are loaded (second boot) into NVRAM (I believe.)


Once rEFIt is removed, you use the option/alt keys at boot to use Startup Manager to get into OS X (f you have it)

Nov 1, 2013 6:39 PM in response to Jshortz

Next is, your correct. Linux requires a swap partition in addition to the main partititon it's installed into.


A lot wannabe Linux users on Mac's just stick a PC install disk in and it assumes the EFI parition is the swap partition.


If this occured to you, then it's likely best to erase the ENTIRE drive while c or option/alt key booted from the 10.6 disks, then install Snow Leopard and update, then from AppStore redownload the OS X version you were on.


Mavericks is free, so perhaps you can just go directly to it instead.



If you have EFI, MacintoshHD, Linux Swap, Linux Boot and RecoveryHD, then as long as EFI is cleaned up, you could choose to hold command r keys and boot into RecoveryHD, then use it's Disk Utility to remove the Linux partitions and drag the top partition corner thingy over the new space below.


However this will only work if OS X is the top visible partition as you can only absorb space of the deleted partitions below (one at a time), not able to do above or shift data on the drive.


If this is the case, then it's best to erase the ENTIRE drive with the Snow Leopard disks.


If your Mac didn't come with Snow Leopard, then to erase the ENTIRE disk, you use Internet Recovery (hold command option r at boot) while connected or near your Internet connection.


Reset your Mac



Note: Reverse cloning (using Carbon Copy Cloner only) your previous clone will also copy the older EFI with rEFIt installed, it will also ask to restore the RecoveryHD partition also.

Nov 1, 2013 6:51 PM in response to Jshortz

And another thing, RecoveryHD has to be at the bottom of the drive/partition order for boot hard drives.


It's because MacinoshHD and Bootcamp need to be next to each other in the center to be able to adjust space, EFI is at the top as it loads first when booting up.


So it's


GUID partition map



EFI firmware partition (hidden, requires a full drive reformat to create)


MacintoshHD partition (not hidden, same as above)


BootCamp partition (not hidden, if enabled)


RecoveryHD (hidden, aka "OS X base system", same as EFI, full format to move into place)



If your Linux swap and boot partitions are the space of BootCamp, then no sweat, just delete using Disk Utility.


If your using a SSD, it writes anywhere all the time anyway, so it doesn't matter about the order, only on hard drives.

Nov 2, 2013 11:55 AM in response to Jshortz

VMware Fusion is a program for OS X that can run other guest operating systems within OS X like a program runs a file.


The guest OS is a file in OS X, a virtual machine containing the guest operating system, it's programs and files.



Thus since the Guest OS is a file, it's like any other file in OS X on the users MacintoshHD partition.


It has no bearing on other real partitions on the boot drive what so over.



VMFusion and Parrallels as the abiliy to clone the Windows BootCamp partition to use as a virtual machine in OS X.


However I don't know or not if that applies to Linux, you'll have to check with them.



VMFusion and Pararells is payware, you will have to regulary pay to upgrade and be forced to upgrade OS X as well to take advantage of improvements and security updates.


VirtualBox is free and works on older OS X versions, gets security updates longer for older hardware than the commercial ones do.


VirtualBox has less features though, but does the job.

Nov 2, 2013 12:01 PM in response to Jshortz

Jshortz wrote:


I just realized would I have to delete this partition if I was to use VMware?


The only way things could affect you is if you needed more drive space.


Virtual machine/guest OS's and OS's on real parititons are not interactive.



Linux doesn't take that much room, there isn't a ton of software neither.



You can choose to leave the real Linux partitions alone and install Linux in the virtual machine program.


But if your planning on having a LOT of files in Linux or not needing the real parititions, you perhaps should consider erasing the entire drive and reverse cloning OS X back on.


This was as your virtual machine file grows, there is enough drive space on the MacintoshHD parititon.



If I'm talkiing too much geek speek, you should then likely have a localMac professional assist you instead.


Linux users are usually very geeky, I've used Linux and installed it on Mac's before.

Nov 2, 2013 12:22 PM in response to ds store

I dont think I will need more than 100gb, because I am just going to be doing some cyber security stuff on Linux. But, the reason I wanted to remove it was because I realized it wasn't enough space to download vmware on the linux to run virtual machines on it, in order to practice cyber security. I tried to boot into linux after I noticed after I installed mavericks but it said no bootable drive, so I would have to go through the trouble of installing linux again also. So, basicall I'm asking if I can just uninstall rEFIT from my computer, or I dont think I even need to do that? but I can just have vmware run off of the already partitioned space correct?

Nov 2, 2013 12:25 PM in response to Jshortz

So basically what I am asking now is... Can I just leave everything the way it is, and just use vmware? Or would the following method work, and remove rEFIT and linux, and use vmware?


Found this online:


Download ubuntu 10.10 here (http://www.ubuntu.com/desktop/get-ubuntu/download) and use Disk Utility to burn as a bootable CD. There are instructions on how to do this on the link I provided. Just boot from the CD and select "Try Ubuntu" to run from the CD.

GParted is accessible via System>Administration>GParted Partition Editor. Delete the partions you want, and leave OS X alone. *Do not attempt to resize the Mac partition in GParted.* Then, restart into OS X and open Disk Utility. Drag the partition to fill the remaining space, and you're good.

In order to remove rEFIt, follow these instructions: http://refit.sourceforge.net/doc/c1s3_remove.html **The steps to properly remove rEFIt depend on your installation method.**



Thanks for the help by the way you are really great 😉

Nov 2, 2013 1:11 PM in response to ds store

I also found this online will it work or should I use gparted to delete the linux partition?


Again I am REALLY greatful for your help.


In disk utility, select both the ubuntu partition, and the swap partition (Command + Click on each so both are selected), then delete the partitions together. After this is complete, grab the right bottom corner of your Macintosh HD partition, and drag it down until it fills the empty space. Click apply and your done.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Remove rEFIT Linux partition

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