The Linux+FreeBSD mini-HOWTO : Mounting filesystems : Mounting UFS filesystems under Linux
Previous: Mounting filesystems
Next: Mounting ext2fs filesystems under FreeBSD

5.1. Mounting UFS filesystems under LinuxFreeBSD dualboot!mounting filesystems!UFS, in Linux

Unfortunately the UFS driver in the Linux 2.0.xx kernels do not include support for FreeBSD. When you try to mount a FreeBSD filesystem, you just get some error messages (the filesystem actually gets mounted, but you cannot do anything with it.) This problem has been solved in the newer Linux kernels (version 2.1.87 and higher.)

There is another version of the UFS driver for Linux 2.0.xx kernels (xx <= 30) on metalab.unc.edu (the former sunsite.unc.edu). It is called U2FS and the current version is u2fs-0.4.3.tar.gz. A version of U2FS (ufs-0.4.4.tar.gz) for Linux 2.0.31 and higher (2.0.xx; not 2.1.xx) can be found at this site along with further information about U2FS (and UFS.)

Now you have to build a new kernel with support for the U2FS filesystem and BSD disklabels. See section Installing and preparing Linux for more information on this. You can leave out UFS filesystem support from the kernel when you use U2FS.

When you have installed the new kernel, you can mount your UFS filesystems (all the partitions in the FreeBSD slice except the swap partition) with a command like this:

mount -t u2fs /dev/hda8 /mnt

You should use a command like

mount -t ufs /dev/hda8 /mnt
if you use a Linux kernel version 2.1.87 or higher. From Linux kernel version 2.1.112 you must add -o ufstype=44bsd to the command like this:
mount -t ufs -o ufstype=44bsd /dev/hda8 /mnt

The UFS (and U2FS) driver is read-only. That is; you can read from the UFS filesystems but you cannot write to them. An experimental read-write UFS driver has replaced the read-only driver in Linux kernels version 2.1.112 and higher; writing to FreeBSD partitions is supported from version 2.1.127.


The Linux+FreeBSD mini-HOWTO : Mounting filesystems : Mounting UFS filesystems under Linux
Previous: Mounting filesystems
Next: Mounting ext2fs filesystems under FreeBSD