Saturday, April 22, 2017

partitioning - Resize partitions


I have a PC with Ubuntu 12.04 and Windows 7 in dual boot. The Ubuntu partition has 25GB of disk space and I'm running out of space so I want to make this partition bigger. The situation is the following:


Dispositivo Boot    Start         End      Blocks   Id  System
/dev/sda1 2048 3071999 1534976 82 Linux swap / Solaris
/dev/sda2 * 3072000 254730239 125829120 7 HPFS/NTFS/exFAT
/dev/sda3 254730240 438394879 91832320 7 HPFS/NTFS/exFAT
/dev/sda4 438396926 488396799 24999937 5 Esteso
/dev/sda5 438396928 488396799 24999936 83 Linux

Gparted screenshot


The sda2 partition is the Windows 7 one, in sda3 I have only some data (this is the partition that I want to resize to gain space for the Ubuntu one) and then in sda4-5 there is Ubuntu.


My questions are:



  • I don't understand what is the sda4 partition that seems to contain the Ubuntu one (sda5)

  • Is safe to resize partitions sda3 and sda5 using gparted from a LiveCD? I mean safe both for Windows (data in sda3 and system in sda2) and for Ubuntu (sda5). It is better if I move my data from partition sda3 to an external memory before doing the resize?



/dev/sda4 is what's known as a extended partition; the partition table only has room for 4 primary partitions. To get more than 4 partitions out of a disk you need to create one of the partitions as a extended partition...this is then subdivided into further partitions as you create them.


As for resizing the Windows partition I've successfully used gparted to do it. However you need to make sure you run a "Disk Defragmention" tool across your Windows partition before doing it. The GParted FAQ does come with the following warning:



When resizing boot NTFS partitions, it is advisable to perform this as
a single operation only. After resizing, boot into Windows twice to
allow Windows to perform its checking operations.



Make sure you backup any data you want to keep in both Windows and Ubuntu when resizing the partitions; it should be a straight forward process but it can go wrong and you don't want to loose data!


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...