LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to convert logical partition to primary? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-convert-logical-partition-to-primary-4175534176/)

Carl_cj 02-16-2015 07:31 AM

how to convert logical partition to primary?
 
hello,

i am using slackware 14.1 and my partition table is given below
Code:

sda1                    Primary  ext4                            60003.42
    sda2                    Primary  swap                              8998.46
    sda3                    Primary  ext4                            119998.61
                            Logical  Free Space                          0.10*
    sda5        NC          Logical  Linux                          120739.34*
    sda6        NC          Logical  ntfs                            190356.39*
                            Logical  Free Space                          11.56

and i want to change
Code:

sda5        NC          Logical  Linux                          120739.34*
Logical to primary partition.i don't know how to do it.i searched over internet but i can't understand could u any body please guide me how to do it.Thanks in advance.

pan64 02-16-2015 08:13 AM

I would say there is no trivial solution. First you need to save all the content (copy onto another drive) of it, delete it and shrink the extended partition and afterwards you will be able to create a new primary partition (and copy the content back).
But first please post the full result of fdisk -l /dev/sda

Carl_cj 02-16-2015 08:15 AM

Quote:

Originally Posted by pan64 (Post 5318058)
I would say there is no trivial solution. First you need to save all the content (copy onto another drive) of it, delete it and shrink the extended partition and afterwards you will be able to create a new primary partition (and copy the content back).
But first please post the full result of fdisk -l /dev/sda

the output of fdisk -l /dev/sda
Code:

bash-4.2# fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1f281f28

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              63  117194174    58597056  83  Linux
/dev/sda2      117194175  134769284    8787555  82  Linux swap
/dev/sda3      134769285  369141569  117186142+  83  Linux
/dev/sda4      369141758  976750591  303804417    f  W95 Ext'd (LBA)
/dev/sda5      593755038  604960767    5602865  83  Linux
/dev/sda6      604962816  976750591  185893888    7  HPFS/NTFS/exFAT


pan64 02-16-2015 08:19 AM

so as you can see sda4 is an extended partition. It means it contains other partitions, but no filesystem. sda5 and sda6 can be found inside. The main problem is that this partition table is full, you cannot add a primary partition. You either need to replace one of them or need to find another solutition.

Carl_cj 02-16-2015 08:26 AM

Quote:

Originally Posted by pan64 (Post 5318062)
so as you can see sda4 is an extended partition. It means it contains other partitions, but no filesystem. sda5 and sda6 can be found inside. The main problem is that this partition table is full, you cannot add a primary partition. You either need to replace one of them or need to find another solutition.

hello,

sda1,sda2,sda3,and sda6 is important partition to me.so how can i make sda5 primary partition and how can i delete sda4 extended please give me valuable suggestion to me.i plan to install windows os on sda5 partition so it is necessary to convert logical to primary.could u please guide me.Thanks in advance.

Head_on_a_Stick 02-16-2015 08:36 AM

You can only have four primary partitions on an MBR type disk.

If you want more you could try converting the partition table to a GPT type but I think Windows will only install in EFI-mode on GPT disks.

Carl_cj 02-16-2015 08:44 AM

Quote:

Originally Posted by Head_on_a_Stick (Post 5318071)
You can only have four primary partitions on an MBR type disk.

If you want more you could try converting the partition table to a GPT type but I think Windows will only install in EFI-mode on GPT disks.

Hello,

thanks for your suggestion but it is time consuming process i have to read that u giving to me website and understand then only i do.could u have any alternative ways.i ready to delete partition but expat sda1,2,3,6 and how to delete the sda4 that is extending i don't know what it means what ever it is i don't want it.please guide me.Thanks in advance.

michaelk 02-16-2015 09:14 AM

Why do you want to move sda5? linux does not care where a partition is located.

What are you trying to accomplish?

Since you already have 4 primary partitions you can not create any more.

An extended partition allows one to create more than 4 partitions using a legacy MBR drive. It can not be deleted without losing sda6.

You can delete sda5 and add the space to other existing partitions.

Carl_cj 02-16-2015 09:28 AM

Quote:

Originally Posted by michaelk (Post 5318088)
Why do you want to move sda5? linux does not care where a partition is located.

What are you trying to accomplish?

Since you already have 4 primary partitions you can not create any more.

An extended partition allows one to create more than 4 partitions using a legacy MBR drive. It can not be deleted without losing sda6.

You can delete sda5 and add the space to other existing partitions.

hello,

when i try to install windows os it gives me error.it won't install in logical fs so i think want to change sda5 logical to primary but i belived that linux only support four primary partition.sda1 has my slackware os and sda2 has swap memory and sda3 has LFS/BLFS system.well,now i understood that there is no way i have to delete any one partition correct?so i don't want to delete my LFS/BLFS system so i want to delete slackware os and after that i want to install windows os.please guide me how to format sda1 ext4 to ntfs with primary fs.Thanks in advance.

pan64 02-16-2015 09:32 AM

you do not need to do anything, during install windows will ask you to specify partition and will format it for you

Carl_cj 02-16-2015 09:35 AM

Quote:

Originally Posted by pan64 (Post 5318097)
you do not need to do anything, during install windows will ask you to specify partition and will format it for you

hello,

no pan64;5318097 during installation it won't install and gives me error i.e it is a unknown file system windows can install only NTFS fs.i tried lot of times but no use.

pan64 02-16-2015 09:41 AM

yes, because you need to tell that you want to manage your disk and select the partition and format it.

Carl_cj 02-16-2015 09:43 AM

Quote:

Originally Posted by pan64 (Post 5318101)
yes, because you need to tell that you want to manage your disk and select the partition and format it.

okay pan i am going to do what you suggested.Thanks.

Carl_cj 02-17-2015 10:16 AM

Quote:

Originally Posted by pan64 (Post 5318101)
yes, because you need to tell that you want to manage your disk and select the partition and format it.

Thanks pan it worked and my problem solved.

pan64 02-18-2015 12:35 AM

glad to help you.
If you really want to say thanks just press YES
also if your problem is solved please mark the thread as solved.


All times are GMT -5. The time now is 08:51 PM.