I have installed Ubuntu 16.04 LTS recently on my main Laptop.
It already had Windows 10 pre-installed. At first I allocated 70 gigs of memory for the Ubuntu installation. 50 gigs for the /root and 20 gigs for the /home partition.
I would like to know how to increase the disk space allocated to Ubuntu.
I ran sudo fdisk -l
in terminal and following is the output.
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F2FDAD9A-3796-4517-929E-76BE3B882F60`
Device Start End Sectors Size Type
/dev/sda1 2048 923647 921600 450M Windows recovery environment
/dev/sda2 923648 1128447 204800 100M EFI System
/dev/sda3 1128448 1161215 32768 16M Microsoft reserved
/dev/sda4 1161216 512002047 510840832 243.6G Microsoft basic data
/dev/sda5 512002048 874942463 362940416 173.1G Microsoft basic data
/dev/sda6 1024002048 1536002047 512000000 244.1G Microsoft basic data
/dev/sda7 1536002048 1953523711 417521664 199.1G Microsoft basic data
/dev/sda8 874942464 984940543 109998080 52.5G Linux filesystem
/dev/sda9 984940544 1024002047 39061504 18.6G Linux filesystem
Partition table entries are not in disk order.
I have attached a screenshot from Gparted. Please help me increase the disk space for root
and home
directory.
Best Answer
Without having much of a chance to discuss the final desired target configuration with Shanu, I'll move forward making some assumptions.
What we'll do is to delete sda6 and resize sda9. We'll keep sda7 as an NTFS partition which can be used to transfer files between Windows and Ubuntu, or to act as a common file space. We'll also add a swap partition. If that's not acceptable, stop now.
In gparted:
In Ubuntu:
If you were mounting sda6 and sda7 in Ubuntu, and edited
/etc/fstab
, you'll need to edit out the mount for sda6. Since sda6 no longer exists, the first boot may take a while as it looks for sda6 and times out. Worst case scenario is that Ubuntu may not boot at all, and we'll have to go into root access to edit/etc/fstab
. I'll add that process later if I need to.In the
terminal
application:sudo blkid
and note the UUID for the swap partition that we created earliergksudo gedit /etc/fstab
UUID=071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b none swap sw 0 0
swapon -a
to enable swapswapon
and observe the first line of memory status, and the second line as swap statusdf -h
and observe the available free space in /homeIn Windows:
change what the power buttons do
change options that are unavailable
fast start
powercfg /h off
(turns off hibernation)chkdsk /f c:
(change c: to the correct drive letter, if required)