UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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....
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
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.