[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#764805: initramfs-tools: Provide a way to preseed additions to /etc/initramfs-tools/modules



On Sat, 2014-10-11 at 21:58 +0100, Ben Hutchings wrote:
> On Sat, 2014-10-11 at 11:39 +0100, Ian Campbell wrote:
> > Source: initramfs-tools
> > Version: 0.116
> > Severity: wishlist
> > 
> > Dear Maintainer,
> > 
> > Issues such as #762042 would be somewhat less critical for the affected
> > platforms if there was a mechnism for preseeding a list of additional modules
> > which should be included in the initrd, by adding them to
> > /etc/initramfs-tools/modules at install time.
> 
> The installer already has a mechanism for adding modules to this list
> (register-module -i).

So it does. Thanks for the pointer. But...

> That doesn't allow arbitrary modules to be added by pre-seeding, and I'm
> not convinced that it should.  That should only ever be a workaround,
> not something we expect to be widely used.  You can accomplish such
> workarounds with late_command already.

.. it doesn't seem to work for me from late_command. Looking at the
resulting syslog it seems like late_command is processed after the
system is made bootable. i.e. after the ramdisk is generated.
        # grep -E register-module\|initramfs /var/log/insta
        Jan  2 00:00:49 kernel: [    0.173214] Unpacking initramfs...
        Oct 12 12:23:26 in-target:   initramfs-tools klibc-utils libklibc
        Oct 12 12:23:27 in-target: Get:3 http://ftp.uk.debian.org/debian/ jessie/main initramfs-tools all 0.116 [89.0 kB]
        Oct 12 12:23:29 in-target: Selecting previously unselected package initramfs-tools.
        Oct 12 12:23:29 in-target: Preparing to unpack .../initramfs-tools_0.116_all.deb ...
        Oct 12 12:23:29 in-target: Unpacking initramfs-tools (0.116) ...
        Oct 12 12:23:31 in-target: Setting up initramfs-tools (0.116) ...
        Oct 12 12:23:31 in-target: update-initramfs: deferring update (trigger activated)
        Oct 12 12:23:32 in-target: Processing triggers for initramfs-tools (0.116) ...
        Oct 12 12:24:03 in-target: /etc/kernel/postinst.d/initramfs-tools:
        Oct 12 12:24:03 in-target: update-initramfs: Generating /boot/initrd.img-3.16-2-armmp-lpae
        Oct 12 12:59:12 in-target: update-initramfs: Generating /boot/initrd.img-3.16-2-armmp-lpae
        Oct 12 13:11:52 in-target: update-initramfs: Generating /boot/initrd.img-3.16-2-armmp-lpae
        Oct 12 13:12:05 preseed: running preseed command preseed/late_command: register-module -i s5m8767 && register-module -i i2c-s3c2410 && register-module -i phy-exynos5250-sata
        Oct 12 13:12:11 finish-install: info: Running /usr/lib/finish-install.d/10update-initramfs
        Oct 12 13:13:05 preseed: running preseed command preseed/late_command: register-module -i s5m8767 && register-module -i i2c-s3c2410 && register-module -i phy-exynos5250-sata
        Oct 12 13:13:12 finish-install: info: Running /usr/lib/finish-install.d/10update-initramfs
        
(10update-initramfs only does updates relating to encrypted LVM setup)

The modules are not present in /etc/initramfs-tools/modules either, so I
think late_command must be after whatever propagates the result of
register-module to the installed system too.

I'll try running it from early_command and see if that makes any
difference...

Ian.


Reply to: