LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2009, 12:11 PM   #1
djXternal
LQ Newbie
 
Registered: Jan 2009
Posts: 9

Rep: Reputation: 0
Unable to delete a partition


I have a partition /dev/sda3 on my drive as part of a multi-boot system, OS X and Linux. Somewhere in the process of switching between distros trying to find what works on my MacBook I managed to get it so the sda3 partition will not be removed by cfdisk, fdisk, or Disk Utility in OS X... I wiped the entire partition with "dd if=/dev/zero of=/dev/sda3" and tried erasing again, but it is still unable to delete.

I would like to avoid wiping the entire drive, so is there any other way of deleting the partition?
 
Old 01-22-2009, 12:46 PM   #2
MetallicaQC
LQ Newbie
 
Registered: Jan 2009
Distribution: Fedora 10
Posts: 5

Rep: Reputation: 0
You can use a live CD of GParted

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

Which works quite well.
 
Old 01-22-2009, 12:56 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please post the output of "fdisk -l", run as root (that's an ell, not a one).

Wiping a partition has no effect on actually deleting it--the key is that the entry in the partition table needs to be removed. If you wipe it, you simply have an empty partition with no filesystem.
 
Old 01-22-2009, 08:11 PM   #4
djXternal
LQ Newbie
 
Registered: Jan 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pixellany View Post
Please post the output of "fdisk -l", run as root (that's an ell, not a one).

Wiping a partition has no effect on actually deleting it--the key is that the entry in the partition table needs to be removed. If you wipe it, you simply have an empty partition with no filesystem.
Here is the output of the following commands...

"fdisk -l"
Code:
Disk /dev/sda: 250.0 GB, 250059359916 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device    Boot     Start      End     Blocks     Id     System
/dev/sda1                  1    30402  244198503+    ee     EFI GPT


trying to create a new partition with fdisk
Code:
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
No free sectors available

"cfdisk"
Code:
FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylind...
 
Old 01-22-2009, 08:54 PM   #5
servat78
Member
 
Registered: Jan 2009
Posts: 100

Rep: Reputation: 17
Quite strange that it doesn't show up in fdisk -l, because wiping the partition contents does not remove the partition (as already said on the thread). Something else must have happened or done to make it disappear.
You will need to enforce an update of the partition table. My best guess is to launch a rescue disk, and run fdisk and fsck from there. Be advised to make a backup from sda1, in case that the partition table is corrupted, but still allows for some access.

Debian

Last edited by servat78; 02-19-2009 at 12:12 PM.
 
Old 01-22-2009, 08:59 PM   #6
djXternal
LQ Newbie
 
Registered: Jan 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by servat78 View Post
Quite strange that it doesn't show up in fdisk -l, because wiping the partition contents does not remove the partition (as already said on the thread). Something else must have happened or done to make it disappear.
You will need to enforce an update of the partition table. My best guess is to launch a rescue disk, and run fdisk and fsck from there. Be advised to make a backup from sda1, in case that the partition table is corrupted, but still allows for some access.
Those results were running from the Slackware install DVD, how do I force an update of the partition table
 
Old 01-22-2009, 09:50 PM   #7
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
It looks like your HDD may be using a GTP (GUID Partition Table) rather than the standard MS-DOS type partition table. That would obviously be a result of using OS X, because OS X generally requires a GPT I think (but maybe not if you are trying to set up a hackintosh). fdisk/sfdisk can't handle a GPT HDD, but parted/gparted can. You might want to try those tools instead.

Last edited by CJS; 01-22-2009 at 09:51 PM.
 
Old 01-23-2009, 11:36 AM   #8
djXternal
LQ Newbie
 
Registered: Jan 2009
Posts: 9

Original Poster
Rep: Reputation: 0
No luck running any of the GParted live cds on the MacBook, but I did get it fixed...

Here is my solution for anyone who runs into this problem later.

Open Disk Utility in OSX and you should see the un-deletable partition on the left (probably grayed out)

Click on that partition and click the erase tab at the top

If this partition is for a new install of linux or windows, set the format to box to "MS-DOS FAT"

Now I don't know if you can leave the security settings set at "Don't erase my data" or not, because I changed it to "Zero out the volume" and clicked erase.

Once it's done erasing, you can either delete the partition through the minus button in Disk Utility or edit it to fit your needs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete repository - Suse 10.1 buruburus SUSE / openSUSE 2 07-22-2008 02:09 PM
unable to create or delete files on fat32 partition Barrett Linux - Newbie 9 12-21-2005 05:19 PM
Unable to delete folder arctuniol Red Hat 2 10-11-2004 03:07 PM
Unable to delete trash entropyv Mandriva 1 09-26-2004 12:29 PM
I am unable to delete my post MOZ LQ Suggestions & Feedback 1 01-19-2002 05:26 AM


All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration