Mount Partisi FreeBSD di Linux

Bekerja dengan dua sistem operasi berbeda pasti kadangkala memerlukan akses ke partisi dari satu sistem ke lainnya. Suatu saat saya juga mengalaminya, saya punya data-data yang saya simpan di partisi FreeBSD yang saya perlukan saat menjalankan linux, dari pada reboot hanya untuk mengcopy data yang diperlukan lebih baik mengaksesnya secara langsung :d

Googling punya googling, saya menemukan rujukan yang cukup bagus di sini dan dari forum gentoo di sini. Kebetulan layout partisi di hardisk saya cukup simpel, tidak terlalu rumit..

$ sudo fdisk -l
Disk /dev/sda: 40.1 GB, 40060403712 bytes255 heads, 63 sectors/track, 4870 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2bcf2bce
Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2040    16386268+  83  LinuxPartition 1 does not end on cylinder boundary.
/dev/sda2            4686        4870     1486012+   5  ExtendedPartition 2 does not end on cylinder boundary.
/dev/sda3   *        3921        4685     6144862+  a5  FreeBSDPartition 3 does not end on cylinder boundary.
/dev/sda4            2041        3920    15101100   83  LinuxPartition 4 does not end on cylinder boundary.
/dev/sda5            4686        4870     1485981   82  Linux swap / Solaris
Partition table entries are not in disk order

Dari output fdisk di atas, partisi freebsd saya ada di /dev/sda3, dan menurut panduan di atas, saya coba mount sesuai petunjuk

$ sudo mount -t ufs -o ufstype=ufs2 /dev/sda3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so

Pada awalnya bingung juga, kenapa ya bisa begitu.. saya coba cek, mungkin kernel linux yang saya gunakan belum support terhadap file sistem yang digunakan freebsd

$ grep UFS_FS /boot/config-`uname -r`
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
CONFIG_AUFS_FS=m

Ternyata kernel sudah dicompile support terhadap filesistem ufs walaupun dukungan write belum diaktifkan..mungkin belum keload, jadi  load terlebih dahulu

$ sudo modprobe -vv ufs
insmod /lib/modules/2.6.32-5-686/kernel/fs/ufs/ufs.ko
$ cat /proc/modules | grep ufs
ufs 56158 0 – Live 0xe01be000

dan coba mount lagi

$ sudo mount -t ufs -o ufstype=ufs2 /dev/sda3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so

ahh..masih belum bisa juga. coba liat warning dmesgnya, sesuatu petunjuk, mungkin dapat wangsit 🙂

$ dmesg | tail
[ 1049.950547] ufs_read_super: bad magic number
[ 1060.489902] ufs was compiled with read-only support, can’t be mounted as read-write
[ 1136.587228] ufs was compiled with read-only support, can’t be mounted as read-write
[ 1206.420219] ufs was compiled with read-only support, can’t be mounted as read-write
[ 1217.195541] ufs was compiled with read-only support, can’t be mounted as read-write
[ 1542.441516] ufs was compiled with read-only support, can’t be mounted as read-write

Dukungan default sistem linux yang saya gunakan terhadap ufs memang baru read only, karena dukungan write belum aktif. Mungkin perlu menambah opsi read-only terhadap perintah mount-nya

$ sudo mount -v -t ufs -o ro,ufstype=ufs2 /dev/sda3 /mnt
/dev/sda3 on /mnt type ufs (ro,ufstype=ufs2)

Hmmm..kayaknya sukses nih, coba cek apakah sudah “berisi” sistem freebsd di mount pointnya

$ ls /mnt
bin cdrom COPYRIGHT dist etc lib media proc root sys usr
boot compat dev entropy home libexec mnt rescue sbin tmp var

Akhirnya, sukses juga, yakni dengan menambahkan opsi ro (alias read-only) di perintah mountnya 🙂

Advertisements
Comments
2 Responses to “Mount Partisi FreeBSD di Linux”
  1. usman fauzi says:

    bntar lagi menyusul pake freeBSD 😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: