This question already has an answer here:


About a year ago I bought a desktop computer with Windows 7 pre-installed. Shortly after I burned the Ubuntu16.04 OS on a flash drive, and partitioned my hard drive to give Ubuntu almost the entire size, but still dual boot with Windows. I'm now wanting to re-partition my hard drive so my Windows 7 partition and Ubuntu partition are equal in size.

Hard Drive

I have included a picture of my hard drive partitions here.

enter image description here

1) System Re Partition 1

size: 105MB

device: /dev/sda1

Partition Type: HPFS/NTFS (Bootable)

Contents: NTFS-Not Mounted

2) Filesystem Partition 2

size: 49GB

device: /dev/sda2

Partition Type: HPFS/NTFS

Contents: NTFS-Not Mounted

3) Extended Partition 3

size: 431GB

device: /dev/sda3

Partition Type: Extended

Contents: Extended Partition

4) Filesystem Partition 5

size: 414GB - 366 GB free (11.7% full)

device: /dev/sda5

Partition Type: Linux

Contents: Ext4(version1.0) - Moounted at Filesystem Root

5) Swap Partition 6

size: 17 GB

device: /dev/sda6

Partition Type: Linux Swap

Contents: Swap (version 1) - Active


1) Assuming my windows OS is on Partition 2, should I take memory from Partition 5?

2) What is the Extended Partition used for? It appears to just be the sum of Partition 5 (Ubuntu) and 6 (Swap)

UPDATE On boot, I've noticed that my windows OS is on /dev/sda1 (System Repartition 1) NOT /dev/sda2 (Filesystem Partition 2). So what is the purpose of /dev/sda2?

Thanks again for your help.


marked as duplicate by user68186, karel, Eric Carvalho, pa4080, Yaron Sep 3 '17 at 7:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • MBR drive can only have 4 primary partitions. Extended partition is used to create logical drives. I believe windows must be installed to a primary partition; however, ubuntu can be installed on a logical drive – ravery Aug 31 '17 at 12:37
  • sda2 is your primary Windows partition. – heynnema Sep 1 '17 at 19:53
  • Thanks for the comments. On startup, I do not have the choice to access sda2. How do you know its the primary Windows partition? Can you provide more details as I'm not very fluent in partitions. – user3547551 Sep 1 '17 at 22:16

No you cannot use your extended partition for Windows, it is formated in Ext4 format, which windows do not understand! 1. You cannot take space from an extended partition, you have to take it from partition 3 (see Ravery's comment) 2. The extended partition are for holding all partitions above AND including partition 4 (GPT do not have this limitation, that is mainly why we are all changing to GPT) The old MBR way of doing things date back to the old days when a partition could max be 32 MB (that's right megabyte your USB-sticks are way bigger now)

You can create an NTFS partition for say Pictures and videos, and mount it in both Ubuntu and Windows!

This way you can edit and watch your files from both OS'es, and use the apps you are most familiar with - therby get the most satisfying experience out of both OS'es!


Two ways to approach this...

The safest way would be to:

  • backup your important Ubuntu and Windows documents
  • remove Ubuntu (sda3/5/6) note: you won't be able to boot Windows now
  • use a Windows Repair disc, or boot-repair, to fix the no-Windows boot problem
  • extend the Windows partition using Windows own Disk Management tool
  • reinstall Ubuntu

The more risky way would be to:

  • backup your important Ubuntu documents
  • boot a Ubuntu Live DVD/USB
  • resize sda5 and move it right using gparted
  • resize sda3 using gparted
  • boot into Windows
  • extend the Windows partition using Windows own Disk Management tool

Update #1:

gparted move/resize notes...

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower part of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

  • Thank you for your reply. Is it still safe/possible to re-partition my Windows (partition 1) without the Windows Repair disc. I do not have one. – user3547551 Sep 1 '17 at 19:40
  • Then use method #2. Make sure you have a Ubuntu Live DVD/USB. – heynnema Sep 1 '17 at 19:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.