Compile UFS module to support rw with kernel 3.19.0-26-generic

Asked by bjcheny on 2015-09-30

Hi guys,

I'd like to enable rw support for ufs file system with kernel 3.19.0-26-generic.

Basically, I follow steps as below from

sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)

mkdir ufs_rw
cd ufs_rw

apt-get source linux-image-$(uname -r)
cp -v /usr/src/linux-headers-$(uname -r)/Module.symvers .

cd linux-*/
cp -v /boot/config-$(uname -r) .

make EXTRAVERSION=-4 O=~/ufs_rw oldconfig

sed -i 's/# CONFIG_UFS_FS_WRITE is not set/CONFIG_UFS_FS_WRITE=y/' ~/ufs_rw/.config

make EXTRAVERSION=-4 O=~/ufs_rw prepare

make EXTRAVERSION=-4 O=~/ufs_rw outputmakefile

make EXTRAVERSION=-4 O=~/ufs_rw archprepare

make EXTRAVERSION=-4 O=~/ufs_rw modules SUBDIRS=scripts

make EXTRAVERSION=-4 O=~/ufs_rw modules SUBDIRS=fs/ufs

However, I get ufs.ko under ufs_rw/fs/ufs and when I modprobe it, it brings to a kernel panic easily with below command

modprobe nbd

qemu-nbd -c /dev/nbd0 freebsd10u1x64

mount -t ufs -o ufstype=ufs2,rw /dev/nbd0p2 /mnt

Thus, pls help tell me if I mistake some steps above.

Thanks a lot!

Question information

English Edit question
Ubuntu linux Edit question
No assignee Edit question
Last query:
Last reply:
N1ck 7h0m4d4k15 (nicktux) said : #1


UFS support is already enabled in Ubuntu/Linux kernel

As for the RW option, you should know that is considered experimental.

Try to remount the partition.

    mount -t ufs -o ufstype=ufs2,remount,rw /dev/nbd0p2 /mnt


P.S. Don't forget to mark the question as [SOLVED], when done.

bjcheny (companycy) said : #2

It works first time when I run

mount -t ufs -o ufstype=ufs2,rw /dev/nbd0p2 /mnt

However, when I try to write something to /mnt or even umount /mnt, there is kernel panic.

And further more, the way above works for 3.8.0-34-generic/3.11.0-26-generic.

That means I can read/write correctly with ufs2 file system.

It breaks with 3.19.0-26-generic, from my view.

N1ck 7h0m4d4k15 (nicktux) said : #3


then you can file a bug about this problem.


P.S. Don't forget to mark the question as [SOLVED], when done.

Can you help with this problem?

Provide an answer of your own, or ask bjcheny for more information if necessary.

To post a message you must log in.