According to this writeup ufs kernel module is compiled with only read permissions. I could mount a ufs partition with this command:
sudo mount -t ufs -r -o ufstype=ufs2 /dev/mapper/loop0p1 /mnt/freebsd/
And it mounts the filesystem without write permissions. There is a ufs-utils package for Debian/Ubuntu but I could not figure out how to use it. So there any way to get read/write permissions work for ufs on Ubuntu/Linux.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I believe Debian and Ubuntu leave out write support for UFS when they compile their kernel, because the write support in the Linux UFS driver is not considered fully reliable. Rather than expose you to data loss if you mount a filesystem read-write, they prefer to warn you away.
If you want to use the Linux UFS driver for writing, you’ll need to recompile a kernel, with read-write support enabled for UFS.
Alternatively, you could run a small installation FreeBSD in a virtual machine (QEMU/KVM, VirtualBox or whatever takes your fancy). Give the virtual machine access to your filesystem image as a raw disk image, mount the filesystem in the VM, and export it over NFS.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0