IPv4 Address:-
IPv6 Address:-
Service Provider:-
SSL Information:-
HTTP Protocol:-
Partitioning/Formatting disks in FreeBSD (manual method) [03/Jun/2009]   CARP in FreeBSD (HSRP/VRRP alternative)     FreeBSD newfs options  

WARNING: This post has been marked as obsolete and may be incorrect. It is kept for archival purposes only. Here's how to manually partition and format a disk in FreeBSD manually.

I'm going to assume you want to use the entire disk (/dev/da0) in 1 partition and all data on it will be destroyed...

First, lets wipe out any data that might be on it...  we'll destroy the GPT table (if one exists), and blank out the first chunk of the disk to destroy any MBR partition tables that might exist:

gpart destroy /dev/da0
dd if=/dev/zero of=/dev/da0 bs=1m count=128 Copy

Now we will create a single (bootable/active) partition spanning the entire disk.  You may not want it to be bootable, but it doesn't hurt anyway so why not:

fdisk -BI /dev/da0 Copy

Now we will write a standard (bootable) freebsd disk label to the 1st partition.  The standard label has the entire space usable as "a":

bsdlabel -wB /dev/da0s1 Copy

Now we will format it for FreeBSD to use.  We will use UFS2 with soft updates...

newfs -O2 -U /dev/da0s1a Copy

Now all you need to do is mount it... e.g. to mount it as /mnt:

mount /dev/da0s1a /mnt Copy

if you want it to mount on every boot, add it to /etc/fstab like this:

/dev/da0s1a     /mnt     ufs     rw     2     2 Copy

All done 🙂

  CARP in FreeBSD (HSRP/VRRP alternative)     FreeBSD newfs options  
Copyright © 2024 Daniel Austin MBCS.
Proudly hosted using the FreeBSD operating system.
E-mail me
E-mail me
padlock icon
LOGIN ERROR#123: random error here