Thursday, January 29, 2009

Tip: Mount ReiserFS partitions in FreeBSD

My desktop dual boots Gentoo Linux and FreeBSD. When I installed Gentoo at the time I decided on splitting certain directories in distinct partition, so then I created a partition strictly for portage and opted for the ReiserFS filesystem.

Today I wanted to cut down on the bandwith and decided to copy over a needed distfile from the ReiserFS partition to FreeBSD.

Bellow you'll find the procedure to mount a ReiserFS in read-only mode. Do notice than the entire procedure is performed only on the FreeBSD system:
  1. % man reiserfs
  2. % su
  3. # kldload reiserfs.ko
  4. # mount -t reiserfs -o ro /dev/ad4s5 /mnt
On step 1 read reiserfs' man page, next become the superuser and proceeded to load the kernel module and finally mount the filesystem.

The -t switch lets you specify the filesystem and with -o decide in which mode should the filesystem be mounted (in this case in read-only mode).

My target partition was /dev/ad4s5 so change accordingly to your system. In my case I just viewed Gentoo's /etc/fstab and ran ls /dev/ad* to check if it added up ok.

Pretty simple eh?

No comments: