Showing posts with label filesystem. Show all posts
Showing posts with label filesystem. Show all posts

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.

Saturday, March 10, 2007

Mounting freeBSD partition under Linux

This is a note on how I accessing freeBSD ( exactly version 5.4 ) partition which use UFS filesystem's type under slackware 11.0 ( using linux kernel 2.6.18). First, I try to mount it with this command:
mount -t ufs /dev/hda3 /mnt

but I get a message:
mount: wrong fs type, bad option, bad superblock on /dev/hda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

when I check dmesg | tail it show:
ufs was compiled with read-only support, can't be mounted as read-write

then I try to mount it using option ro (read only) :
mount -t ufs -o ro /dev/hda3 /mnt

but it still has a problem and a message like this appear:
You didn't specify the type of your ufs filesystem
mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
WARNING Wrong ufstype may corrupt your filesystem, default is ufstype=old
ufs_read_super: bad magic number

next, try to pass an option ufstype=44bsd as it defined in manual mount:
mount -t ufs -o ro,ufstype=44bsd /dev/hda3 /mnt


not yet work, last chance using ufs2 as an entry of ufstype option:

mount -t ufs -o ro,ufstype=ufs2 /dev/hda3 /mnt

it works well but still in read only mode. Fine for me now, because I just trying to access a filesystem without modified it.


there is a message before, that ufs filesystem was compiled as read-only mode. I wonder if there is read-write mode. Then I check on kernel source tree using make menuconfig as if we try to compiling kernel. In UFS filesystem part (exactly in miscellaneous filesystem), there is an option that UFS can support write access but still flagged as DANGEROUS. maybe I can try it next time.

hope this helpful.

Saturday, January 13, 2007

Accessing Linux/freeBSD filesystem from windows

For some people who operates more than two operating system in one PC (like me) maybe lists of these tools would be useful. I use these tools if I'm on windows and need to access freeBSD (using UFS filesystem type) or Linux partition (using ext2/3 or Reiserfs filesystem type). Here are the lists:

for accessing Reiserfs filesystem type,
a. rfstool,
using command Line as default Interface
b. rfsgui,
a graphics front-end for rfstools and you don't need to download rfstools because it's already included in this package.
c. YaReG,
also a front-end for rfstool which developed with .NET platform. You need to install .NET framework from microsoft.
d. ReiserDriver,
is an Installable File System Driver (IFSD).No gui front-end, but your ReiserFS partitions will appear as additional disks in windows, allowing files from ReiserFS partitions to be transparently accessed from any windows application.
e. visualrfstool,
another front-end for rfstool developed using Delphi.

for accessing Ext2 or Ext3 filesystem you can use this tools,
a. ltools,
this tool not only support for Ext3 filesystem but also for Reiserfs (but i still have a problem when try to access reiserfs filesystem) beside that, this tools also using multiple platform as front-end ( .NET using C#, java, and web-based).
b. Explorer2FS,
support both of reiserfs and Ext2/Ext3 filesystem and also need package's dependencies.
c. Explorateur-Ext3FS,
I'm not yet try this tool, maybe you can give me your explanation for this tool.
d. Ext2IFS,
maybe this's the only one tool that come as a windows binary installer package. And the different between others that it doesn't come with gui front-end but you can view ext3/reiserfs partition directly from windows explorer because this tool directly integrated with windows explorer.

and if you need to access FreeBSD partition that use UFS filesystem type, these tools maybe helpful:
a. ufsexplorer,
licensed as shareware and come as a windows binary installer package.
b. ufs2tools,
using command prompt without
gui front-end support.
c. ffsdrv,
this tool is used to read FFS file system type. using simple gui to mount freebsd partition and developed using visual C++

For documentation's support, you can access official site for each tools. If you have another tool that not listed here, please let me know.

Saturday, November 18, 2006

How to open slackware's initramfs image file

Here are a step by step what I've done when try to open an initramfs file which come with slackware installation stuff (either using CD/DVD installation or an iso image). I just want to know what are on an initrd.img file (an initramfs itself) which located in directory isolinux.
Before I give the command, I would like to explain you how an initramfs image created with slackware. There is a tool to do this, mkinitrd, and it's only a bash script file. A part of source which exactly generate an initramfs image is on a build_initrd_image() procedure. Here is the source:

# Wrap the initrd as an initramfs image and move it into place:
( cd $SOURCE_TREE
rm -f $OUTPUT_IMAGE
find . | cpio -o -H newc | gzip -9c > $OUTPUT_IMAGE
)

Now we know how an initramfs image created, and we can simply extract it with a gunzip tool first and followed with a cpio tool. a complete command is looks like this:

gunzip -c initrd.img | cpio -i -d -H newc --no-absolute-filenames

I prefer if you doing all of this activity in new directory. first, copy an initrd.img's file into your new directory
and make sure you have write access on that directory. And now, you can run that command inside that directory.
If there is an error message like this : "cpio: Operation not permitted", you can try to run the command with user root.


hope this helpful.