3

I'm using GParted to expand the size of my /dev/sda1 partition and I know why GParted isn't letting me do that, since that is the root partition. GParted isn't on a live CD, it's on my virtual machine.

I also have 11.53 GB of unallocated space that I would want to put into this partition. However, I'm running my Ubuntu system on VirtualBox and I don't have a live CD of the operating system because I downloaded the ISO from Ubuntu's website, so how am I supposed to expand my partition's size in that case without losing all of my data?

I looked at similar postings but I'm new to partitioning and I don't want to ruin my virtual machine so any help you can give me would be greatly appreciated.

1 Answer 1

2

Just as in a bare metal system we can also boot our virtual machine from a live CD .iso we had mounted as a CD-ROM to our virtual machine.

Make sure you leave the hard disk boot order allowing to boot from CD-ROM first.

After that we will boot this machine from a live session where we can access the still attached virtual drive from GParted.

Consider taking a snapshot or export your VM before you change partitions.

Also see: How do I increase the hard disk size of the virtual machine??

In case we do not need to increase the partition size of the exisiting partition but only need more space, e.g. for HOME, we can also partition the still unallocated space of our resized hard drive. This new partition can then be used for additional space in the VM.

5
  • 1
    I increased the hard disk's size using my host's terminal. The problem I have now is that Ubuntu still says /dev/sda1 has the same size as before I did the resizing. Is there a way I can move the 11.53 GB of unallocated space into /dev/sda1 without using a live CD?
    – brown1001
    Mar 2, 2015 at 15:48
  • No you can't resize a partition from where you booted. This has to be done from a live session (or, alternatively, from another VM to where you can attach your .VDI)
    – Takkat
    Mar 2, 2015 at 15:51
  • Or you can create a new partition in the unallocated space of your virtual drive to bind this or mount it in addition to the existing partition.
    – Takkat
    Mar 2, 2015 at 15:53
  • How would I mount the unallocated partition onto my existing partition? I don't see anything in GParted that would let me do that.
    – brown1001
    Mar 2, 2015 at 15:56
  • You may be interested in these informations on partitioning: help.ubuntu.com/community/HowtoPartition - basically you first partition, then format, then mount. A VM is a good playground to learn all about partitioning but you should not do this on a VM you need - create your testing machine for that.
    – Takkat
    Mar 2, 2015 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .