9

I use MacBook with Mac OS X 10.9.1. I have installed VMWare Fusion 6.0.2, under which Ubuntu 12.04 LTS has been installed as virtual machine.

Now I need to increase the size of the disk of Ubuntu. GParted shows that there is 80G unallocated:

enter image description here

However, right-clicking on the first partition shows that Resize/Move is gray, then I don't know how to continue...

PS: this post seems to have same problem as I. If so, could anyone tell me how to Boot from the Ubuntu LiveCD under VMWare Fusion?

Edit1:

I have set up the following in VMWare to try to Boot from the Ubuntu LiveCD:

enter image description here enter image description here enter image description here

Once started, it is odd that I didn't see anything different from a boot from hard disk... Still, I opened terminal, turned swap off, and launched GParted. In GParted, I deleted the swap (as well as the whole extended partition containing it). However, I could not resize/move /dev/sda1. Could anyone help?

enter image description here

Edit2:

Following the comment of @Hadi , I think creating another disk is not a bad idea, a disk usage analysis shows the follows. Could anyone suggest which of my folders should be mounted to a newly created disk?

enter image description here

  • When you first created the VM, did you choose Fixed, or Dynamically Allocated? – Mitch Mar 7 '14 at 8:45
7
+50

You have to boot from Ubuntu live disk.So that you can be able to resize your installed Ubuntu partition on Virtualbox.

  1. First Right-click on the Ubuntu virtual machine and select settings option.From the settings menu, select Storage option.Finally choose CD/DVD virtual disk file(choose an iso file of Ubuntu in which you want to boot).I had choosed Ubuntu 13.04 iso file.

    enter image description here

  2. Now from the Ubuntu settings, select System option.From the boot-order, enable only CD/DVD option and put it on the top.

    enter image description here

  3. Now strat the selected Ubuntu virtual machine(Ubuntu is name given for my virtual machine).

  4. It will boot from the iso file(live disk) you have to select Try Ubuntu option on startup.Then open gparted from dash.

    enter image description here

    In my case /dev/sr0 represents Ubuntu 13.04 live disk and /dev/sda1 represents the partition where Ubuntu 13.10 is installed.

  5. Now You can be able to unmount all the /dev/sda disk partitions like in the above screenshot.

  6. Resize your /dev/sda1 ext4 partition by adding the unallocated space with it or just add some space from the free space then using the remaining space, create an extended partition(make a swap within it).

  7. After resizing, shutdown the virtual machine and change the boot-order to Hard-disk on virtual machine settings.

  8. It will boot from the hard-disk.Now your Ubuntu partition size will be resized.

Note: I am running Virtual box not vmware fusion.

2

All of above answers are right and whatever but I advise you by this:

Why should you extend your partition. You need more space Ok that's fine so you can just make another partition and move your home to.

What I mean the following:

Most user data are located under /home/... directories so what I'll do here is just create a new partition of your unallocated space and make your /home be mounted on. This has critical useful effect on your system in case of failure.

For multi-user systems or systems with lots of disk space, it's best to put /usr, /var, /tmp, and /home each on their own partitions separate from the / partition. source

Now let's go.

First using Gparted make the new partition and format it to ext4.

Now let's know the UUID of the newly created partition.

sudo blkid

copy the UUID of the newly created partition.

Now let's move your home to this partition

Open your /etc/fstab

gksu gedit /etc/fstab

add the following line:

UUID=THE COPIED UUID ABOVE /home           ext4    defaults        0       2

Now save and reboot then Enjoy :)

  • That is a good idea... I have appended an image of my disk usage analysis... In your opinion, which folder should be moved to the newly created partition? – SoftTimur Mar 7 '14 at 8:54
  • I stated in the answer. It's better to move the home since it's mostly the user's data and this way you can preserve your data in case of fail and you can take benefit of your free space – Maythux Mar 7 '14 at 9:00
1

You can insert the ISO image of Ubuntu into the VMWare's CD drive, and you should be able to run a live session of Ubuntu from there.

  • I could insert the ISO image into VMWare's CD drive... but I don't know how to run a live session from there... – SoftTimur Mar 5 '14 at 1:49
  • Make sure the option to boot from the CD drive is above booting from the hard drive, or if you can select the boot device, choose the CD drive. Then, a menu should come up, asking you if you want to install Ubuntu or run a live session (run without installing). – saiarcot895 Mar 5 '14 at 3:41
0

actually gparted itself can help. When you initialize the disk/format it as linux type 8e, it actually assigns /dev/sda3 as disk id. Then you can use " fdisk /dev/sda" to see and list it.. Rest is easy, extending the volume group to see the disk, with vgextend, lvdisplay, pvextend ...

0

If you just want to have more space, no matter whether by increasing the size of an existing partition or by creating a new partition, you can simply create a new partition and mount it.

You can use gparted to create a new partition, for example, /dev/sda3 of file system ext4, out of your unallocated space:

$ sudo gparted

Then edit /etc/fstab to mount automatically each time you boot the computer:

$ sudo gedit /etc/fstab

And add the following line:

/dev/sda3 /home/yourname/mydata ext4 defaults 0 0

Now reboot your VM, and you shall see your newly create file system:

$ df -h
/dev/sda3       78.8G   23M  78.2G   1% /home/yourname/mydata

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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