# mount linux ext3 partition



## ccc (Aug 7, 2009)

hi

On my freeBSD 7.2 I try to mount linux ext3 partition installed on the same hard disk, 
but the mount point is inaccessible:
	
	



```
# mkdir debian
# mount -t ext2fs /dev/ad0s2 /debian
# cd /debian
/debian: Not a directory.
```


----------



## vivek (Aug 7, 2009)

Is debian dir created in /? It looks like you've created in current directory:

```
ls debian
ls
```


----------



## vermaden (Aug 7, 2009)

@cc

Check INODE SIZE of /dev/ad0s2 filesystem, if it is 256, then you can have problems (I do not remember if patch has been merged to STABLE to support 256 inode size), if you want to mount Linux ext2/ext3 on FreeBSD without any problems, then always use 128 INODE SIZE for silesystem.


```
# mkfs.ext3 -I 128 /dev/ad0s
# tune2fs -l /dev/ad0s2 | grep -i 'inode size'
Inode size:               128
#
```


----------



## ccc (Aug 7, 2009)

vivek said:
			
		

> Is debian dir created in /? It looks like you've created in current directory:
> 
> ```
> ls debian
> ...



/debian directory is not current:
	
	



```
# cd /debian
# mount -t ext2fs /dev/ad0s2 /debian
# cd /debian
/debian: Not a directory.
```

before mounting I can access to /debian without any problems.


----------



## ccc (Aug 7, 2009)

vermaden said:
			
		

> @cc
> 
> Check INODE SIZE of /dev/ad0s2 filesystem, if it is 256, then you can have problems (I do not remember if patch has been merged to STABLE to support 256 inode size), if you want to mount Linux ext2/ext3 on FreeBSD without any problems, then always use 128 INODE SIZE for silesystem.
> 
> ...




```
# mkfs.ext3 -I 128 /dev/ad0s
mkfs.ext3: Command not found.
# tune2fs -l /dev/ad0s2 | grep -i 'inode size'
tune2fs: Command not found.
```


----------



## vermaden (Aug 7, 2009)

@cc

Add *http://freshports.org/sysutils/e2fsprogs/* package.


----------



## ccc (Aug 8, 2009)

vermaden said:
			
		

> @cc
> 
> Add *http://freshports.org/sysutils/e2fsprogs/* package.



I've installed sysutils/e2fsprogs, this problem still exists.
*Inode size is 256.*

```
# mkfs.ext3 -I 128 /dev/ad0s
mke2fs 1.41.8 (11-Jul-2009)
Could not stat /dev/ad0s --- No such file or directory

The device apparently does not exist; did you specify it correctly?
# tune2fs -l /dev/ad0s2 | grep -i 'inode size'
Inode size:               256
```


----------



## ccc (Aug 8, 2009)

here is a patch for FreeBSD 7.x to read Linux ext2/ext3 partitions with large inodes:

http://www.jimbrooks.org/web/freebsd/freebsd7_ext2_inode_patch.php

I've installed this patch and it seems to work.

BTW ext2fs.ko from /boot/kernel must be unloadet first:
	
	



```
kldunload ./ext2fs.ko
```
and ext2fs.ko from /usr/src/sys/modules/ext2fs must be loadet:
	
	



```
kldload ./ext2fs.ko
```

I've replaced /boot/kernel/ext2fs.ko with /usr/src/sys/modules/ext2fs/ext2fs.ko to start patched module after boot.

greetings
ccc


----------



## ccc (Aug 8, 2009)

If I try to add to /etc/fstab:
	
	



```
/dev/ad0s2   /debian     ext2fs      ro,auto     0   0
```
 then it won't mount automaticaly.


----------



## Oxyd (Aug 8, 2009)

I've got this in my /etc/fstab and it works for me:

```
/dev/ad0s5              /mnt/music              ext2fs      rw,late         0       2
```


----------



## miconof (Sep 18, 2009)

here is a how to in french for the patch : [wrong link removed - Mod]


----------



## tangram (Sep 18, 2009)

Wrong link *miconof*. It points to your registration on this Forum _"Your account has already been activated so please try logging in"_.


----------



## miconof (Sep 19, 2009)

sorry here is the right link http://neuronfarm.net/blog/mount-ext2-ext3-sur-freebsd-7.2


----------

