Mount FreeBSD UFS Volumes in macOS

For exchanging data with our FreeBSD home server, sometimes it would be helpful to mount an UFS formatted volume, for example on an USB stick or an external disk drive, in macOS. For having readonly access, we install the extension macFUSE (file system in user space for Mac) and compile the UFS module from the UNIX filesystems, which can be downloaded from the macFUSE repository.

  1. Install Xcode.
  2. Download and install the latest macFUSE package.
  3. Download a .zip archive of the filesystems repository to your desktop.
  4. Open the Terminal and enter the following commands in order to build the UFS fuse module:
       cd ~/Desktop
       cd filesystems-master/filesystems-c/unixfs/ufs
       sed -e "s/osxfuse/fuse/" -i "" Makefile
       mkdir -p ~/bin
       mv ufs ~/bin/
  5. The .zip archive and the unzipped filesystem directory on the Desktop are no more needed, and may be deleted.
  6. Connect the disk or the USB stick with the FreeBSD UFS volume to your Mac.
  7. In the Terminal find out the device identifier of the FreeBSD UFS volume - here it is disk1s4:
       diskutil list
    /dev/disk1 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk1
       1:                        EFI EFI                     209.7 MB   disk1s1
       2:                  Apple_HFS Extern                  640.0 GB   disk1s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
       4:                FreeBSD UFS                         359.3 GB   disk1s4
  8. Adjust the access rights of the respective device, so a normal user may mount it:
       sudo chmod go+r /dev/disk1s4
  9. Mount the volume:
       mkdir -p /tmp/ufsvol; ~/bin/ufs --dmg /dev/disk1s4 --type ufs2 /tmp/ufsvol
  10. A symbol of the mounted volume appears on the Computer and perhaps on the Desktop, and now we have readonly access to the files on that volume.
UFS volume on the Mac desktop Browse the UFS volume on the Mac

Copyright © Dr. Rolf Jansen - 2021-07-22 16:42:30

Discussion on Twitter: 1419652504808267795