# mount -t ext4[SOLVED]

## apiaio

I have compiled gentoo-sources-2.6.28 with ext4 support

```
localhost boot # grep -i ext4 /usr/src/linux/.config

CONFIG_EXT4_FS=y

# CONFIG_EXT4DEV_COMPAT is not set

CONFIG_EXT4_FS_XATTR=y

# CONFIG_EXT4_FS_POSIX_ACL is not set

# CONFIG_EXT4_FS_SECURITY is not set

```

run

```
mkfs.ext4 /dev/sdb1
```

When I want to mount partition

```
localhost boot # mount -t ext4 /dev/sdb1 /vm

mount: unknown filesystem type 'ext4'
```

but I can copy and delete files in vm directoty. When want to unmout

```
localhost boot # umount /dev/sdb1

umount: /dev/sdb1: not mounted

```

Is it bug? Should I change kernel configuration? What is ext4dev? Thanks in advance.Last edited by apiaio on Tue Jan 13, 2009 8:31 pm; edited 1 time in total

----------

## gringo

what does cat /proc/filesystems tell you ? is ext4 in the supported list ?

Or maybe it´s because of the CONFIG_EXT4DEV_COMPAT you dont´have set, some tools apparently still rely on it.

cheers

----------

## apiaio

No ext4 is not in supported list. Should I recompile kernel with ext4dev compability?

----------

## coolsnowmen

You checked /usr/src/linux/.config, but that must not necessarily be the running kernel.

Check /proc/config.gz for the needed options.

----------

## apiaio

In the meantime I recompiled kernel. 

```
localhost / # grep -i ext4 /usr/src/linux/.config

CONFIG_EXT4_FS=y

CONFIG_EXT4DEV_COMPAT=y

CONFIG_EXT4_FS_XATTR=y

# CONFIG_EXT4_FS_POSIX_ACL is not set

# CONFIG_EXT4_FS_SECURITY is not set

```

Concerning /proc/config.gz the result is the same. I checked it using mc. 

Kernel compilation was not absolutelly correct I'am afraid. I have seen this message *Quote:*   

> WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference 
> 
> from the variable initial_code to the function 
> 
> .init.text:i386_start_kernel()
> ...

 

cat /proc/filesystems gives *Quote:*   

> nodev	devpts
> 
> 	ext3
> 
> 	ext4
> ...

 and mount

```
localhost proc # mount -t ext4 /dev/sdb1 /vm

mount: wrong fs type, bad option, bad superblock on /dev/sdb1,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

```

----------

## coolsnowmen

Assuming there is nothing important on that partition, you should make sure you have the latest e2fsprogs (&libs), and re-make the ext4 filesystem.

----------

## apiaio

 *Quote:*   

> *  sys-fs/e2fsprogs
> 
>       Latest version available: 1.41.3
> 
>       Latest version installed: 1.41.3
> ...

 I run mkfs.ext4 again with the same result

----------

## apiaio

 *Quote:*   

> localhost proc # mount -t ext4 /dev/sdb1 /vm
> 
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
> 
>        missing codepage or helper program, or other error
> ...

  dmesg | tail *Quote:*   

> EXT4-fs: sdb1: Filesystem with huge files cannot be mounted read-write 
> 
> without CONFIG_LSF.

 Enabled Large Single Files, recompiled kernel and correctly mounted ext4 partition  :Very Happy: 

----------

## coolsnowmen

did dmesg say anything interesting?

So, the kernel has support, but it isn't recognizing the ones you make.  It would be interesting to try and mount an ext4 image that someone else made. Or try making your own for fun.

Like so:

```

# cd ~

# dd if=/dev/zero of=./ext4image.iso count=10000 bs=4096

# mkfs.ext4 -F ./ext4image.iso

# mkdir /mnt/loop1 /mnt/loop2

# mount -o loop -t ext4 ./ext4image.iso /mnt/loop1/

# touch /mnt/loop1/hello

# umount /mnt/loop1

# mount -o loop -t ext4 ./ext4image.iso /mnt/loop2/

# ls /mnt/loop2

hello  lost+found

```

EDIT: posted too late, glad you figured that last part out.

Peace,

----------

## apiaio

 *Quote:*   

> did dmesg say anything interesting?

 

```
localhost / # dmesg|grep EXT4

EXT4-fs: barriers enabled

EXT4 FS on sdb1, internal journal on sdb1:8

EXT4-fs: delayed allocation enabled

EXT4-fs: file extents enabled

EXT4-fs: mballoc enabled

EXT4-fs: mounted filesystem with ordered data mode.

```

----------

