initramfs does not copy ehci-platform

Bug #1842284 reported by Ike Panhc
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Ike Panhc
Bionic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
If you install Ubuntu onto USB storage behind a Platform USB host controller, it will not be able to boot because the generated initramfs will not include the host controller driver.

[Test Case]
Install to a USB stick attached to platform USB controller and reboot. Booting will fail because it will be unable to find the root file system.

[Regression Risk]
Driver is only loaded when system requires ehci-platform, minimizing the impact to all other systems.

Ike Panhc (ikepanhc)
description: updated
Revision history for this message
Ike Panhc (ikepanhc) wrote :
Changed in initramfs-tools (Ubuntu Xenial):
assignee: nobody → Ike Panhc (ikepanhc)
Changed in initramfs-tools (Ubuntu):
status: New → Invalid
Changed in initramfs-tools (Ubuntu):
status: Invalid → Confirmed
status: Confirmed → In Progress
tags: added: patch
dann frazier (dannf)
Changed in initramfs-tools (Ubuntu Eoan):
status: In Progress → Fix Released
Changed in initramfs-tools (Ubuntu Disco):
status: New → Fix Released
Changed in initramfs-tools (Ubuntu Bionic):
status: New → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote :

What kernel is it that includes an ehci-platform driver? I'm not seeing it in linux or linux-hwe in xenial.

Revision history for this message
dann frazier (dannf) wrote :

Maybe it is only on ARM?

dannf@xps13:/tmp$ dpkg -c linux-modules-4.15.0-64-generic_4.15.0-64.73~16.04.1_arm64.deb | grep ehci-platform
-rw-r--r-- root/root 17238 2019-09-13 06:10 ./lib/modules/4.15.0-64-generic/kernel/drivers/usb/host/ehci-platform.ko

Changed in initramfs-tools (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Ike, or anyone else affected,

Accepted initramfs-tools into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.122ubuntu8.15 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in initramfs-tools (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Ike Panhc (ikepanhc) wrote :

ehci-platform is built-in for amd64/i386 but is module in other arch

$ git grep EHCI_HCD_PLATFORM debian.hwe/config
debian.hwe/config/amd64/config.common.amd64:CONFIG_USB_EHCI_HCD_PLATFORM=y
debian.hwe/config/annotations:CONFIG_USB_EHCI_HCD_PLATFORM policy<{'amd64': 'y', 'arm64': 'm', 'armhf': 'n', 'i386': 'y', 'ppc64el': 'm'}>
debian.hwe/config/annotations:CONFIG_USB_EHCI_HCD_PLATFORM mark<ENFORCED> note<Don't use the generic ehci/ohci code on omap, it doesn't work> flag<REVIEW>
debian.hwe/config/arm64/config.common.arm64:CONFIG_USB_EHCI_HCD_PLATFORM=m
debian.hwe/config/armhf/config.common.armhf:# CONFIG_USB_EHCI_HCD_PLATFORM is not set
debian.hwe/config/i386/config.common.i386:CONFIG_USB_EHCI_HCD_PLATFORM=y
debian.hwe/config/ppc64el/config.common.ppc64el:CONFIG_USB_EHCI_HCD_PLATFORM=m
debian.hwe/config/x32/config.common.x32:CONFIG_USB_EHCI_HCD_PLATFORM=m
debian.hwe/config/x32/config.flavour.generic:CONFIG_USB_EHCI_HCD_PLATFORM=m

Revision history for this message
Ike Panhc (ikepanhc) wrote :

$ zcat /boot/initrd.img-4.15.0-64-generic | cpio -idmv 2> /dev/null
$ find . -name 'ehci*'
./lib/modules/4.15.0-64-generic/kernel/drivers/usb/host/ehci-platform.ko
$ dpkg --list | grep initramfs-tools-core
ii initramfs-tools-core 0.122ubuntu8.15 all generic modular initramfs generator (core tools)

Thanks. The initramfs-tools-core in -proposed generates initrd with ehci-platform.

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Robie Basak (racb) wrote :

Has there been any testing performed on the architectures on which the module is compiled in please, for example amd64? It seems to me that this is a particularly important code path to test, since it is identified as different and a bug could render regressed systems unbootable.

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Tested on x86 xenial-hwe. `update-initramfs` works and no ehci-platform in initrd. System works fine after reboot.

ubuntu@zwicky:~$ sudo update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-4.15.0-65-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.15.0-64-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
ubuntu@zwicky:~$ ls -al /boot
total 131680
drwxr-xr-x 4 root root 4096 Sep 26 04:20 .
drwxr-xr-x 23 root root 4096 Sep 26 04:15 ..
-rw-r--r-- 1 root root 217381 Sep 13 11:11 config-4.15.0-64-generic
-rw-r--r-- 1 root root 217370 Sep 18 11:06 config-4.15.0-65-generic
drwxr-xr-x 3 root root 4096 Jan 1 1970 efi
drwxr-xr-x 5 root root 4096 Sep 26 04:16 grub
-rw-r--r-- 1 root root 54946864 Sep 26 04:20 initrd.img-4.15.0-64-generic
-rw-r--r-- 1 root root 54945126 Sep 26 04:19 initrd.img-4.15.0-65-generic
-rw------- 1 root root 4061501 Sep 13 11:11 System.map-4.15.0-64-generic
-rw------- 1 root root 4062077 Sep 18 11:06 System.map-4.15.0-65-generic
-rw------- 1 root root 8172440 Sep 17 19:28 vmlinuz-4.15.0-64-generic
-rw------- 1 root root 8181016 Sep 19 08:08 vmlinuz-4.15.0-65-generic
ubuntu@zwicky:~$ sudo dpkg -l | grep initramfs-tools-core
ii initramfs-tools-core 0.122ubuntu8.15 all generic modular initramfs generator (core tools)
ubuntu@zwicky:~/temp$ dd if=/boot/initrd.img-4.15.0-65-generic of=initrd.img bs=512 skip=4768; zcat initrd.img | cpio -i
102546+1 records in
102546+1 records out
52503910 bytes (53 MB, 50 MiB) copied, 0.17038 s, 308 MB/s
296093 blocks
ubuntu@zwicky:~/temp$ ls
bin conf etc init initrd.img lib lib64 run sbin scripts usr var
ubuntu@zwicky:~/temp$ find . -name '*hci*'
./lib/modules/4.15.0-65-generic/kernel/drivers/mmc/host/sdhci-pci.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/mmc/host/sdhci.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/mmc/host/sdhci-xenon-driver.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/mmc/host/sdhci-acpi.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/mmc/host/sdhci-pltfm.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/usb/host/xhci-plat-hcd.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/ata/acard-ahci.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/ata/ahci_platform.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/ata/ahci.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/ata/libahci_platform.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/ata/libahci.ko
./lib/modules/4.15.0-65-generic/kernel/drivers/firewire/firewire-ohci.ko
ubuntu@zwicky:~/temp$ uname -a
Linux zwicky 4.15.0-65-generic #74~16.04.1-Ubuntu SMP Wed Sep 18 09:51:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for initramfs-tools has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.122ubuntu8.15

---------------
initramfs-tools (0.122ubuntu8.15) xenial; urgency=medium

  * hook-functions: include ehci-platform from HWE kernel.
    (LP: #1842284)

 -- Ike Panhc <email address hidden> Wed, 04 Sep 2019 15:24:58 +0800

Changed in initramfs-tools (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.