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. |
You can use ext3 or ext4 to access a ext2 system. But they may convert them to newer fomat which is not reversible.
|
Quote:
Code:
grep -iE ext[[:digit:]] /boot/config-$(uname -r) Quote:
Quote:
|
Quote:
|
Quote:
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. |
The most easy hack if you have skill is to edit initramfs image manually and use ext4 wherever ext2 is needed.
|
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 |
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). |
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. |
Quote:
Quote:
|
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.
|
Quote:
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. |
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. |
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 |
Quote:
A learning exercise? Certainly; best way to solve this problem? No, not by a long shot. |
All times are GMT -5. The time now is 10:52 PM. |