LinuxQuestions.org
Visit Jeremy's Blog.
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 02-16-2015, 08:31 AM   #1
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Rep: Reputation: 0
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.
 
Old 02-16-2015, 09:13 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
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
 
Old 02-16-2015, 09:15 AM   #3
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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
 
Old 02-16-2015, 09:19 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
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.
 
Old 02-16-2015, 09:26 AM   #5
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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.
 
Old 02-16-2015, 09:36 AM   #6
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
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.
 
Old 02-16-2015, 09:44 AM   #7
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Head_on_a_Stick View Post
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.
 
Old 02-16-2015, 10:14 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,938

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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.
 
Old 02-16-2015, 10:28 AM   #9
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
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.
 
Old 02-16-2015, 10:32 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
you do not need to do anything, during install windows will ask you to specify partition and will format it for you
 
Old 02-16-2015, 10:35 AM   #11
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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.
 
Old 02-16-2015, 10:41 AM   #12
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
yes, because you need to tell that you want to manage your disk and select the partition and format it.
 
Old 02-16-2015, 10:43 AM   #13
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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.
 
Old 02-17-2015, 11:16 AM   #14
Carl_cj
Member
 
Registered: Sep 2014
Distribution: Slackware,Linux From Scratch
Posts: 254

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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.
 
Old 02-18-2015, 01:35 AM   #15
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
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.
 
1 members found this post helpful.
  


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
[SOLVED] convert logical into primary? mshlinux Linux - Newbie 4 07-06-2013 12:01 PM
HowTo convert Primary Partition to Logical (ie move it inside the Extended Partition) Tom6 Linux - Software 3 11-29-2010 04:40 PM
Dang! I used Partition Magic to convert hda5 from Primary to Logical, nothing boots.. brjoon1021 Linux - General 3 11-06-2007 10:03 PM
How to convert primary partition to logical leftPeg Linux - Hardware 1 04-27-2006 10:48 PM
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 07:55 PM


All times are GMT -5. The time now is 04:16 PM.

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