mount linux ext3 partition

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

mount linux ext3 partition

Postby ccc » 07 Aug 2009, 18:58

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:
Code: Select all
# mkdir debian
# mount -t ext2fs /dev/ad0s2 /debian
# cd /debian
/debian: Not a directory.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby vivek » 07 Aug 2009, 19:11

Is debian dir created in /? It looks like you've created in current directory:
Code: Select all
ls debian
ls
Neither in this world nor elsewhere is there any happiness in store for him who always doubts. If you enjoyed my answer please consider donating some money to FreeBSD foundation @ http://www.freebsdfoundation.org/
User avatar
vivek
Member
 
Posts: 809
Joined: 17 Nov 2008, 08:19
Location: Hyper Space

Postby vermaden » 07 Aug 2009, 20:00

@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.

Code: Select all
# mkfs.ext3 -I 128 /dev/ad0s
# tune2fs -l /dev/ad0s2 | grep -i 'inode size'
Inode size:               128
#
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
[FILE][color="DarkSlateBlue"]http://vermaden.blogspot.com[/color][/FILE]
User avatar
vermaden
Giant Locked
 
Posts: 2317
Joined: 16 Nov 2008, 19:37
Location: pl_PL.lodz

Postby ccc » 07 Aug 2009, 21:38

vivek wrote:Is debian dir created in /? It looks like you've created in current directory:
Code: Select all
ls debian
ls


/debian directory is not current:
Code: Select all
# 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
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby ccc » 07 Aug 2009, 21:39

vermaden wrote:@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.

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

Code: Select all
# mkfs.ext3 -I 128 /dev/ad0s
mkfs.ext3: Command not found.
# tune2fs -l /dev/ad0s2 | grep -i 'inode size'
tune2fs: Command not found.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby vermaden » 07 Aug 2009, 22:33

Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
[FILE][color="DarkSlateBlue"]http://vermaden.blogspot.com[/color][/FILE]
User avatar
vermaden
Giant Locked
 
Posts: 2317
Joined: 16 Nov 2008, 19:37
Location: pl_PL.lodz

Postby ccc » 07 Aug 2009, 23:00

vermaden wrote:@cc

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


I've installed sysutils/e2fsprogs, this problem still exists.
Inode size is 256.
Code: Select all
# 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
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby ccc » 07 Aug 2009, 23:30

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:
Code: Select all
kldunload ./ext2fs.ko

and ext2fs.ko from /usr/src/sys/modules/ext2fs must be loadet:
Code: Select all
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
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby ccc » 07 Aug 2009, 23:49

If I try to add to /etc/fstab:
Code: Select all
/dev/ad0s2   /debian     ext2fs      ro,auto     0   0
then it won't mount automaticaly.
ccc
Member
 
Posts: 609
Joined: 31 Jan 2009, 15:49

Postby Oxyd » 08 Aug 2009, 00:03

I've got this in my [file]/etc/fstab[/file] and it works for me:
Code: Select all
/dev/ad0s5              /mnt/music              ext2fs      rw,late         0       2
User avatar
Oxyd
Member
 
Posts: 167
Joined: 20 Nov 2008, 21:27
Location: Czech Republic

Postby miconof » 18 Sep 2009, 14:23

here is a how to in french for the patch : [wrong link removed - Mod]
miconof
Junior Member
 
Posts: 2
Joined: 18 Sep 2009, 14:22

Postby tangram » 18 Sep 2009, 14:41

Wrong link miconof. It points to your registration on this Forum "Your account has already been activated so please try logging in".
User avatar
tangram
Member
 
Posts: 524
Joined: 17 Nov 2008, 10:22
Location: Portugal

Postby miconof » 19 Sep 2009, 07:56

miconof
Junior Member
 
Posts: 2
Joined: 18 Sep 2009, 14:22


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests