LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   how to remove extended windows partition using cfdisk? (https://www.linuxquestions.org/questions/debian-26/how-to-remove-extended-windows-partition-using-cfdisk-214685/)

Maidros 08-07-2004 11:46 AM

how to remove extended windows partition using cfdisk?
 
I had a primary and extended windows partition. cfdisk shows the primary windows partition but not the extended partition (the extended partition shows up during the partition check at bootup time, but not when checked using cfdisk). Is there any way to remove both the primary and extended partitions (I can remove the primary windows partition, but the extended partition does not seem to want to go away).

Any suggestions to do this would be greatly appreciated.
Regards,
Maidros

HappyTux 08-07-2004 03:36 PM

Re: how to remove extended windows partition using cfdisk?
 
Quote:

Originally posted by Maidros
I had a primary and extended windows partition. cfdisk shows the primary windows partition but not the extended partition (the extended partition shows up during the partition check at bootup time, but not when checked using cfdisk). Is there any way to remove both the primary and extended partitions (I can remove the primary windows partition, but the extended partition does not seem to want to go away).

Any suggestions to do this would be greatly appreciated.
Regards,
Maidros

Can you post the output of fdisk -l so we can see how the drive(s) are partitioned and tell us which partition(s) are the ones you want to get rid of.

Maidros 08-07-2004 11:59 PM

Re: Re: how to remove extended windows partition using cfdisk?
 
Quote:

Originally posted by HappyTux
Can you post the output of fdisk -l so we can see how the drive(s) are partitioned and tell us which partition(s) are the ones you want to get rid of.
Thanks for the help. I have posted the fdisk -l output. For some reason, I could not get the spacing properly (the white space is being eaten up after I post), so it is a little jumbled. But the essence is below.

fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 4864 cylinders
Units = cylinders 0f 16065 * 512 bytes

Device Start End Blocks Id System
/dev/hda1 1582 2797 9767520 83 Linux
/dev/hda2 1 365 2931831 5 Extended
/dev/hda3 366 1581 9767520 83 Linux
/dev/hda4 2798 4863 16595145 c Win95 FAT32
/dev/hda5 1 365 2931799 82 Linux swap

HappyTux 08-08-2004 03:18 AM

Re: Re: Re: how to remove extended windows partition using cfdisk?
 
Quote:

Originally posted by Maidros
Thanks for the help. I have posted the fdisk -l output. For some reason, I could not get the spacing properly (the white space is being eaten up after I post), so it is a little jumbled. But the essence is below.

fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 4864 cylinders
Units = cylinders 0f 16065 * 512 bytes

Device Start End Blocks Id System
/dev/hda1 1582 2797 9767520 83 Linux
/dev/hda2 1 365 2931831 5 Extended
/dev/hda3 366 1581 9767520 83 Linux
/dev/hda4 2798 4863 16595145 c Win95 FAT32
/dev/hda5 1 365 2931799 82 Linux swap

You have /dev/hda2 extended (start 1 ending 365) obviously but inside it you still have /dev/hda5 (a logical drive start 1 ending 365) which is your swap partition so the /dev/hda2 extended partition will still be in use while you are trying to delete it. If you want to get rid of it when you are running your OS (eg. If you do not have a Knoppix disk to boot with and even then you need to use noswap cheat code so the swap will not be in use when deleting it) you need to use swapoff -a then use the cfdisk to delete the swap partition/logical drive /dev/hda5 first then the extended /dev/hda2 and you would now have to make a new partition for the /swap again so you are going to be no further ahead you may as well just leave well enough alone and convert the /dev/hda4 to a linux partition if this is what you are trying to accomplish if not let us know. Just delete it in cfdisk and with the freed up space create a new partition making sure that you make it a primary partition using the entire amount of space available type 83 and not an extended partition you can only have one of these.

When partitioning you can have 4 primary or 3 primary and 1 extended (which can contain many logical drives) partitions on a hard drive the last of these (3 +1) is what you will end up with if you convert the /dev/hda4 windows to a linux which still will be a /dev/hda4 partition when everything is done.

BTW the formatting showed up perfectly when I quoted for this post go figure eh.

Edit: Note you will still have to format the new linux /dev/hda4 with the file system you want before you will be able to make use of it.

Maidros 08-08-2004 07:44 AM

Re: Re: Re: Re: how to remove extended windows partition using cfdisk?
 
Quote:

Originally posted by HappyTux
You have /dev/hda2 extended (start 1 ending 365) obviously but inside it you still have /dev/hda5 (a logical drive start 1 ending 365) which is your swap partition so the /dev/hda2 extended partition will still be in use while you are trying to delete it. If you want to get rid of it when you are running your OS (eg. If you do not have a Knoppix disk to boot with and even then you need to use noswap cheat code so the swap will not be in use when deleting it) you need to use swapoff -a then use the cfdisk to delete the swap partition/logical drive /dev/hda5 first then the extended /dev/hda2 and you would now have to make a new partition for the /swap again so you are going to be no further ahead you may as well just leave well enough alone and convert the /dev/hda4 to a linux partition if this is what you are trying to accomplish if not let us know. Just delete it in cfdisk and with the freed up space create a new partition making sure that you make it a primary partition using the entire amount of space available type 83 and not an extended partition you can only have one of these.

When partitioning you can have 4 primary or 3 primary and 1 extended (which can contain many logical drives) partitions on a hard drive the last of these (3 +1) is what you will end up with if you convert the /dev/hda4 windows to a linux which still will be a /dev/hda4 partition when everything is done.

BTW the formatting showed up perfectly when I quoted for this post go figure eh.

Edit: Note you will still have to format the new linux /dev/hda4 with the file system you want before you will be able to make use of it.

Thanks for the information. My intention was to throw out the windows partition (now that my mum has finally backed up her stuff on her machine) and install SuSE there (currently I am running Debian Woody). I removed swap and extended partition along with Windows partition and am installing SuSE.


All times are GMT -5. The time now is 08:26 AM.