If you are making the disk bigger, you would
- first enlarge the disk from VirtualBox, and then
- enlarge the partition, and
- the filesystem it contains.
To enlarge a disk you can use the
VBoxManage modifyhd command. Suppose you want to resize the disk to 20,000 megabytes (~20GB). First locate the disk file that you want to expand. Then, in terminal, give this command to resize the disk:
VBoxManage modifyhd "path-of-disk-file" --resize 20000
To enlarge the partition and file system, probably it's easiest to boot the virtual machine using a Ubuntu livecd and do the job with GParted, as it does both at the same time and gives you a graphical user interface for it.
Attach a livecd ISO image to the virtual machine and change the boot order to first boot from CD. If you don't have a Ubuntu livecd at hand you can use any livecd that comes with the appropriate tools. SliTAZ for example is only 35MB to download. Open GParted and choose the disk you want to resize. Then right-click on the partition that you want to expand and choose the option "resize-move." In the dialog box that opens, in the graphic that represents the partition, drag the triangle at the end of the partition all the way to the right to maximize it. Then close the dialog and choose "Apply" on the toolbar. Since no data has to be moved this should be a quick operation.
When done, don't forget to detach the livecd from the virtual machine and change the boot order.
You'll find a pretty good tutorial of the whole process with screenshots included here: http://trivialproof.blogspot.com/2011/01/resizing-virtualbox-virtual-hard-disk.html