Hi,

I have decided that it is time to buy a USB3 stick for live system (rescue) that boots fast enough. To my surprise I can boot kernel and initrd, but not live system. Kernel identifies the USB stick as another product and does not recognize the existing partition from which the kernel is loaded.

Does anybody has any idea what changes between UEFI (or grub) and Linux kernel and how to switch device state when Linux is running (without unplugging the pen drive)?

Usually the device as recognized as (ignore discrepancy in bus and port numbers, they are from notes taken at different moments on 2 laptops)

usb 3-3: Product: Mass Storage Device
usb 3-3: Manufacturer: JetFlash

lsusb -vt
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 8564:1000 Transcend Information, Inc. JetFlash

however it may accidentally become

usb 3-3: Product: SM3265AB MEMORY BAR
usb 3-3: Manufacturer: Silicon Motion,Inc.

    |__ Port 3: Dev 8, If 0, Class=Mass Storage, Driver=usb-storage, 480M
ID 090c:3265 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.)

If the computer is rebooted from this state then it is not recognized by UEFI and Linux kernel any more

usb 3-1: Device not responding to setup address.
usb 3-1: device not accepting address 2, error -71
usb usb3-port1: attempt power cycle
...
usb 3-1: device not accepting address 5, error -71
usb usb3-port1: unable to enumerate USB device

and unplugging is required to recover from a broken state.

f3write & f3read work almost perfectly. I saw switching from Transcend to Silicon Motion while f3read was running, but next time (after unplug/plug cycle) it completed successfully.

It seems, attempt of booting live system is a reliable way to put the device into its "Silicon Motion" state. It is not a power limit issue, I tried to connect the stick through a powered USB3 hub.

I have tried the following commands, put the pen drive remains "Transcend"

usbreset 8564:1000

echo 0 > /sys/bus/usb/devices/3-1/authorized
echo 1 > /sys/bus/usb/devices/3-1/authorized

echo 0000:00:14.0 >/sys/bus/pci/drivers/xhci_hcd/unbind
echo 0000:00:14.0 >/sys/bus/pci/drivers/xhci_hcd/bind

What I cat try to simplify boot from the USB scenario?

I blame either pen drive USB controller or its firmware. On the other hand, if boot is not involved then device works almost perfectly (besides it is a cheap and so a rather slow drive). If the stick is plugged before power on and the laptop is booted from the internal drive then kernel properly recognizes the USB stick. I can not figure out what may happen due to access by UEFI or grub.

Reply via email to