Ufs

From wikinotes

UFS is traditionally a BSD filesystem.

Creation

FreeBSD

gpart destroy -F /dev/da0                # destroy partition table
gpart create -s GPT /dev/da0             # create partition table
gpart add -t freebsd-ufs -a 1M /dev/da0  # create UFS partition
newfs -U /dev /da0p1                     # format UFS partition

Mounting

FreeBSD (todo)

sudo mount /dev/da0p1 /mnt/usb

Archlinux


You must specify the ufstype in order to mount it on linux. 2020/09/27

See very helpful: https://unix.stackexchange.com/questions/275929/mount-freebsd-ufs-from-logical-partition-under-linux

# confirmed working from FreeBSD-12.0
sudo modprobe ufs
mount -t ufs -o loop,ro,ufstype=ufs2  /dev/hdax /mnt/bsd
ufstype=44bsd
ufstype=old,ro
ufstype=ufs2,ro
ufstype=sunx86
ufstype=sun
ufstype=hp,ro
ufstype=nextstep-cd,ro
ufstype=nextstep,ro
ufstype=openstep,ro

Troubleshooting

df/du report very different sizes

  • Try fsck -y on the filesystem. This freed me ~3TB!