LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-11-2015, 12:40 AM   #1
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Rep: Reputation: 39
Talking ext2.ko missing for 3.13 and 3.16 kernels?


Hi all,

I have a 14.04 system that was installed about 5-7 years ago and has been upgraded with each release. It's been working well.

Right now it is running kernel 3.2.0-39 but that is not the kernel for Trusty. In upgrading to a number of 3.13 or 3.16 kernels finds me unable to boot; dropped to a initramfs prompt. Looking further the initramfs for these kernels is not getting the ext2 module. Looking further and the file:

/lib/modules/<kernel>/kernel/fs/ext2/ext2.ko

is missing on the file system. I grabbed the packages and unpacked them manually and this is indeed the case.

So does 14.04 compile ext2 support into the kernel and doesn't use an initramfs perhaps? Or is there something else I am missing here?

The system is running ok on the 3.2.0-39 kernel but I'd like to get it up the Trusty kernel.

Any thoughts on this would be appreciated.
 
Old 02-11-2015, 12:50 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
You can use ext3 or ext4 to access a ext2 system. But they may convert them to newer fomat which is not reversible.
 
Old 02-11-2015, 02:54 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by DaveQB
So does 14.04 compile ext2 support into the kernel and doesn't use an initramfs perhaps?
Should be easy enough to check
Code:
grep -iE ext[[:digit:]] /boot/config-$(uname -r)
Change as necessary for Ubuntu naming conventions.
Quote:
Originally Posted by veerain View Post
You can use ext3 or ext4 to access a ext2 system.
True- best to use ext4.
Quote:
But they may convert them to newer fomat which is not reversible.
Not true. Simply mounting should not introduce any on-disk format changes; e2fsprogs supports all of ext[234] in the same codebase.
 
1 members found this post helpful.
Old 02-11-2015, 03:04 AM   #4
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Not true. Simply mounting should not introduce any on-disk format changes
Yes. You are right. To convert tune2fs is used.
 
Old 02-11-2015, 04:39 AM   #5
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by syg00 View Post
Should be easy enough to check
Code:
grep -iE ext[[:digit:]] /boot/config-$(uname -r)
Good one!
So the working 3.2.0-39 kernel has ext2 as a module and ext3 & ext4 compiled in.

The 3.16.0-30 kernel has ext2 & ext3 not set and ext4 compiled in.
So with that, how is the initramfs meant to grab any extX modules?

I feel my grub configs might not have been updated and are this loading the kernel incorrectly.

I might need a 14.04 VM to work out it's boot process.

Anyone know?

Thanks for your responses guys.
 
Old 02-11-2015, 04:46 AM   #6
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
The most easy hack if you have skill is to edit initramfs image manually and use ext4 wherever ext2 is needed.
 
1 members found this post helpful.
Old 02-11-2015, 05:02 AM   #7
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Original Poster
Rep: Reputation: 39
But the issue is there is no extX module available for this kernel to manually add into it's initramfs.
I would have to compiled that module myself.
I not sure why these modules are mixing with these standard kernel packages in Ubuntu 14.04. It feels like the system is meant to boot without an initramfs....

Thanks
 
Old 02-11-2015, 07:08 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Any new kernel should ship with, or rebuild, the initramfs so it is appropriate. Make sure the initramfs matches the kernel.

Else, as suggested, manually extract the contents, and delete the references to ext2 from the initramfs. It is not needed - unless you have the root filesystem as ext2 specifically. Then rebuild the archive.
Easier maybe to use update-initramfs - although if you do that (a "-c") it will probably include ext2 again as you will have that loaded on the (older) current kernel. If it were me, I'd unload the ext2 module before running the update-initramfs.

