Benches MacBooks

12

I cannot delete a LINUX swap partition

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I wanted to install Ubuntu on my MacBook Pro, and lets say due to an oversight, I ended up with no Ubuntu on my machine, but a Linux swap partition which the Mac cannot mount and cannot erase.

I've tried formatting the Linux swap partition, and then erasing it using disk utility. I even tired removing it after booting from the Leopard installation CD, but it would not remove the partition. Disk utility recognizes the partition as a Mac OS Extended (Journaled) volume, but cannot mount/erase/remove the partition.

I've tried using iPartition and Drive Genius, but none of those programs worked either.

After digging around in the terminal a bit, I found that the the Linux swap partition is not in the volumes directory of the system (/Volumes/), but is in the dev path:

/dev/

After some googling, I tried using:

& sudo gpt remove -i 3 /dev/disk0s3

but i got the following result:

gpt remove: /dev/disk0s3: error: no primary GPT header; run create or recover

Its only a 205MB partition, so its not eating into my disk space, but BootCamp wont run until this partition is removed.

Anybody has any ideas on how to remove this partition?

Given a good set of instructions, I'd be willing to use the terminal or boot into single user mode and work the command line if that is necessary.

Thanks in advance

12 replies

Sign in or join Beachball Help to reply.

  1. 0

    Kappy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Well, you need some sort of external drive if you're going to backup the internal drive. You can use Carbon Copy Cloner or SuperDuper! or the Restore option of Disk Utility to clone the drive, but you have to clone it to an external drive. If you make a bootable backup on an external drive, then boot from the clone you can then repartition and erase the internal drive, then clone back from the external drive.

  2. 0

    Kappy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Given what you say you've tried there seems only one way, but you won't like it. Completely repartition the drive and then reinstall from scratch.

  3. 0

    ucx

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I had my fingers crossed that it wouldn't come down to this.

    Is there a way to back up my entire current system (applications, prefereneces, documents etc) and then put it on top of a fresh install of Leopard so that I can continue as if nothing happened.

    I dont have an external hard-drive that I can use with time-machine.

    I was thinking along the lines of using Carbon Copy Cloner/SuperDuper or something similar. What sort of back-up would I have to make and how would I go about replacing the clean installation of Leopard?

    Thanks again 🙂

  4. 0

    Kappy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Well, you need some sort of external drive if you're going to backup the internal drive. You can use Carbon Copy Cloner or SuperDuper! or the Restore option of Disk Utility to clone the drive, but you have to clone it to an external drive. If you make a bootable backup on an external drive, then boot from the clone you can then repartition and erase the internal drive, then clone back from the external drive.

  5. 0

    pao1250

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I believe that you can do it with a Live GParted CD.

    http://gparted.sourceforge.net/livecd.php

    Boot with the Live CD in the drive and delete the swap partition.

    You may even be able to resize the OS X partition with GParted afterwards.

    Good luck.

    Make sure you backup before using GParted.

    Message was edited by: pao1250

  6. 0

    ucx

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks for the info. I'll give it a try soon. 🙂

  7. 0

    dUlan

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I have the exact same problem except mine is taking up 20 GB and i would like to have it back. If anyone comes up with any solution please tell me what to do. Much appreciated!

  8. 0

    pao1250

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    20 GB swap partition!!!???

    If you boot with a GParted live CD as I suggested above you can delete it and then resize your remaining partition(s) as well.

    Good luck.

  9. 0

    ucx

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This fixed the problem. Thanks a bunch for the help!

  10. 0

    Ctejada10

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    If you havent been able to do it; I had the same problem up to 2 minutes ago.

    What I did was i booted the Ubuntu LiveCD and launched Partition Manager. There you can delete the SWAP partition of your drive. Then I booted OS X and resized it via Disk Utility.

    Hope it helps

  11. 0

    maclin

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    you can use a boot loader called refit then you should be able to boot mac or linux

  12. 0

    OJ89

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    How do u do that i tried everything a dont care if i loose my info i have it backed up