VMware Communities
Nayland
Contributor
Contributor

Expanding a partition in Ubuntu

Hello all,

I have a Ubuntu guest installed in Workstation Player 12, and I use it to study Hadoop and Spark applications. Unfortunately, I only allocated 20GB to it initially and I've run out of space. To correct this, I went to "Edit," "Hard Disk," and "Expand," giving it a total of 60GB instead.

However, I need to increase the partition from within Ubuntu and this is where the whole cascade of problems started to occur. After doing a search, it seemed that the best thing to do was to used the Gnome Partition Editor aka "gparted." However, this proved problematic, since the main drive could not be unmounted while it was still in use. Apparently, it would be necessary to boot up with the gpart live boot disk and repartition from there. I used a utility called UNetbootin to put the ISO file on a USB stick, but when booting into the BIOS with F2, there was no option to boot from USB.

All I want to do is add some more disk space to my Ubuntu disk - is there a better way of doing this? Thanks in advance for any replies.

5 Replies
bluefirestorm
Champion
Champion

Why don't you boot from the ISO? Surely, you don't have to boot from USB.

I have no expertise to answer for the Ubuntu disk partition expansion.

0 Kudos
Nayland
Contributor
Contributor

I can try that...how do I boot from the ISO, though? Won't it try to install a separate virtual machine?

0 Kudos
bluefirestorm
Champion
Champion

I downloaded the gparted ISO, it wasn't booting up from the ISO.

Basically, if the ISO file was bootable, you can configure the virtual CD/DVD with the bootable ISO file in the host machine; but unfortunately that does not seem to be the case with the gparted ISO.

Now on the USB bootable you created from UNetBootin, you need a VM that has EFI instead of BIOS.

In this case, you would have to create a new VM (perhaps specify Ubuntu); specify install operating system later. By default the VM is created to use virtual BIOS instead of virtual EFI.

Edit the vmx of this new VM to add the following lines

firmware = "efi"

bios.bootdelay = "5000"

The BIOS boot delay is 5000 that means 5 seconds. Not so sure if that would have any effect as the VM would be using EFI. I just think it might give you time to connect the USB drive to the VM.

The gparted VM USB controller has to be USB 2.0.

Insert the gparted USB drive in the host machine.

Power on the gparted VM, and connect the gparted USB drive to it (from the Virtual Machine, Removable Devices menu)

Enter the EFI setup, you should be able to see EFI USB as the boot device which would be the gparted USB you created.

Once you get this gparted VM working (i.e. being able to boot from the gparted USB that you created from UNetBootin), you can then add the Ubuntu virtual disk that you want to expand.

As always as a precautionary measure, take a backup of your Ubuntu virtual disks.

vembutech1
Hot Shot
Hot Shot

if it is LVM, expand the disk using gparted using by booting through Ubuntu CD. Below URL will help you.

partitioning - How can I resize an LVM partition? (i.e: physical volume) - Ask Ubuntu

Nayland
Contributor
Contributor

Thanks guys, I will give those things a try!

0 Kudos