# unknown filesystem type 'ext2' [SOLVED]

## while true

Ola

First off, sorry for opening the tread that has so many entries on this forum,

but I am newbie and I kindly ask for more info.

Thank you.

I have:

Intel(R) Pentium(R) M processor 1400MHz, 500mb ram, dell latitude d500 (laptop)

after changing kernel (one option) I followed the handbook

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7

(Was I looking at right handbook? I have it bookmarked for quite long...

I see some changes in handbook (kernel version), could it be the author made a typo?)

(compiling took cca 15 minutes of new kernel)

and it did look suspicious, but since it is in handbook I proceeded anyway:

# cp arch/i386/boot/bzImage /boot/kernel-2.6.34-gentoo-r1

and rebooted.

Boot gave me several errors, so I decided to undo one change I made to kernel.

(compiling was 60 or so lines long - lightning fast)

and I can see this line several lines form the end:

Kernel: arch/x86/boot/bzImage is ready  (#2)

well, newbie as I am, I proceded to copy new kernel,

but came to  cold stop:

```
1-4 linux # mount /dev/sda1 /boot 

mount: unknown filesystem type 'ext2'
```

I was surprised to see:

```
File systems --->

      < > Second extended fs support 
```

when I was booting now for almost a year,

and I was making changes to kernel before...

(always following the open bookmarked handbook)

So I selected everything in ext2 and recompiled kernel

(this took ccs 25 minutes)

but this still won't work, since it is not in /boot...

```
1-4 linux # mount /dev/sda1 /boot 

mount: unknown filesystem type 'ext2'
```

So I searched the net:

https://forums.gentoo.org/viewtopic-t-706781-highlight-unknown+filesystem+ext2.html

but:

```
1-4 linux # modprobe ext2

FATAL: Module ext2 not found.

1-4 linux # tune2fs -O has_journal /dev/sd1

tune2fs 1.41.12 (17-May-2010)

tune2fs: No such file or directory while trying to open /dev/sd1

Couldn't find valid filesystem superblock.
```

https://forums.gentoo.org/viewtopic-t-810340-highlight-unknown+filesystem+ext2.html

```
# swapon /dev/sda2

# mount -t ext3 /dev/sda3 /mnt/gentoo

# mount /dev/sda1 /mnt/gentoo/boot

# cd /mnt/gentoo

# mount -t proc none /mnt/gentoo/proc

# chroot /mnt/gentoo /bin/bash

# env-update

# source /etc/profile

do whatever you have to do

# exit

# cd

# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo

# reboot
```

If this is required, I will need to ask some more questions...

I found the similar answer here:

https://forums.gentoo.org/viewtopic-t-805762-highlight-unknown+filesystem+ext2.html

and tried explicit mounting as suggested here:

https://forums.gentoo.org/viewtopic-t-793585-highlight-unknown+filesystem+ext2.html

```
1-4 linux # mount -t ext2 /dev/sda1 /boot

mount: unknown filesystem type 'ext2'

1-4 linux # grep ext2 /etc/fstab

/dev/sda1               /boot           ext2            default,noatime 1 2
```

What am I to do?

Thank you

----------

## VoidMage

First pastebin your kernel config.

If your kernel is recent enough, you may set it up to use ext4 driver for both ext2 and ext3.

Also, that filesystem either needs to be builtin or you need an initramfs.

----------

## while true

Ola VoidMage,

Thank you for prompt reply

My kernel is 2.6.32-r7, 

and I use gentoo-sources-2.6.32-r24

How do I get kernel config (so I can pastebin it)?

(I am so sorry for noobness)

Thank you

EDIT

is this the right one?

/usr/src/linux-2.6.32-gentoo-r7/.config

http://pastebin.com/nSiLKvYP

/usr/src/linux-2.6.32-gentoo-r24/.config

http://pastebin.com/FuCY2vH1

----------

## erdem

 *while true wrote:*   

> Ola
> 
> after changing kernel (one option) I followed the handbook
> 
> http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7
> ...

 

Sure   :Wink: 

 *while true wrote:*   

> Ola
> 
> # cp arch/i386/boot/bzImage /boot/kernel-2.6.34-gentoo-r1
> 
> and rebooted.
> ...

 

You may give a name whatever you like. i.e

# cp arch/i386/boot/bzImage /boot/mynewkernel

Did you also changed your /boot/grub/grub.conf accordingly.

```
nano /boot/grub/grub.conf
```

 *Quote:*   

> title Gentoo Linux
> 
> root (hd0,1)
> 
> kernel /boot/mynewkernel real_root=dev/sda3
> ...

 

 *while true wrote:*   

> Ola
> 
> I was surprised to see:
> 
> ```
> ...

 

Yeah you need to compile ext2 file system support  to kernel to mount these partitions. Also if u can not mount boot partition try booting system with minimal install CD or live CD.

After compiling kernel you should do these exactly:

```
[code]make menuconfig 

make && make modules_install

cp arch/i386/boot/bzImage /boot/mynewkernel[/code]

<-- change your grub.conf as i mentioned above -->
```

Your .config is in /usr/src/linux directory. To be able to understand whether your kernel has ext2 support or not please paste the output of partitions.txt and config.txt here

```
cd ~

fdisk -l /dev/sda > partitions.txt

cat /usr/src/linux/.config | grep CONFIG_EXT2 > ~/config.txt
```

----------

## NeddySeagoon

while true,

Configure ext2 as a module <M> exit menuconfig and run 

```
make modules

make modules_install

modprobe ext2
```

after that sequence of commands you have made ext2 as a loadable kernel module and loaded it.

Now you can use it to mount /boot.

When you upgrade to a new kernel version, you can make ext2 support as <*>

----------

## while true

Hello all,

First, thanks to new member erdem, whos first post was to reply to me, kheh, 

if you ever came to Ljubljana I'll buy you a beer!

And thanks to others heavy duty members, kheh...

There is a bit of missunderstooding:

I was suspecious about this line:

```
# cp arch/i386/boot/bzImage /boot/kernel-2.6.32-gentoo-r7
```

and I emphasise i386... 

This copied NOT THE RIGHT kernel, the one that gave me trouble.

I solved the problem by copying kernel to boot with x86:

```
# cp arch/x86/boot/bzImage /boot/kernel-2.6.32-gentoo-r7
```

And is this typo in handbook?

Now, back to the problem I had, I solved it like so:

(I have kernel 2.6.32-r7 and gentoo-sources-2.6.32-r24 to manipulate it)

http://www.gentoo.org/doc/en/kernel-upgrade.xml

In upper link I found out, that I can use config from old kernel to configure new

so I reversed that:

```
# cd /usr/src/linux-2.6.32-gentoo-r7

# cp ../linux-2.6.32-gentoo-r24/.config .

# cd /usr/src/linux

# make menuconfig
```

I made no changes and saved on exit

```
# make && make modules_install
```

So this is the right kernel, now how to copy it in boot?

I used installation cd, when booted I did:

```
# mount /dev/hda3 /mnt/gentoo/

# mount /dev/hda1 /mnt/gentoo/boot

# cd /mnt/gentoo/usr/src/linux

# cp arch/x86/boot/bzImage /mnt/gentoo/boot/kernel-2.6.32-gentoo-r7

# umount /mnt/gentoo/boot

# umount /mnt/gentoo/

# reboot.
```

This solved the problem I had.

I had a hard day today...

Thank you all for bearing with me.

----------

## erdem

 *while true wrote:*   

> 
> 
> There is a bit of missunderstooding:
> 
> I was suspecious about this line:
> ...

 

I don't think so. And i realized this i386 and x86 thing first time after you mentioned about it   :Wink: 

I routinely used to copy the kernel image in i386 to /boot partition. I realized that there was a x86 directory after you mentioned it  :Smile: 

According to wikipedia the Intel 80386, also known as the i386 was a 32-bit microprocessor introduced by Intel in 1985. The term x86 refers to a family of instruction set architectures  based on the Intel 8086 CPU. So one of them is the name of the microprocessor one of them is the name of the instruction set. I suppose old CPU's may use i386 kernel image and newer ones the kernel image in x86 directory.

For example Pentium M CPU's have  x86 instruction set. They use the i686 architecture.

May be gentoo professionals may further illuminate us on this subject.

----------

## NeddySeagoon

while true,

A long time ago there were seperate chunks of kernel source for 32 bit i386 and 64 bit x86_64 systems.

Around kernel 2.6.26 these sources were merged in x86 and i386 and x86_64 became sym links to x86.

x86 contains either a 32 bit or a 64 bit kernel, depending on how its configured.

----------

## while true

Ola guys,

I did test your contra - and you are right.

(first I made copy of my x86 kernel in boot, kheh,)

and I copied in boot kernel from i386, rebooted and it works...

This left me with big question mark over my head...

What then initially went wrong?

Now everything seems to work

I will say what Ed Chigliack said:

Do not go there where you are not invited.

So now I have right kernel (i386, the microprocessor version,

and not the x86, the family of instruction set)

And if I understand NeddySeagoon:

 *Quote:*   

> Around kernel 2.6.26 these sources were merged in x86 
> 
> and i386 and x86_64 became sym links to x86.

 

it does not matter if I copy kernel from x86 or i386, since i386 and x86_64 are just links to x86

(x86 containing actual image file, and i386 and x86_64 just points to it)

Again, and not enough: THANK YOU!

----------

