Skip to content

Although initramfs-tools is available . kernel has no initramfs support #256

Closed

Description

When having multiple USB devices attached to the Pi, and having root fs on one of them, it is required for reliable boot to have a cmdline.txt containing "root=LABEL=..." instead of "root=/dev/sdXY" since the device naming is not fixed. This requires an initramfs.

It would be nice to have initramfs support not only in userspace but in the kernel as well (I don't see any drawbacks).

I rebuilt the Pi's kernel (3.6.11) to have it support initramfs using the following in .config:

CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y

Using this kernel I was able to have it mount "root=LABEL=..."

Activity

  1. popcornmix commented on Mar 23, 2013

    @popcornmix
    Collaborator

    It would be nice to have initramfs support not only in userspace but in the kernel as well (I don't see any drawbacks).

    What is the free memory reported after boot with and without the change?

  2. popcornmix commented on Mar 23, 2013

    @popcornmix
    Collaborator

    I think the free memory in the first case is:
    230376+16056+93132 = 339564
    and with initramfs compiled in
    230588+15824+93020 = 339432

    So I think you've lost 132K. That seems a bit high for a feature <1% of people will make use of.

  3. ghost closed this as completedon Mar 23, 2013
  4. ghost reopened this on Mar 26, 2013
  5. mkj commented on Jun 3, 2013

    @mkj
    Contributor

    I'd like to see initramfs for a remote network recovery console. By my measurements I see around a 56kB increase in memory use. The numbers from adding free memory fluctuate quite a lot between boots, even with identical sdcard images. I've done 30x boots of each kernel in https://github.com/Torlus/qemu-rpi , averaged below using https://github.com/rustyrussell/stats . Even just the without-gz variant would be useful if memory is a concern.

    Looking at free memory:

    no initrd:     413035+6215.47+16684.5 = 435934kB
    initrd gz:     412963+6216+16699.6    = 435878kB -> -56 kB
    initrd no gz:  413002+6216+16693.1    = 435911kB -> -24 kB
    

    Or looking at the "used column":

    no initrd:    35732.7kB
    initrd gz:    35788.7kB -> +56kB
    initrd no gz: 35766.3kB -> +33.6kB
    

    Measured results. Output was printed in rc.local. I've got /proc/meminfo if there's something relevant there too.

    Current head 3.6.11+ (30 May, 5d5301e598) 
    No initrd:
                 total       used       free     shared    buffers     cached
    Mem:        448768 35452-35956(35732.7+/-98) 412812-413316(413035+/-98)          0 6208-6216(6215.47+/-2) 16628-16820(16684.5+/-42)
    Initrd with gz:
                 total       used       free     shared    buffers     cached
    Mem:        448752 35588-35968(35788.7+/-98) 412784-413164(412963+/-98)          0       6216 16648-16820(16699.6+/-50)
    Initrd without gz:
                 total       used       free     shared    buffers     cached
    Mem:        448768 35564-35860(35766.3+/-80) 412908-413204(413002+/-80)          0       6216 16648-16820(16693.1+/-46)
    
  6. popcornmix commented on Dec 29, 2014

    @popcornmix
    Collaborator

    Closing issue since there has been no activity for more than 2 months. Reopen if needed.

  7. 2 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions