Author Topic: How to remove a primary and create an extended partition  (Read 1793 times)

Offline doctore

  • Sr. Member
  • ****
  • Posts: 376
How to remove a primary and create an extended partition
« on: July 23, 2010, 08:12:05 PM »
I have a new computer with Windows. Using their disk management program I shrunk one partition to free up 40 Gigs to put PCLOS on. From the Live CD I have tried to put the PCLOS partitions on the free space. I understand that I cannot have over 4 primary partitions and that I need to remove one and/or create an expanded one. Four of the partitions are needed for Windows. What can I do to get PCLOS on it? Here's what I've got:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x79120785

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      203776    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              26       23470   188314624    7  HPFS/NTFS
/dev/sda3           28569       30389    14612480    7  HPFS/NTFS
/dev/sda4           30389       30402      105656    c  W95 FAT32 (LBA)

BTW, this computer is a birthday present for my son who is going off to college. He uses PLCOS at home and I'd like him to get along without Windows, hence the dual boot I'm trying.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11528
  • ----IOFLU----
Re: How to remove a primary and create an extended partition
« Reply #1 on: July 23, 2010, 09:12:42 PM »
I have a new computer with Windows. Using their disk management program I shrunk one partition to free up 40 Gigs to put PCLOS on. From the Live CD I have tried to put the PCLOS partitions on the free space. I understand that I cannot have over 4 primary partitions and that I need to remove one and/or create an expanded one. Four of the partitions are needed for Windows. What can I do to get PCLOS on it? Here's what I've got:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x79120785

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      203776    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              26       23470   188314624    7  HPFS/NTFS
/dev/sda3           28569       30389    14612480    7  HPFS/NTFS
/dev/sda4           30389       30402      105656    c  W95 FAT32 (LBA)

BTW, this computer is a birthday present for my son who is going off to college. He uses PLCOS at home and I'd like him to get along without Windows, hence the dual boot I'm trying.

To start with, your partition sda2 overlaps sda1, and your sda4 partition overlaps your sda3, and the space you created lies between sda2 and sda3. Were it me, being as all your partitions have problems, I'd be backing up everything on the drive, then repartitioning from scratch, to get it right.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline doctore

  • Sr. Member
  • ****
  • Posts: 376
Re: How to remove a primary and create an extended partition
« Reply #2 on: July 24, 2010, 10:59:44 AM »
So, once I redo all the partitions the question still remains on where to put PCLOS since you can only have 4 primary partitions.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: How to remove a primary and create an extended partition
« Reply #3 on: August 01, 2010, 11:19:03 AM »
Why does Windows need 4 partitions? Normally it only uses one, though others can be used if wanted. Is the FAT partition one you created yourself for data?.

In order to use the space you have created you need to delete at least partitions 3 and 4, and then recreate them with 3 starting in the cylinder after 2 ends. 3 can be primary, but 4 needs to be extended with the FAT partition as 5 (the first logical partition). You can then create further partitions for pclos.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: How to remove a primary and create an extended partition
« Reply #4 on: August 02, 2010, 03:30:07 AM »
I would backup everything ......  and then wipe the whole lot and start again.

Then create the partitions of the size you need, numbers 1,2 and 3.
Create partition 4 as an extended partition covering ALL the remaining space.

An extended partition is a wrapper for Logical partitions ........  so in the extended space you can create as many Logical partitions as you wish.

There are just too many problems on that disk to be worth the effort trying to correct them.

Offline doctore

  • Sr. Member
  • ****
  • Posts: 376
Re: How to remove a primary and create an extended partition
« Reply #5 on: August 02, 2010, 03:21:10 PM »
Yes, Windows has 4 partitions on the disk. I hoped that there would be a way to do this without wiping everything.

Offline CaptainSarcastic

  • Sr. Member
  • ****
  • Posts: 329
Re: How to remove a primary and create an extended partition
« Reply #6 on: August 02, 2010, 03:58:35 PM »
I am guessing that one of those partitions is a "Recovery" partition, and another is a "Data" partition.  You could get rid of the former if you have optical disks for Windows to reinstall with if necessary, and the latter as long as the main Windows partition has adequate space.  I've seen a few companies ship Windows with the OS in one partition and a separate partition for data - ACER laptops come to mind.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: How to remove a primary and create an extended partition
« Reply #7 on: August 03, 2010, 03:35:24 AM »
You will have to back up the contents of any partitions you delete so you can restore them. You should do that anyway, because computers can be stolen or destroyed and your data is more important than the machine on which it's stored.

My method would need only two partitions to be deleted. Johnboy's needs to delete all four, so why not try mine first and if it doesn't work do his?
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: How to remove a primary and create an extended partition
« Reply #8 on: August 03, 2010, 05:08:22 AM »
You will have to back up the contents of any partitions you delete so you can restore them. You should do that anyway, because computers can be stolen or destroyed and your data is more important than the machine on which it's stored.

My method would need only two partitions to be deleted. Johnboy's needs to delete all four, so why not try mine first and if it doesn't work do his?


Because the first partition is incorrectly created ......  it is not ending on a cylinder boundary .....  it could be retained and MAYBE corrected by resizing.
One way or another it does need to be corrected.  ;)

So it might work to delete three partitions and correct the first one ...  but I would not attempt it without backing up what is on the first partition .......  in which case I would probably delete it  and restore the backup to a new partition.   ;D ;D

not a lot of difference methinks ....

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3979
Re: How to remove a primary and create an extended partition
« Reply #9 on: August 03, 2010, 07:00:32 AM »
My understanding is that the only OS that requires partitions to start and end on cylinder boundaries is OS/2, and other OSes don't care, so unless he's using OS/2, which is unlikely, we can ignore that.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: How to remove a primary and create an extended partition
« Reply #10 on: August 03, 2010, 07:47:31 AM »
My understanding is that the only OS that requires partitions to start and end on cylinder boundaries is OS/2, and other OSes don't care, so unless he's using OS/2, which is unlikely, we can ignore that.


You may well be correct .....  I have not kept up with such things TBH ...... it was necessary some time ago (don't ask how long  ;D ) to not have this error to install (I think) Red Hat, so I have always erred on the side of caution ......  but again the older disk geometries may have had something to do with this too.
I don't see a danger of loss of data due to this warning ....  not like the overlapping partitions error ..... but I guess old habits die hard with some of us.  ;D

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10607
  • MLUs Forever!
Re: How to remove a primary and create an extended partition
« Reply #11 on: July 24, 2011, 04:29:56 AM »
Quote
(note: I don't have exact specs on capacity, so I used percentages instead)

If the HDD was 3TB then 30% for PCLOS, or any other OS, would be rather excessive.

Hence % is rather meaningless without the disk size being known.

;)
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11528
  • ----IOFLU----
Re: How to remove a primary and create an extended partition
« Reply #12 on: July 24, 2011, 05:15:15 AM »
Quote
(note: I don't have exact specs on capacity, so I used percentages instead)

If the HDD was 3TB then 30% for PCLOS, or any other OS, would be rather excessive.

Hence % is rather meaningless without the disk size being known.

;)

Precisely my thought as I read that post..
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10607
  • MLUs Forever!
Re: How to remove a primary and create an extended partition
« Reply #13 on: July 24, 2011, 03:40:02 PM »
I have root of 20GB and Home of 30GB and put lots of extra apps on there and am rather untidy with files  ;D

So, based on that, 50GB should be plenty.

Yes install Win first, then PCLOS ....  you should need do nothing special except untick the formatting of the selected single partition for the install ......  just ensure there is only one partition chosen for the install (/).

Yes Win will be added to the boot list automatically.

Your only real decision will be which OS will boot by default  ;D  ...  and how much time to allow for a change in the default  ;)

regards
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11528
  • ----IOFLU----
Re: How to remove a primary and create an extended partition
« Reply #14 on: July 24, 2011, 04:31:01 PM »
% is rather meaningless without the disk size being known.
Just19 and Old-Polack, Thank you for your attention. 
I agree with both of you  :) :), here is the output from fdisk -l (including two other commands), run as root from KDE 2011.06 LiveCD.
Code: [Select]
[root@localhost ~]# uname -a
Linux localhost 2.6.38.8-pclos1.bfs #1 SMP PREEMPT Sat Jun 4 04:13:21 CDT 2011 i686 i686 i386 GNU/Linux
[root@localhost ~]# blkid
/dev/loop0: TYPE="squashfs"
[root@localhost ~]# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
[root@localhost ~]#

The partitions (calculated per my previous post) would be:
Device          Boot      GB        System
/dev/sda1       *         96       HPFS/NTFS
/dev/sda2                   6       Swap (per memory)
/dev/sda3                  96       PCLOS (/ and /home)
/dev/sda4                 122      Extended (for future use) <-rounded up

Correct me if I am wrong, but I think 96GB is still "excessive" for an OS.  :o
I also think 6GB is excessive for swap, as that machine has 2GB of RAM, expandable to 4GB, if I recall correctly (IIRC?).  ???
More detailed specs will be available as soon as I boot the machine again with the LiveCD (probably tonight or tomorrow morning).

In the meantime, I suggest:
Device          Boot      GB        System
/dev/sda1       *         50        HPFS/NTFS                       <-entire HDD on their previous machine was 40GB   :-[
/dev/sda2                   4        Swap (per memory - as currently configured)
/dev/sda3                  50       PCLOS (/ and /home)
/dev/sda4                 216       Extended
/dev/sda5                  50       HPFS/NTFS (backup document storage)

I intend to format and label the partitions prior to installing any OS.
From reading other posts on dual booting with various versions of Windows, I believe I should install XP first on sda1.
When I install PCLOS KDE on sda3, I will remove the check marks for formatting, so that the files are copied from the LiveCD without reformatting the partition.
One of the last steps during installation of PCLOS should automatically detect the XP installation and add it to the boot menu, if I understand the process correctly.  ???

Beyond the remaining facts concerning the machine itself, what am I missing so far?  ???
Again, thank you for your attention and knowledge.   :)
More info will be made available as I have it.
Ideally the next post will be from the machine as I am working on it.   8)

Regards,

Darryl


Personally, I would go with this;

/dev/sda1       *         50        HPFS/NTFS     Windows installation
/dev/sda2                  50       HPFS/NTFS     (backup document storage)
/dev/sda3                   4        Swap (per memory - as currently configured)
/dev/sda4                 216      Extended
/dev/sda5                   20      ext4  PCLOS /          
/dev/sda6                 100      ext4  PCLOS /home      <-- Assumes two users with separate login desktops.

The rest unpartitioned for the moment, to be partitioned when there is need and sized to fit the need.

or better, this;

/dev/sda1       *         50        HPFS/NTFS      Windows installation
/dev/sda2                  50       HPFS/NTFS      (backup document storage)
/dev/sda3                   4        Swap (per memory - as currently configured)
/dev/sda4                 216      Extended
/dev/sda5                   30      ext4  PCLOS / with /home included
/dev/sda6                   50      ext4  PCLOS data partition mounted as /home/<user>/Documents.
/dev/sda7                   50      ext4  PCLOS data partition for 2nd user mounted as /home/<user2>/Documents.

The rest unpartitioned for the moment, to be partitioned when there is need and sized to fit the need.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...