Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running Ubuntu 8.04 in a VM in VMware Fusion 3.0. I understand how to resize the hard disk (Fusion makes that easy with a GUI). But how do I resize the partition in Ubuntu?

mount -l tells me: "/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro) []".

I found http://serverfault.com/questions/38542/, which led me to read the man page for resize2fs, which says I should use lvextend to expand the size of the underlying partition. But http://serverfault.com/questions/38542/ talks about pvresize and lvresize. Which should I use? Any other advice?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Boot the VM from the live CD, use the partition editor to expand the partition, disconnect the CD and reboot.

share|improve this answer
    
Would the "live CD" be the Ubunto 8.04 ISO I used to make the VM? How do I boot from the CD? (I don't see any topics related to that in the VMware Fusion help.) –  Daryl Spitzer Nov 14 '09 at 16:49
    
In the VM's setting set the virtual CD drive to point to either the real live CD or the image .ISO file (depending on which you used), make sure it's set to boot from CD in Advanced Settings. –  Chopper3 Nov 14 '09 at 16:55
    
If this VM has a swap partition, it's possible that that it is after sda1, and you will have a lot of work to resize it. In VMware you can press Escape while the VM is booting to get a boot menu as well, but you have literally under a second to press it. –  Jim Zajkowski Nov 14 '09 at 21:10
1  
Actually it's easier than you'd think, you just move the swap partition to the end of the drive/expanded-disk and then grow the main partition into the space that's been freed up. In fact I just did it and it took less than ten minutes. Oh and I know we're talking about Fusion here but in ESX you can force going into the boot menu on a VM-by-VM basis via advanced settings, thought you'd like to know. –  Chopper3 Nov 14 '09 at 23:04
    
On ESX I just turn up the boot delay to 2000 millisecs. –  Jim Zajkowski Nov 15 '09 at 1:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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