I'm not expert with filesystem and partitioning.

I've tried to follow lots of tutorials in this site (and other sites) but I don't know how to adapt the solution to my case.

I want to enlarge root (1) partition with command line on Ubuntu 16

~# parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 68.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  10.2GB  10.2GB  primary   ext4            boot
 2      10.2GB  10.7GB  535MB   extended
 5      10.2GB  10.7GB  535MB   logical   linux-swap(v1)


I've followed guide like this: guide

But I'm only able to generate a partition (3) with only 1kb.

I can see that partition 1 have no space at the end, and I suppose that the empty space (~50 GB!!!) are at the end of the partition 5 (swap).

Is there a way to solve my problem and add the empty space in the partition 1 even if the space is at the end of the partition 5?


As suggested in the answers, I've solved removing the swap disk with this solution (sorce solution)

and is not necessary to follow my guide because I'm using ext4


No, since it is not lvm. What you will need to do is to create a swap file, change the swap location to that file, remove the swap partition. Then you can enlarge the root partition like described in the guides you mentioned. After you did this, you can either create a new swap partition, or keep using a swapfile on the local drive instead.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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