-   Gentoo (
-   -   Gain access to ext2 partition without ext2 support in kernel (

ColInvictus 10-25-2009 08:58 PM

Gain access to ext2 partition without ext2 support in kernel
So I've managed to get Gentoo up and running (and it only took 3 attempts to configure the kernel mostly correctly!)

However, during boot the message "mount: unknown filesystem type 'ext2'" appears and once I'm logged in I can't access the boot partition, which was formatted as ext2 - the root partition is ext3.

I take it I'll need to compile ext2 support into the kernel? How do I copy the image file to /boot if I can't access it? Is there another way to get access to it?

ColInvictus 10-25-2009 09:42 PM

Done some thinking and this is my plan of attack:

cd /usr/src/linux
make clean && make mrproper && make menuconfig
# add ext2 support in the .config from before
make && make modules_install

Then boot from a livecd and copy the bzImage file into the boot partition, edit grub.conf as necessary, cross my fingers and reboot.

Before I go ahead and try this, can anyone tell me if it'll actually work?


markush 10-26-2009 02:42 AM

Hello ColInvictus,

dont't make clean and make mrproper. This would force you to do a completely new configuration.

Another thing is that afaik ext3-support depends on ext2-support. I think that it is not possible, that a kernel supports ext3 without supporting ext2. The ext3 is a ext2 with an added journaling.
Maybe that your errormessage at boottime points you to another problem.

Here a part of the kernelconfiguration-helpmessages regarding to ext3

...Other than adding the journal to the file system, the on-disk format
of ext3 is identical to ext2. It is possible to freely switch
between using the ext3 driver and the ext2 driver, as long as the
file system has been cleanly unmounted, or e2fsck is run on the file

To add a journal on an existing ext2 file system or change the
behavior of ext3 file systems, you can use the tune2fs utility ("man
tune2fs"). To modify attributes of files and directories on ext3
file systems, use chattr ("man chattr"). You need to be using
e2fsprogs version 1.20 or later in order to create ext3 journals
(available at <>)...
So it may be a good idea to change your /boot-partition to ext3 instead of building a new kernel.


ColInvictus 10-26-2009 07:57 AM

Hi markush, thanks for replying.

To test the theory, I rebooted using an ubuntu livecd I keep handy for just such occasions and could access the ext2 partition fine. I then attached an old ext2 formatted drive and booted back into gentoo and couldn't mount it - same unknown filesystem error. Checked /usr/src/linux/.config and found "# CONFIG_EXT2_FS is not set". So I copied .config to /root (thanks for the heads up!), went ahead with my plan, loading and fixing the .config I'd copied, and - mirabile dictu! - it worked.

So, thanks again for your reply and problem solved.


All times are GMT -5. The time now is 09:26 PM.