Thursday, February 25, 2016

partitioning - 16.04 Reallocate Partitions on Dual boot system


The 16.04 screenshot shows a 13.8 GB Capacity:


enter image description here


$ sudo lsblk -o +fstype
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT FSTYPE
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 500M 0 part ntfs
├─sda2 8:2 0 193.3G 0 part ntfs
├─sda3 8:3 0 785M 0 part ntfs
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 13.1G 0 part / ext4
└─sda6 8:6 0 15.9G 0 part [SWAP] swap
sr0 11:0 1 1024M 0 rom
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 9.5M 1.6G 1% /run
/dev/sda5 13G 6.5G 5.7G 54% /
tmpfs 7.8G 252K 7.8G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 1.6G 64K 1.6G 1% /run/user/1000

The Windows screenshot shows 5 partitions and for this conversation are enumerated as:



  • sda1 512000

  • sda2 202648387

  • sda3 803840

  • sda4 1

  • sda5 13778944

  • sda6 16684032


enter image description here


I suspect that sda6 is unused by Windows and 16.04: if this is true, then the goal is to reallocate this disk space for 16.04 usage. I would like to prove to myself this space is unused BEFORE deleting partition sda6 and expanding sda5 (16.04) partition



  1. Is 16.04 using only partition sda5? (and not sda6)

  2. How can I confirm that Windows and 16.04 are not using sda6?

  3. sda6 does not indicate NTFS file system: reasonable to conclude Windows is not using it?

  4. In order to reallocate sda6 diskspace: re next-steps to delete sda6 and expand sda5 via gParted?


Looking forward to the clever and insightful responses: any experience or lessons-learned are appreciated


The journey continues: click here




  1. Use sudo lsblk -o +fstype (in a Terminal) to see what partitions are mounted where. Please add the output of this command to your question.


  2. Windows uses three partitions (a System partition, a Boot partition which appears to have the drive letter C:, and a Recovery partition). The same lsblk will show you what filesystem is in each partition so that you can deduce which partitions are used by Windows.


  3. If indeed /dev/sda6 is not in use by either Linux or Windows then you can delete it using Gparted (in the GUI), or, if you prefer the command line, by sudo parted /dev/sda rm 6.


  4. If indeed /dev/sda6 is adjacent to and to the right of /dev/sda5 then the same Gparted can extend /dev/sda5 into the now empty space. If you want to do it via the command line then you must first move the end of the partition with sudo parted /dev/sda -- unit s resizepart 5 nnnn when nnnn stands for the sector before the first sector of /dev/sda3 as displayed by sudo parted /dev/sda -- unit s print free, followed by a sudo resize2fs /dev/sda5.



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 (...