(all guess-work on my part as I don't run Ubuntu).

Last edited by syg00; 02-11-2015 at 07:31 AM. Reason: strike'd the "root as ext2" comment
 
Old 02-11-2015, 07:43 AM   #9
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Original Poster
Rep: Reputation: 39
Thanks for the response.
The boot fs is ext2. But you can use ext2 driver to open ext3 and I suspect ext4 you just lose the journaling.

You have some good advice there. I'm just not sure why this is necessary. I mean all other users of Ubuntu 14.04 aren't messing with their initramfs. I'm setting up 14.04 in a VM to inspect a working system. I really want to learn exactly what has happened here.
 
Old 02-11-2015, 09:29 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,613

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by veerain View Post
The most easy hack if you have skill is to edit initramfs image manually and use ext4 wherever ext2 is needed.
This is the second time you've given this VERY BAD and INCORRECT ADVICE. From the kernel.org page: https://www.kernel.org/doc/Documenta...-initramfs.txt
Quote:
Originally Posted by Kernel Website
The 2.6 kernel build process always creates a gzipped cpio format initramfs archive and links it into the resulting kernel binary. By default, this archive is empty
Do you mind sharing with us the 'most easy hack' you're talking about?? How to edit the initramfs image manually??? Since you say it's the "most easy hack", you must have done it before, so please share your technique about manually editing a gzipped CPIO format file.
 
Old 02-11-2015, 11:16 AM   #11
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
initramfs can be separate compressed cpio file to be provided to bootloader. I am doing it for years. With grub it is given to initrd command. Same kernel documentation link details how to unpack and pack initramfs images.
 
Old 02-11-2015, 02:41 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,613

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by veerain View Post
initramfs can be separate compressed cpio file to be provided to bootloader. I am doing it for years. With grub it is given to initrd command. Same kernel documentation link details how to unpack and pack initramfs images.
Great...so as you've been asked MULTIPLE times now: GIVE US EXAMPLES. You said this is a "most easy hack"..so it should be "most easy" for you to write up the steps. If you could easily edit this file, then why do the instructions on kernel.org tell you to use a UTILITY to generate it, along with making modifications to it?? Why don't they just tell you to edit the file manually??

Again, yes, we know what the initramfs file is, and it was even mentioned that it was a gzipped cpio file, so you're not telling us anything new. Manually editing that file is an EXTRAORDINARILY BAD IDEA, is needlessly complex, and won't really solve the OP's original question. As you've been asked before, don't post bad or misleading advice.
 
Old 02-11-2015, 05:50 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Rubbish.
People have been editting initrd forever - initramfs is conceptually the same. Grab a copy, unzip it, feed the result into cpio, have a play, pack it all up again. Not that I generally advocate it, but certainly a good learning exercise.
Try searching on "unpack initramfs".

The in-kernel initramfs is rarely used in the non-embedded world I suspect - even by those of us that compile our own kernels.
 
Old 02-11-2015, 10:29 PM   #14
DaveQB
Member
 
Registered: Oct 2003
Location: Sydney, Australia.
Distribution: Debian, Ubuntu
Posts: 400

Original Poster
Rep: Reputation: 39
I have to say I remember editing initrd files after unpacking with cpio 10 years ago. Good experience that was successful too.
Not that hard once you get into it.

So I could unpack it and add the ext2 driver. But I need the driver for these kernels AND it's not sustainable as anything that triggers DKMS with rebuild the initramfs and it will be borked.

I need to find the root cause
 
Old 02-12-2015, 08:33 AM   #15
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,613

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by syg00 View Post
Rubbish.
People have been editting initrd forever - initramfs is conceptually the same. Grab a copy, unzip it, feed the result into cpio, have a play, pack it all up again. Not that I generally advocate it, but certainly a good learning exercise. Try searching on "unpack initramfs".

The in-kernel initramfs is rarely used in the non-embedded world I suspect - even by those of us that compile our own kernels.
Yes, people HAVE been doing it by hand, and I do KNOW how to do it. However, advising the OP to do this to solve their problem isn't the best way to go...nor is it the "most easy hack".

A learning exercise? Certainly; best way to solve this problem? No, not by a long shot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] AMD_IOMMU module is missing from slackware kernels j_v Slackware 15 10-26-2017 08:39 AM
Missing /dev/sda etc when booting custom kernels drmozes Slackware 5 07-04-2010 05:56 PM
TTY0 missing in newer kernels theNbomr Linux - Kernel 8 01-14-2009 09:34 AM
EXT2 -fs warning (device sda1): ext2_fill_super:mounting ext3 filesystem as ext2 snakeo2 Linux - Newbie 6 11-19-2006 07:35 PM
Missing primary node on ext2 Temujin_12 Linux - General 8 05-15-2006 08:13 AM

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

All times are GMT -5. The time now is 08:32 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