LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices


Reply
  Search this Thread
Old 10-25-2009, 07:58 PM   #1
ColInvictus
Member
 
Registered: Apr 2009
Posts: 42

Rep: Reputation: 15
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?

Last edited by ColInvictus; 10-25-2009 at 07:59 PM. Reason: ninja'd for great exactitude
 
Old 10-25-2009, 08:42 PM   #2
ColInvictus
Member
 
Registered: Apr 2009
Posts: 42

Original Poster
Rep: Reputation: 15
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?

Ta
 
Old 10-26-2009, 01:42 AM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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
Quote:
...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
system.

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 <http://sourceforge.net/projects/e2fsprogs/>)...
So it may be a good idea to change your /boot-partition to ext3 instead of building a new kernel.

Markus
 
Old 10-26-2009, 06:57 AM   #4
ColInvictus
Member
 
Registered: Apr 2009
Posts: 42

Original Poster
Rep: Reputation: 15
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.

Col

Last edited by ColInvictus; 10-26-2009 at 06:59 AM. Reason: sp
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
EXT2 -fs warning (device sda1): ext2_fill_super:mounting ext3 filesystem as ext2 snakeo2 Linux - Newbie 6 11-19-2006 07:35 PM
Kernel Panic with Ext2/Ext3 partition check kewlemer Linux - General 3 04-06-2005 07:49 PM
How To Format A Partition Into Ext2 ? Help lemon_hou Linux - Hardware 1 04-27-2004 04:30 AM
kernel support ext2 bingbang Linux From Scratch 6 03-29-2004 02:15 PM
how to resize a ext2 partition? Thievery Linux - Newbie 3 03-21-2002 05:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 06:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration