[Bug 1490115] [NEW] build a fully generic initrd.img without modules

Oliver Grawert ogra at ubuntu.com
Sat Aug 29 08:30:13 UTC 2015


Public bug reported:

currently our initrd.img on snappy contains modules and is not very
generic, this makes porting and maintaining the device tarball harder
than it should be, adds massively to the size of the initrd (which the
bootloader needs to load into ram during boot, requiring more ram and
causing slower boot times if the size is bigger by several megabytes due
to the modules) and duplicates the existing modules in the rootfs under
/lib/modules.

our initrd should be generic enough that a porter or maintainer of a
port does not need to make changes to it for updates of kernel or
modules but can just use the binary initrd.img file without
modifications.

to not duplicate the modules we should instead ship a "modules.img" file in /boot/$bootloader/a|b/ that the initrd can loop mount on startup. 
this has the advantage of having all modules readily available immediately without duplicating any of them and without having to maintain a list of which of them have to be shipped inside the initrd.
once the rootfs partition is mounted the loop mounted img file gets relocated to ${rootmount}/lib/modules via a "mount --move" command call and gets used as usual in the running rootfs.

in case we consider making squashfs built into the kernel a requirement,
the modules.img file could be a squashfs which could additionally reduce
our disk footprint.

implementing the above should only require a few minimal changes to the
existing initramfs scripts and some re-consideration of the partition
size for /boot (plus some changes to the device-tarball/kernel-snap
build instructions how to generate the modules.img)

** Affects: snappy
     Importance: Undecided
         Status: New

** Affects: initramfs-tools-ubuntu-core (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: livecd-rootfs (Ubuntu) => snappy

** Also affects: livecd-rootfs (Ubuntu)
   Importance: Undecided
       Status: New

** Package changed: livecd-rootfs (Ubuntu) => initramfs-tools-ubuntu-
core (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1490115

Title:
  build a fully generic initrd.img without modules

Status in Snappy:
  New
Status in initramfs-tools-ubuntu-core package in Ubuntu:
  New

Bug description:
  currently our initrd.img on snappy contains modules and is not very
  generic, this makes porting and maintaining the device tarball harder
  than it should be, adds massively to the size of the initrd (which the
  bootloader needs to load into ram during boot, requiring more ram and
  causing slower boot times if the size is bigger by several megabytes
  due to the modules) and duplicates the existing modules in the rootfs
  under /lib/modules.

  our initrd should be generic enough that a porter or maintainer of a
  port does not need to make changes to it for updates of kernel or
  modules but can just use the binary initrd.img file without
  modifications.

  to not duplicate the modules we should instead ship a "modules.img" file in /boot/$bootloader/a|b/ that the initrd can loop mount on startup. 
  this has the advantage of having all modules readily available immediately without duplicating any of them and without having to maintain a list of which of them have to be shipped inside the initrd.
  once the rootfs partition is mounted the loop mounted img file gets relocated to ${rootmount}/lib/modules via a "mount --move" command call and gets used as usual in the running rootfs.

  in case we consider making squashfs built into the kernel a
  requirement, the modules.img file could be a squashfs which could
  additionally reduce our disk footprint.

  implementing the above should only require a few minimal changes to
  the existing initramfs scripts and some re-consideration of the
  partition size for /boot (plus some changes to the device-tarball
  /kernel-snap build instructions how to generate the modules.img)

To manage notifications about this bug go to:
https://bugs.launchpad.net/snappy/+bug/1490115/+subscriptions



More information about the foundations-bugs mailing list