# increase disk size as VBox guest



## Brian O'Keefe (Apr 20, 2017)

Hello All and I'm excited about my entree into the forums!
Here's my issue. I installed FreeBSD 11.0 as a VBOX guest w/ Ubuntu 16.04 host. Install went fine, though arduous. I initially set dynamic disk space at 14GB, which was soon devoured by the FreeBSD install and Gnome3 GUI. I got warnings of only 512Mb space left. I ran VBoxManager and increased disk to 32GB. I restarted FreeBSD and got the same warning. I ran:

```
#gpart show
```
  and got the results you see in the screen shot (including the gparted disk as an iso). Also in the shot is my command to grow the disk and the VBox console showing a 31+GB disk.
Question is 1) why were 2 disks created with the strange partitioning, and 2) how can I merge the 2 to gain the available free space? I've done this with gparted or partedmagic in Ubuntu but those utilities don't work for FreeBSD.
Please advise if possible. I am looking forward to a full FreeBSD experience! 
BTW, I'm hoping I can gain the free space without destroying partitions or reinstalling.
Many thanks


----------



## gkontos (Apr 21, 2017)

Yes, you can increase the space. Have a look here


----------



## SirDice (Apr 21, 2017)

Note that you'll need to remove the swap partition first, before you're able to extend the freebsd-ufs partition. This is why I generally put the swap partition first, after the boot partition but before any UFS or ZFS partitions. This will make it easier to expand the disk later on. I also recommend using GPT instead of MBR, this also makes it easier because you don't have to extend the slice first.


----------



## Brian O'Keefe (Apr 21, 2017)

Thanks for the quick responses! I guess my question is more along the lines of dealing with what I have as shown in the screenshot. It seems that the added space is useless at this point so I'd ask how to delete it safely and only have the disk ad0s? I could then try gkontos' link to the tutorial, which I have already seen in my search for a simple fix but it didn't apply. I never got the corrupted disk issue so I could never proceed further as the tutorial does. As far as SirDice comments, the partitions were automatically set up during installation but the tutorial I followed for that also has manual partition set up. It seems like a clean install may be easiest as I have no data on the VM but was more of creating a sandbox. Time to clean out the box it seems!
Many thanks again


----------



## Brian O'Keefe (Apr 21, 2017)

Brian O'Keefe said:


> Thanks for the quick responses! I guess my question is more along the lines of dealing with what I have as shown in the screenshot. It seems that the added space is useless at this point so I'd ask how to delete it safely and only have the disk ad0s? I could then try gkontos' link to the tutorial, which I have already seen in my search for a simple fix but it didn't apply. I never got the corrupted disk issue so I could never proceed further as the tutorial does. As far as SirDice comments, the partitions were automatically set up during installation but the tutorial I followed for that also has manual partition set up. It seems like a clean install may be easiest as I have no data on the VM but was more of creating a sandbox. Time to clean out the box it seems!
> Many thanks again


Sorry about the repost but I wouldn't to emphasize that disk ad0 originally existed and ad0s was added when I tried the VBox method of expanding the size, I have no idea why a new disk was created.
Thanks!


----------



## Brian O'Keefe (Apr 22, 2017)

Brian O'Keefe said:


> Sorry about the repost but I wouldn't to emphasize that disk ad0 originally existed and ad0s was added when I tried the VBox method of expanding the size, I have no idea why a new disk was created.
> Thanks!


I'm marking this solved as I just deleted the installation and reinstalled setting the virtual disk to 30GB. Install went fine except that I have network in a root shell but not as a user or in my KDE GUI. Have to explore that....


----------

