USB support missing in initrd makes booting core with writable on USB impossible

Bug #1881623 reported by Oliver Grawert
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-raspi (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Invalid
Undecided
Unassigned
linux-raspi2 (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Invalid
Undecided
Unassigned

Bug Description

when using a gadget.yaml like:

volumes:
  pi4-system-boot:
    schema: mbr
    bootloader: u-boot
    structure:
      - type: 0C
        filesystem: vfat
        filesystem-label: system-boot
        size: 512M
        content:
          - source: boot-assets/
            target: /
  pi4-usb-writable:
    schema: mbr
    structure:
      - name: writable
        type: 83
        filesystem: ext4
        filesystem-label: writable
        size: 650M
        role: system-data

this creates two separate img files for a Pi image ... one for SD to hold the boot files, one for USB that carries the rootfs ...

sadly our kernel will then not find the writable partition because it lacks support for usb disks (usb-storage seems to be there but not sufficient)

adding the following to a re-built kernel snap makes everything work (verified with USB 3.1 SSD on a pi4 as well as various USB 3.0 keys)

      - CONFIG_ENCLOSURE_SERVICES=y
      - CONFIG_SCSI_SAS_ATTRS=y
      - CONFIG_USB_STORAGE=y
      - CONFIG_USB_UAS=y

can we please have these either built into the kernel or added to the core initrd as modules ?

Oliver Grawert (ogra)
description: updated
summary: - USB support missing in initrd makes booting with writable on USB
+ USB support missing in initrd makes booting core with writable on USB
impossible
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-raspi2 (Ubuntu):
status: New → Confirmed
Oliver Grawert (ogra)
description: updated
Oliver Grawert (ogra)
description: updated
Juerg Haefliger (juergh)
no longer affects: linux-raspi (Ubuntu Xenial)
no longer affects: linux-raspi (Ubuntu Bionic)
no longer affects: linux-raspi2 (Ubuntu Focal)
Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Juerg Haefliger (juergh) wrote :

All the relevant modules are already included in the uc18 initrd. I can mount a USB-attached HDD just fine from within the initrd.

Changed in linux-raspi2 (Ubuntu Bionic):
status: New → Invalid
Revision history for this message
Oliver Grawert (ogra) wrote :

hmm, i wonder why they dont load then ?

Revision history for this message
Oliver Grawert (ogra) wrote :

also note that the fabrica appliance you linked uses a re-built kernel

Revision history for this message
Oliver Grawert (ogra) wrote :

in fact it seems like in 5.3 USB is not working at all !!! i verified that today ...

my self-built kernel uses the focal 5.4 branch where USB works fine then:

https://github.com/ogra1/linux-raspberrypi-org/blob/master/snap/snapcraft.yaml

Revision history for this message
Juerg Haefliger (juergh) wrote :

This should be fixed in kernel linux-raspi2-5.3 5.3.0-1030.32~18.04.2. Can you please verify?

Revision history for this message
Oliver Grawert (ogra) wrote :

i'll try over the weekend ...

Revision history for this message
Oliver Grawert (ogra) wrote :

so this is indeed not an issue with the modules but with the kernel itself and the support for sas, uas or the enclosure services.

i test-built all tags from https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-raspi/+git/focal/refs/tags from 1023.26 going backwards and found that it reliably works until Ubuntu-raspi-5.4.0-1013.13 and reliably hangs with Ubuntu-raspi-5.4.0-1014.14 so somewhere between these two tags the breakage was introduced ...

i have now also tried to boot either of the 20.10 images (desktop, server, UC18) and they all expose the same behavior

Revision history for this message
Juerg Haefliger (juergh) wrote :

Is this still an issue with the latest 5.4 kernel?

Revision history for this message
Juerg Haefliger (juergh) wrote :

I cannot reproduce this issue. Tried a current focal preinstalled server image with the 'writable' partition on a USB attached SSD. Works just fine. Tested kernels:
5.4.0-1013-raspi
5.4.0-1015-raspi
5.4.0-1034-raspi

Please provide an image that shows this problem.

Revision history for this message
Marc Doughty (mangeek) wrote :

I think this is affecting the latest 5.13 kernels, the usb-storage modules appear to be missing, and USB storage isn't working, I get the device detected when I plug it in, but modules to use it are missing since the 5.13 update.

Revision history for this message
Marc Doughty (mangeek) wrote :

My assessment of the reason appears to be wrong, USB storage at boot time isn't working for me under 5.13, but the modules seem like they're present.

Revision history for this message
Juerg Haefliger (juergh) wrote :

Can you provide steps to reproduce the issue you're seeing?

Revision history for this message
Juerg Haefliger (juergh) wrote :

5.13 has other/unrelated issues: LP: #1943097.

Revision history for this message
Juerg Haefliger (juergh) wrote :

Closing due to inactivity. Please open a new case if you encounter a similar issue again.

Changed in linux-raspi (Ubuntu):
status: New → Invalid
Changed in linux-raspi (Ubuntu Focal):
status: New → Invalid
Changed in linux-raspi2 (Ubuntu):
status: Confirmed → Invalid
Changed in linux-raspi2 (Ubuntu Xenial):
status: New → Invalid
Revision history for this message
Oliver Grawert (ogra) wrote :

note that i did never really follow up with that setup in the end but i found out that even modern SSDs (not only rotary HDDs) usually draw more power than the USB3 port can provide, you will need an Y-Cable or external power supply ... while i can not fully confirm (due to lack of time and testing), i do assume it is not a kernel issue at all here, feel free to close it for now.

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.