Solved gpart assist - reclaim free space on local disk

Aight - finally got a v2p onto some hardware, forgot that the vm had a dynamically allocated disk. So - now I'm sitting on a FreeBSD 13.1 install on a 5G partition that is full. 228 gigs just sitting there waiting for FreeBSD to have it's way with it. I was in the process of trying to install gnome so I could get my fav gparted gui tool up, but I can't even install a gui. LOL

I'm way out of my league trying to claim this space using command line. I'd sure appreciate some helpless!
Code:
# gpart show
=>       40  488397095  ada0  GPT  (233G)
         40       1024     1  freebsd-boot  (512K)
       1064    9974784     2  freebsd-ufs  (4.8G)
    9975848     524288     3  freebsd-swap  (256M)
   10500136  477896999        - free -  (228G)
Note: I have absolutely no idea how to figure this out, a step by step is what I'm looking for. Just don't think you can throw in an 'rm -fr /' on me. :p
 
Last edited by a moderator:
Note: I have absolutely no idea how to figure this out
A look at the manual of gpart(8) would have given some ideas. First delete freebsd-swap, then resize freebsd-ufs.

The last step to expand the UFS file system is not documented there, though (growfs(8)).

Boot system into single user mode and execute
Code:
 gpart delete -i 3 ada0
 gpart resize -i 2 -s 231g ada0
 gpart add -t freebsd-swap ada0
 
 service growfs onestart
 exit
 
Dang, you're GOOD. Nailed it!
<rant>Unfortunately, I had already messed it all up using SystemRescue/Gparted, so I had to reimage it back to what I posted earlier to follow your exact instructions. </rant>
You, good sir, deserve a beer. And I'm buying!
 
<rantagain> I still don't see a link above to mark this thread as 'solved'...love to help y'all out with that, but cannot. Must be a glitch in the matrix.</rantagain>
 
au contrair my good friend.
Screen Shot 2023-03-17 at 4.55.12 PM.png
 
Back
Top