Skip navigation
This discussion is archived

I cannot delete a LINUX swap partition

17910 Views 11 Replies Latest reply: Feb 13, 2009 11:12 AM by OJ89 RSS
ucx Calculating status...
Currently Being Moderated
Oct 10, 2008 11:18 PM
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
MBP, Mac OS X (10.5.5)
  • Kappy Level 10 Level 10 (221,095 points)
    Currently Being Moderated
    Oct 10, 2008 11:54 PM (in response to ucx)
    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.
    Mac Pro 2.66 Ghz; MacBook Pro C2D 2.33 Ghz; MacBook Pro 2.16 Ghz, Mac OS X (10.5.4), Intel iMac C2D 17 "; MacBook 2.0 Ghz; 30 GB iPod Video (Black); iPod Nano 2 GB
  • Kappy Level 10 Level 10 (221,095 points)
    Currently Being Moderated
    Oct 11, 2008 2:57 PM (in response to ucx)
    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.
    Mac Pro 2.66 Ghz; MacBook Pro C2D 2.33 Ghz; MacBook Pro 2.16 Ghz, Mac OS X (10.5.4), Intel iMac C2D 17 "; MacBook 2.0 Ghz; 30 GB iPod Video (Black); iPod Nano 2 GB
  • pao1250 Level 1 Level 1 (30 points)
    Currently Being Moderated
    Oct 11, 2008 6:12 PM (in response to ucx)
    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
    MacBook Pro, 2.4 c2d, 200 gb hdd, 15" lcd
  • dUlan Calculating status...
    Currently Being Moderated
    Oct 16, 2008 5:35 PM (in response to ucx)
    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!
    black macbook, Mac OS X (10.5.5)
  • pao1250 Level 1 Level 1 (30 points)
    Currently Being Moderated
    Oct 17, 2008 4:39 AM (in response to dUlan)
    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.
    MacBook Pro, Mac OS X (10.5.5), 15",2.4 c2d, 200 gb hdd
  • Ctejada10 Calculating status...
    Currently Being Moderated
    Oct 19, 2008 6:23 PM (in response to ucx)
    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
    Macbook, Mac OS X (10.5.5), 2.2 Ghz C2D; 2GB Ram
  • maclin Calculating status...
    Currently Being Moderated
    Jan 2, 2009 4:29 PM (in response to ucx)
    you can use a boot loader called refit then you should be able to boot mac or linux
    macbook, Mac OS X (10.5.6)
  • OJ89 Calculating status...
    Currently Being Moderated
    Feb 13, 2009 11:12 AM (in response to Kappy)
    How do u do that i tried everything a dont care if i loose my info i have it backed up
    Macbook pro, Mac OS X (10.5.6)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.