LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Cannot mount FreeBSD UFS from linux (https://www.linuxquestions.org/questions/%2Absd-17/cannot-mount-freebsd-ufs-from-linux-191184/)

bulliver 06-08-2004 02:11 PM

Cannot mount FreeBSD UFS from linux
 
Hello,

I am trying to mount my FreeBSD UFS partition from linux. I created ufs filesystem support as a kernel module, modprobed it and ran the command specified in /usr/src/linux/Documentation/filesystems/ufs.txt but this is always the result:
Code:

[root@nina /root]# mount -t ufs -o ufstype=44bsd /dev/hdb3 /mnt/freebsd
mount: wrong fs type, bad option, bad superblock on /dev/hdb3,
      or too many mounted file systems

I also read that freebsd's ufs is called ufs2, but that does not work either.

Also, it would appear that I can only mount an ext2 partition from FreeBSD..is there any way to mount a reiserfs partition?

Thanks.

jcookeman 06-08-2004 03:25 PM

From ufs-linux.sourceforge.net:

Note :

1) If you are using any kernel prior to 2.6.5-rc1 ,
then take the patches from 2.6.3 directory.

2) ufs2 read-only patch is included in 2.6.5-rc1 onwards.
However , There are still some bugs to be sorted out.
Try the patch in 2.6.5 directory on top of 2.6.5.


3) Please use CONFIG_LBD in your kernel configuration .
(Device Drivers -> Block Devices - > Support for large block devices )
This is required because ufs2 uses 64 bit block addressing .


4) The current support for UFS2 is READ-ONLY.
I will be working on write support.

5) To mount , use this command :

mount -r -t ufs -o ufstype=ufs2 <device> <mount_dir>

bulliver 06-08-2004 04:05 PM

Thanks for the info. I am running 2.4.26 so I suppose I will have to update to 2.6.6 to get this working.

BTW: I am running FreeBSD 5.2.1 so this version does indeed use ufs2 correct?

Cheers.

jcookeman 06-08-2004 04:42 PM

By default 5.2.1 will use ufs2. Now, that does not mean that you are running ufs2 if you installed 5.0-RELEASE and upgraded to 5.2.1. When you're in Free just type 'mount' and see what the partition is. It will say ufs2 if it is. But, yeah, if you installed 5.2.1 from disk you have ufs2.

bulliver 06-08-2004 04:44 PM

Thanks. I installed it from disk.

ashrat44 06-30-2004 02:04 AM

Hi
I noticed this thread and had another question,
Is UFS/UFS2 same as the Berkeley Fast Filesystem ?
If not, is Berkeley Fast Filesystem supported by Linux ?

I'll be glad if you could give me a few pointers.

Thanks.

louisgag 12-14-2006 11:11 AM

I had a similar problem trying to mount by OpenBSD partition from Ubuntu 6.10.

The solution turned-out to be to specify the read-only option in the mount command-line, as follows.

mount -r -t ufs -o ufstype=44bsd /dev/sda4 ./tempo


thanks jcookeman

sirbijan 09-08-2008 03:46 PM

Quote:

Originally Posted by jcookeman (Post 980083)
From ufs-linux.sourceforge.net:

Note :

1) If you are using any kernel prior to 2.6.5-rc1 ,
then take the patches from 2.6.3 directory.

2) ufs2 read-only patch is included in 2.6.5-rc1 onwards.
However , There are still some bugs to be sorted out.
Try the patch in 2.6.5 directory on top of 2.6.5.


3) Please use CONFIG_LBD in your kernel configuration .
(Device Drivers -> Block Devices - > Support for large block devices )
This is required because ufs2 uses 64 bit block addressing .


4) The current support for UFS2 is READ-ONLY.
I will be working on write support.

5) To mount , use this command :

mount -r -t ufs -o ufstype=ufs2 <device> <mount_dir>


Your solution works, but the thing is that it only mounts the "a" partition of my slice inside ubuntu, in FreeBSD jargon, by mounting /dev/sda2, which is my FreeBSD slice, I only get ad4s4a inside ubuntu. I have my FreeBSD /usr mounted in ad4s4c for example. It seems the mount command automatically goes for the first partition of sda2 slice.
How can I mount my other partitions?

sirbijan 09-08-2008 04:05 PM

well, actually i found the solution! For the record, I ran "dmesg | grep bsd" inside ubuntu, and got this:

Code:

[ 23.054946] sda2: <bsd: sda11 sda12 sda13 sda14 sda15
As you see, you can easily mount'em!


All times are GMT -5. The time now is 08:52 AM.