Resize Ubuntu partition

Resizing (Growing) the Partition

To grow your partition you can do it with the root mounted. To do this simply do:

sudo resize2fs /dev/sda1

Provided you already have the empty space ready to be merged. Afterwards I recommend rebooting for the changes to take effect correctly. The command above would resize to the maximum permitted. If you wish to resize to a particular size then simply add the size at the end:

sudo resize2fs /dev/sda1 25G

Note that if you want to specify 25.4 GB, you can not use the ".". you would need to go down one unit of measure. In this case from GB to MB, so it would look like this:

sudo resize2fs /dev/sda1 25400M

This way you will have a partition of 25.4G