Error trying to mount FreeBSD/UFS partition from FreeNAS

Solution 1:

You need to get the bsd partition, that fdisk -l cant show you.

First:

$ dmesg|grep bsd

[    3.467958]  sde1: <bsd:bad subpartition - ignored
[    3.467959]  sde2: <bsd: sde5 >

Look after a partion, in this case sde5 seemed to be the one fore me.

Then:

$ sudo mount -t ufs -r -o ufstype=ufs2 /dev/sde5 ~/freebsd

The forum answer that got me on the right track

Solution 2:

There are many types of the UFS file system, those many are supported by the Linux Kernel but its very hard to automatically detect which type of UFS needs to be mounted, that is why you need to add the ufstype= argument to the mount command.

Possible common types are:

  • old old format of ufs
  • default value, supported as read-only
  • 44bsd used in FreeBSD, NetBSD, OpenBSD
  • ufs2 used in FreeBSD 5.x
  • 5xbsd synonym for ufs2
  • sun used in SunOS (Solaris)
  • sunx86 used in SunOS for Intel (Solarisx86)
  • hp used in HP-UX
  • nextstep used in NextStep
  • nextstep-cd used for NextStep CDROMs (block_size == 2048)
  • openstep used in OpenStep

Since you are comming from FreeNAS and that is based on FreeBSD I recommend you try ufs2 or 44bsd in the ufstype= parameter.

More information here in the Linux Kernel documentation.