Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unknown filesystem type 'ext2' [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Thu Mar 10, 2011 10:29 am    Post subject: unknown filesystem type 'ext2' [SOLVED] Reply with quote

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:
Code:
1-4 linux # mount /dev/sda1 /boot
mount: unknown filesystem type 'ext2'

I was surprised to see:
Code:
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...
Code:
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:
Code:
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
Code:
# 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
Code:
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
_________________
Kind regards, Goran Mitic

alive
while true
kick ass


Last edited by while true on Thu Mar 10, 2011 8:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Thu Mar 10, 2011 11:21 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Thu Mar 10, 2011 11:45 am    Post subject: Reply with quote

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
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
erdem
n00b
n00b


Joined: 10 Mar 2011
Posts: 6

PostPosted: Thu Mar 10, 2011 5:46 pm    Post subject: Re: unknown filesystem type 'ext2' [I know, again] Reply with quote

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
(Was I looking at right handbook?

Sure :wink:

while true wrote:
Ola
# 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.


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.

Code:
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:
Code:
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...
Code:
1-4 linux # mount /dev/sda1 /boot
mount: unknown filesystem type 'ext2'



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:
[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

Code:
cd ~
fdisk -l /dev/sda > partitions.txt
cat /usr/src/linux/.config | grep CONFIG_EXT2 > ~/config.txt
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55288
Location: 56N 3W

PostPosted: Thu Mar 10, 2011 7:18 pm    Post subject: Reply with quote

while true,

Configure ext2 as a module <M> exit menuconfig and run
Code:
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 <*>
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Thu Mar 10, 2011 8:38 pm    Post subject: Reply with quote

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:
Code:
# 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:
Code:
# 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:
Code:
# 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
Code:
# 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:
Code:
# 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.
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
erdem
n00b
n00b


Joined: 10 Mar 2011
Posts: 6

PostPosted: Thu Mar 10, 2011 11:54 pm    Post subject: Reply with quote

while true wrote:


There is a bit of missunderstooding:
I was suspecious about this line:
Code:
# 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:
Code:
# cp arch/x86/boot/bzImage /boot/kernel-2.6.32-gentoo-r7


And is this typo in handbook?


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 :)

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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 55288
Location: 56N 3W

PostPosted: Fri Mar 11, 2011 12:10 am    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
while true
Guru
Guru


Joined: 07 Apr 2010
Posts: 532
Location: Ljubljana, Slovenia

PostPosted: Sat Mar 12, 2011 9:31 am    Post subject: Reply with quote

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!
_________________
Kind regards, Goran Mitic

alive
while true
kick ass
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum