daokenen
Posts: 1
Joined: Fri Sep 21, 2012 12:29 am

feature request: support initramfs in standard kernel

Fri Sep 28, 2012 10:59 pm

Would it be possible to have the standard kernel.img include initramfs support (CONFIG_BLK_DEV_INITRD=yes)? Doing so will only increase the kernel size by a tiny amount, but the resulting flexibility will be very useful.

I'm trying to use Btrfs as the root filesystem, but the lack of initramfs support makes it impossible to load up the btrfs.ko module at boot time. My only solution is to recompile the kernel, which I'd like to avoid to reduce my work after major Raspbian system updates that upgrade the kernel.

I know that kernel_emergency.img has initramfs support as well as including Busybox, but it unfortunately doesn't help. I can easily create an initramfs containing btrfs.ko (by adding "btrfs" to /etc/initramfs-tools/modules and executing "update-initramfs -k 3.2.27+"), but the version of btrfs.ko on a standard Raspbian system is incompatible with kernel_emergency.img. The emergency kernel refuses to load the module, reporting the error "disagrees about version of symbol module_layout" and "Invalid module format". This behavior is apparently caused by differences in configuration options between the modules and the kernel. The only way this would work is to use the btrfs.ko module built with kernel_emergency.img, not kernel.img.

If there's another way to achieve my goal with existing kernels, please let me know. Otherwise, the simple solution of enabling initramfs support would be useful for many people who need to customize the boot process without costing that much for the Raspbian developers.

buddymoore
Posts: 7
Joined: Fri Jan 04, 2013 2:31 am

Re: feature request: support initramfs in standard kernel

Fri Jan 11, 2013 6:10 pm

Did this go anywhere? I need this feature as well.

In my case, I need ums-cypress. I went through the process of creating an initramfs, but then later realized it's off by default.

I'm having similar problems with kernel updates removing necessary built-ins in my kernel.

plugwash
Forum Moderator
Forum Moderator
Posts: 3766
Joined: Wed Dec 28, 2011 11:45 pm

Re: feature request: support initramfs in standard kernel

Fri Jan 11, 2013 6:16 pm

There is now a kernel package in the raspbian repository.

apt-get install linux-image-3.2.0-4-rpi

This is independent of the kernel that the foundation embeds in their firmware package.

buddymoore
Posts: 7
Joined: Fri Jan 04, 2013 2:31 am

Re: feature request: support initramfs in standard kernel

Fri Jan 11, 2013 6:25 pm

So why does Raspbian wheezy not use this kernel yet?

Edit:
Here's the original reason for the comeback for initramfs support:
https://github.com/Hexxeh/rpi-update/issues/62

Hexxeh is "under" Rasbpian, right? So even if I use that Raspbian kernel update, rpi-update would still blow away that kernel with initrafms, right?

plugwash
Forum Moderator
Forum Moderator
Posts: 3766
Joined: Wed Dec 28, 2011 11:45 pm

Re: feature request: support initramfs in standard kernel

Fri Jan 11, 2013 6:29 pm

What the raspberry Pi foundation chose to do in their images is their descision not ours.

buddymoore
Posts: 7
Joined: Fri Jan 04, 2013 2:31 am

Re: feature request: support initramfs in standard kernel

Fri Jan 11, 2013 6:33 pm

That is fair enough.

On one hand, I'm trying to verify my perspective on the matter (your statement supports that), but on the other hand, I'm trying to decide whether I should invest effort in a custom script/solution, or try to add another vote to the bucket for adding this feature permanently in the stock kernel (which your statement helps move toward that goal).

I appreciate the assessment.

chrisw2
Posts: 106
Joined: Sat Apr 07, 2012 11:22 am
Location: Manchester, UK

Re: feature request: support initramfs in standard kernel

Fri Jan 11, 2013 10:11 pm

plugwash wrote:There is now a kernel package in the raspbian repository.

apt-get install linux-image-3.2.0-4-rpi

This is independent of the kernel that the foundation embeds in their firmware package.
Plugwash,

Many thanks for this. Presumably you are fairly confident of its stability? or would you like reports from those that try it out?

Let hope that at some stage the foundation will provide a firmware package without their embedded kernel.

chrisw2
Posts: 106
Joined: Sat Apr 07, 2012 11:22 am
Location: Manchester, UK

Re: feature request: support initramfs in standard kernel

Sun Jan 13, 2013 5:22 pm

linux-image-3.2.0-4-rpi (with rpi firmware from 2012/10/25)

To get this to boot I had to make the following change to config.txt:

Code: Select all

# Set params for "raspbian debian-style kernel" boot
kernel=vmlinuz-3.2.0-4-rpi
initramfs initrd.img-3.2.0-4-rpi followkernel
Not had it running for long but all appears to be working okay.

Return to “Raspberry Pi OS”