UFS gpart: How to format free space after deleting an existing partition

Context: Old Macbook 2008 where I installed FreeBSD 13.1 on partition 6 and user somewhat "rusty", out-of-pratice with BSD (I had been using it from 1980 to 2000 )

After issuing the command (and, at the moment, only that command and nothing else!)
Code:
root@bsd:~ # gpart delete -i 2 ada0
to delete the partition 2 (/dev/ada0p2) with the hfs+ I have the following situation
Code:
root@bsd:~ # gpart show ada0
=>       34  976773101  ada0  GPT  (466G)
           34          6        - free -  (3.0K)
         40     409600             1  efi  (200M)
     409640  855874968        - free -  (408G)
  856284608    1269536     3  apple-boot  (620M)
  857554144        800        - free -  (400K)
  857554944   15624192     4  freebsd-swap  (7.5G)
  873179136       1024         5  freebsd-boot  (512K)
  873180160  102759416    6  freebsd-ufs  (49G)
  975939576     833559        - free -  (407M)
I would like to re-create a wonderful ada0p2 partition of size 408G formatted with UFS to be mounted via fstab.
How should I proceed?
A step by step explanation would be helpful.
Ciao
Vittorio
 
Last edited by a moderator:
Code:
gpart add -t freebsd-ufs -a4k -i2 -s 408g -l myUFSdisk
newfs /dev/ada0p2
edit fstab like
Code:
/dev/ada0p2   /mnt   noatime     2    2
 
Last edited by a moderator:
It worked like a charm! I only had to add ada0 at the end of
gpart add -t freebsd-ufs -a4k -i2 -s 408g -l myUFSdisk
Thanks a lot
Vittorio
 
Last edited by a moderator:
Back
Top