Friday, June 15, 2007

Testing write support for UFS filesystem module in linux kernel

In previous article, I wrote a note for accessing UFS filesystem under Linux operating system. But It just in read-only mode. Now I'll try to enable write support for UFS filesystem. In this case, still use slackware version 11.0 as a linux host and using kernel release 2.6.18. First, I use config file from kernel packages that come with slackware and modify it to add this entry:
CONFIG_UFS_FS_WRITE=y

or you can use config menu interface to modify it. In file systems --> Miscellaneous Filesystems --> UFS filesystem support , and check on "UFS file system write support (DANGEROUS)" entry.

next, re-compile your kernel.

After doing some configuration and rebooting slackware system using new modified kernel, I try to mount freebsd filesystem manually using this command:
mount -t ufs -o ufstype=ufs2,rw /dev/hda3 /mnt

As far as I did, nothing wrong happen. What i've done is trying to create a file on UFS filesystem (freeBSD partition) and insert some text. Then I boot into freebsd system normally and there is a file that I create before under linux. Maybe need more test to know if it works fine or getting wrong and can cause a damage for freebsd filesystem.

hope this helpful. Use it with your own risk and without warranty.