Problem mounting EXT2FS partition

Hi folks, im migrating from Linux to BSD, and i found my first problem... First of all, i did save my /home from my old Linux distribution on another HD, ext2fs partition /dev/ad6s1... I can correctly see the drive from sysinstall.

I read about compiling the KERNEL in order to add Ext2fs support under Freebsd, wich I did... Adding the line:

Code:
options            EXT2FS

looking like this:

Code:
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
options 	STOP_NMI		# Stop CPUS using NMI instead of IPI
options 	AUDIT			# Security event auditing
#options 	KDTRACE_FRAME		# Ensure frames are compiled in
[B]options		EXT2FS[/B]			
#options 	KDTRACE_HOOKS		# Kernel DTrace hooks

After this i recompiled the kernel and installed...

Code:
# uname -a
FreeBSD  7.2-RELEASE FreeBSD 7.2-RELEASE #0: Mon Aug 24 18:59:43 UTC 2009     iscariote@:/usr/obj/usr/src/sys/MYKERNEL  amd64

Well... everything should be ready now to mount my ext2fs partition... Using the following command...

Code:
# mount
/dev/ad8s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad8s1e on /tmp (ufs, local, soft-updates)
/dev/ad8s1f on /usr (ufs, local, soft-updates)
/dev/ad8s1d on /var (ufs, local, soft-updates)
/dev/ntfs/DATOSWIN on /media/DATOSWIN (ntfs, local, nosuid)
# mount -t extfs2 /dev/ad6s1 /ext2
mount: /dev/ad6s1 : Operation not supported by device


I tried several times, with not luck, one of those times i was able to mount it, but not to access it, when i tried to cd /ext2 (folder when is mounted) system tells me that ext2 is not a folder...

any ideas???

Thanks in advance!!
 
tangram said:
What's the output of # fdisk /dev/ad6?

Code:
# fdisk /dev/ad6
******* Working on device /dev/ad6 *******
parameters extracted from in-core disklabel are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 131 (0x83),(Linux native)
    start 63, size 312576642 (152625 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 0/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
 
Most likely the inode size of /dev/ad6s1 filesystem is 256 if created with a recent Linux distribution (Fedora and OpenSUSE for instances). This may lead to problems when mounting.

To mount without problems a ext2/ext3 filesystem on FreeBSD always use 128 inode size.

To check inode size do the following:
Code:
# cd /usr/ports/sysutils/e2fsprogs ; make install clean
# tune2fs -l /dev/ad6s1 | grep -i 'inode size'

Have a look at http://forums.freebsd.org/showthread.php?t=6106&highlight=ext2 and http://forums.freebsd.org/showthread.php?t=6140&highlight=ext2 for workarounds.
 
Back
Top