LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   If you boot the OS with the USB memory connected, the OS will not recognize the USB memory properly. (https://www.linuxquestions.org/questions/linux-hardware-18/if-you-boot-the-os-with-the-usb-memory-connected-the-os-will-not-recognize-the-usb-memory-properly-4175641550/)

wakisuke 11-01-2018 01:10 AM

If you boot the OS with the USB memory connected, the OS will not recognize the USB memory properly.
 
Hi there,

If you boot the OS with the USB memory connected, the OS will not recognize the USB memory properly.
Recognize correctly when physically reconnecting after OS startup.
I think it will occur with USB 3.0 USB memory (I tried Transcend JetFlash 730)

In the result of lsusb, I want to output "Transcend Information, Inc." as the value of "idVendor", but it is output as "Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.)".


A state in which the OS is started with USB Stick (Transcend JetFlash 730) connected.
----------------------------------------------------------------------------------------------------------------------------
Code:

dmesg gave me that:
[    0.340745] usbcore: registered new interface driver usbfs
[    0.340773] usbcore: registered new interface driver hub
[    0.340842] usbcore: registered new device driver usb
[    1.795485] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.795492] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.795497] usb usb1: Product: xHCI Host Controller
[    1.795502] usb usb1: Manufacturer: Linux 3.10.0-862.11.6.el7.x86_64 xhci-hcd
[    1.795507] usb usb1: SerialNumber: 0000:00:15.0
[    1.797901] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    1.797907] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.797912] usb usb2: Product: xHCI Host Controller
[    1.797917] usb usb2: Manufacturer: Linux 3.10.0-862.11.6.el7.x86_64 xhci-hcd
[    1.797922] usb usb2: SerialNumber: 0000:00:15.0
[    1.799642] usb: port power management may be unreliable
[    1.800240] usbcore: registered new interface driver usbserial
[    1.800261] usbcore: registered new interface driver usbserial_generic
[    1.800279] usbserial: USB Serial support registered for generic
[    2.963029] usbcore: registered new interface driver usbhid
[    2.963033] usbhid: USB HID core driver
[    3.174113] usb 2-4: new SuperSpeed USB device number 2 using xhci_hcd
[    3.269622] usb 2-4: New USB device found, idVendor=2109, idProduct=0813
[    3.269633] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.269639] usb 2-4: Product: USB3.0 Hub
[    3.269644] usb 2-4: Manufacturer: VIA Labs, Inc.
[    3.420671] usb 1-1: new low-speed USB device number 2 using xhci_hcd
[    3.588791] usb 1-1: New USB device found, idVendor=056e, idProduct=00ba
[    3.588805] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.588813] usb 1-1: Product: ELECOM USB Optical Mouse
[    3.588820] usb 1-1: Manufacturer: PixArt
[    3.594181] input: PixArt ELECOM USB Optical Mouse as /devices/pci0000:00/0000:00:15.0/usb1/1-1/1-1:1.0/input/input2
[    3.594840] hid-generic 0003:056E:00BA.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt ELECOM USB Optical Mouse] on usb-0000:00:15.0-1/input0
[    3.747732] usb 1-2: new low-speed USB device number 3 using xhci_hcd
[    3.920873] usb 1-2: New USB device found, idVendor=056e, idProduct=1013
[    3.920886] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    3.920893] usb 1-2: Product: TK-FCP026 Series
[    3.926348] input: TK-FCP026 Series as /devices/pci0000:00/0000:00:15.0/usb1/1-2/1-2:1.0/input/input3
[    3.977340] hid-generic 0003:056E:1013.0002: input,hidraw1: USB HID v1.10 Keyboard [TK-FCP026 Series] on usb-0000:00:15.0-2/input0
[    3.982294] input: TK-FCP026 Series as /devices/pci0000:00/0000:00:15.0/usb1/1-2/1-2:1.1/input/input4
[    4.079608] hid-generic 0003:056E:1013.0003: input,hidraw2: USB HID v1.10 Device [TK-FCP026 Series] on usb-0000:00:15.0-2/input1
[    4.232605] usb 1-4: new high-speed USB device number 4 using xhci_hcd
[    4.556719] usb 1-4: New USB device found, idVendor=2109, idProduct=2813
[    4.556727] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.556732] usb 1-4: Product: USB2.0 Hub
[    4.556736] usb 1-4: Manufacturer: VIA Labs, Inc.
[    4.722641] usb 1-8: new full-speed USB device number 5 using xhci_hcd
[    4.884721] usb 2-4: USB disconnect, device number 2
[    4.927494] usb 1-8: New USB device found, idVendor=8087, idProduct=0a2a
[    4.927507] usb 1-8: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    8.177118] usbcore: registered new interface driver btusb

Code:

lsusb -v gave me that(I extracted a part):
Bus 002 Device 006: ID 090c:3267 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.)
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        9
  idVendor          0x090c Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.)
  idProduct          0x3267
  bcdDevice            1.00
  iManufacturer          1 Silicon Motion,Inc.
  iProduct                2 SM3267AB MEMORY BAR
  iSerial                0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          44
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x80
      (Bus Powered)
    MaxPower              126mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          2
      bInterfaceClass        8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol    80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0400  1x 1024 bytes
        bInterval              0
        bMaxBurst              8
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0400  1x 1024 bytes
        bInterval              0
        bMaxBurst              8
Binary Object Store Descriptor:
  bLength                5
  bDescriptorType        15
  wTotalLength          22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes  0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes        0x00
    wSpeedsSupported  0x000c
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport  2
      Lowest fully-functional device speed is High Speed (480Mbps)
    bU1DevExitLat          4 micro seconds
    bU2DevExitLat          4 micro seconds
Device Status:    0x000c
  (Bus Powered)
  U1 Enabled
  U2 Enabled

Code:

dmesg gave me that:
(Results when physically plugging in / unplugging the USB after OS startup.)
----------------------------------------------------------------------------------------------------------------------------
[    0.340745] usbcore: registered new interface driver usbfs
[    0.340773] usbcore: registered new interface driver hub
[    0.340842] usbcore: registered new device driver usb
[    1.795485] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.795492] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.795497] usb usb1: Product: xHCI Host Controller
[    1.795502] usb usb1: Manufacturer: Linux 3.10.0-862.11.6.el7.x86_64 xhci-hcd
[    1.795507] usb usb1: SerialNumber: 0000:00:15.0
[    1.797901] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    1.797907] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.797912] usb usb2: Product: xHCI Host Controller
[    1.797917] usb usb2: Manufacturer: Linux 3.10.0-862.11.6.el7.x86_64 xhci-hcd
[    1.797922] usb usb2: SerialNumber: 0000:00:15.0
[    1.799642] usb: port power management may be unreliable
[    1.800240] usbcore: registered new interface driver usbserial
[    1.800261] usbcore: registered new interface driver usbserial_generic
[    1.800279] usbserial: USB Serial support registered for generic
[    2.963029] usbcore: registered new interface driver usbhid
[    2.963033] usbhid: USB HID core driver
[    3.174113] usb 2-4: new SuperSpeed USB device number 2 using xhci_hcd
[    3.269622] usb 2-4: New USB device found, idVendor=2109, idProduct=0813
[    3.269633] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.269639] usb 2-4: Product: USB3.0 Hub
[    3.269644] usb 2-4: Manufacturer: VIA Labs, Inc.
[    3.420671] usb 1-1: new low-speed USB device number 2 using xhci_hcd
[    3.588791] usb 1-1: New USB device found, idVendor=056e, idProduct=00ba
[    3.588805] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.588813] usb 1-1: Product: ELECOM USB Optical Mouse
[    3.588820] usb 1-1: Manufacturer: PixArt
[    3.594181] input: PixArt ELECOM USB Optical Mouse as /devices/pci0000:00/0000:00:15.0/usb1/1-1/1-1:1.0/input/input2
[    3.594840] hid-generic 0003:056E:00BA.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt ELECOM USB Optical Mouse] on usb-0000:00:15.0-1/input0
[    3.747732] usb 1-2: new low-speed USB device number 3 using xhci_hcd
[    3.920873] usb 1-2: New USB device found, idVendor=056e, idProduct=1013
[    3.920886] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    3.920893] usb 1-2: Product: TK-FCP026 Series
[    3.926348] input: TK-FCP026 Series as /devices/pci0000:00/0000:00:15.0/usb1/1-2/1-2:1.0/input/input3
[    3.977340] hid-generic 0003:056E:1013.0002: input,hidraw1: USB HID v1.10 Keyboard [TK-FCP026 Series] on usb-0000:00:15.0-2/input0
[    3.982294] input: TK-FCP026 Series as /devices/pci0000:00/0000:00:15.0/usb1/1-2/1-2:1.1/input/input4
[    4.079608] hid-generic 0003:056E:1013.0003: input,hidraw2: USB HID v1.10 Device [TK-FCP026 Series] on usb-0000:00:15.0-2/input1
[    4.232605] usb 1-4: new high-speed USB device number 4 using xhci_hcd
[    4.556719] usb 1-4: New USB device found, idVendor=2109, idProduct=2813
[    4.556727] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.556732] usb 1-4: Product: USB2.0 Hub
[    4.556736] usb 1-4: Manufacturer: VIA Labs, Inc.
[    4.722641] usb 1-8: new full-speed USB device number 5 using xhci_hcd
[    4.884721] usb 2-4: USB disconnect, device number 2
[    4.927494] usb 1-8: New USB device found, idVendor=8087, idProduct=0a2a
[    4.927507] usb 1-8: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    8.177118] usbcore: registered new interface driver btusb
[  300.046640] usb 1-4: USB disconnect, device number 4
[  305.235946] usb 2-4: new SuperSpeed USB device number 3 using xhci_hcd
[  305.331918] usb 2-4: New USB device found, idVendor=2109, idProduct=0813
[  305.331933] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  305.331941] usb 2-4: Product: USB3.0 Hub
[  305.331948] usb 2-4: Manufacturer: VIA Labs, Inc.
[  305.703889] usb 2-4.1: new SuperSpeed USB device number 4 using xhci_hcd
[  305.720350] usb 2-4.1: New USB device found, idVendor=8564, idProduct=1000
[  305.720365] usb 2-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  305.720420] usb 2-4.1: Product: Mass Storage Device
[  305.720429] usb 2-4.1: Manufacturer: JetFlash
[  305.720435] usb 2-4.1: SerialNumber: 16NRWXGC3I20IO1U
[  305.869503] usb 1-4: new high-speed USB device number 6 using xhci_hcd
[  306.040423] usb 1-4: New USB device found, idVendor=2109, idProduct=2813
[  306.040438] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  306.040446] usb 1-4: Product: USB2.0 Hub
[  306.040453] usb 1-4: Manufacturer: VIA Labs, Inc.
[  306.098855] usb 2-4.2: new SuperSpeed USB device number 5 using xhci_hcd
[  306.115324] usb 2-4.2: New USB device found, idVendor=8564, idProduct=1000
[  306.115338] usb 2-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  306.115347] usb 2-4.2: Product: Mass Storage Device
[  306.115354] usb 2-4.2: Manufacturer: JetFlash
[  306.115361] usb 2-4.2: SerialNumber: 25PJY62Z0XHT67JA
[  306.182885] usb 2-4.3: new SuperSpeed USB device number 6 using xhci_hcd
[  306.199345] usb 2-4.3: New USB device found, idVendor=8564, idProduct=1000
[  306.199360] usb 2-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  306.199368] usb 2-4.3: Product: Mass Storage Device
[  306.199375] usb 2-4.3: Manufacturer: JetFlash
[  306.199426] usb 2-4.3: SerialNumber: 02RNQL3AB6XD3QV1
[  306.267916] usb 2-4.4: new SuperSpeed USB device number 7 using xhci_hcd
[  306.284370] usb 2-4.4: New USB device found, idVendor=8564, idProduct=1000
[  306.284418] usb 2-4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  306.284426] usb 2-4.4: Product: Mass Storage Device
[  306.284434] usb 2-4.4: Manufacturer: JetFlash
[  306.284441] usb 2-4.4: SerialNumber: 01V4FSFOZRHUEX6Y
[  306.526316] usb-storage 2-4.1:1.0: USB Mass Storage device detected
[  306.526931] scsi host2: usb-storage 2-4.1:1.0
[  306.527115] usb-storage 2-4.2:1.0: USB Mass Storage device detected
[  306.527253] scsi host3: usb-storage 2-4.2:1.0
[  306.527415] usb-storage 2-4.3:1.0: USB Mass Storage device detected
[  306.527615] scsi host4: usb-storage 2-4.3:1.0
[  306.527877] usb-storage 2-4.4:1.0: USB Mass Storage device detected
[  306.528676] scsi host5: usb-storage 2-4.4:1.0
[  306.528851] usbcore: registered new interface driver usb-storage
[  306.662457] usbcore: registered new interface driver uas

Code:

lsusb -v gave me that(I extracted a part):
Bus 002 Device 006: ID 8564:1000 Transcend Information, Inc. JetFlash
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        9
  idVendor          0x8564 Transcend Information, Inc.
  idProduct          0x1000 JetFlash
  bcdDevice          11.00
  iManufacturer          1 JetFlash
  iProduct                2 Mass Storage Device
  iSerial                3 02RNQL3AB6XD3QV1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          44
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x80
      (Bus Powered)
    MaxPower              76mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          2
      bInterfaceClass        8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol    80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0400  1x 1024 bytes
        bInterval              0
        bMaxBurst              8
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0400  1x 1024 bytes
        bInterval              0
        bMaxBurst              8
Binary Object Store Descriptor:
  bLength                5
  bDescriptorType        15
  wTotalLength          22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes  0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes        0x00
    wSpeedsSupported  0x000c
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport  2
      Lowest fully-functional device speed is High Speed (480Mbps)
    bU1DevExitLat          4 micro seconds
    bU2DevExitLat          4 micro seconds
Device Status:    0x000c
  (Bus Powered)
  U1 Enabled
  U2 Enabled

I don't know what to do know so I am asking for help.
Thank you

business_kid 11-01-2018 04:08 PM

Welcome to LQ.

I don't think the system cares, frankly, what the disk is called.

The problem as I see it is that it's not recognizing it as a usb disk, otherwise it would load the usb_storage module. Generally, usb disks being mounted at /boot makes them only writable by root, and root should be used as little as possible. Why not just pull it while you're booting?

wakisuke 11-04-2018 11:56 PM

Thanks for letting me know.


> Generally, usb disks being mounted at /boot makes them only writable by root, and root should be used as little as possible.
I'm sorry. I could not understand what you taught me.
Under the current setting, is it set to mount USB connected to / root at startup?




The direct problem is that this USB is SoftwareRAID, it does not recognize the USB memory (Transcend JetFlash) when booting, so it is very troublesome to reconnect the USB every boot.

I hope that the OS (CentOS 7) automatically recognizes it as a USB memory by leaving it connected at PC boot time.

I believe that the OS erroneously recognized USB memory (Transcend JetFlash) as "SM3267AB MEMORY BAR" for some reason.
I want to find out this cause.

business_kid 11-06-2018 04:59 AM

Sorry for typo - only one hand here.

Leaving a usb disk inserted while you boot means that only root can write to them. I avoid that when I remember by pulling them out. I have this line in /etc/fstab
Code:

/dev/sdb1        /mnt/hd          auto              relatime,diratime,user,exec,dev,suid,nofail    0  0
which is probably overkill, but it works. The 'user' option lets my user mount it, so as my user I can type
'mount /mnt/hd' and it is mounted, and a user can write to it. If I run X with XFCE, it automagically gets mounted somewhere crazy (/run/media/<user>/) but I can still write as a user.

mrmazda 11-07-2018 03:06 AM

Does the HD get the same device name with or without a bootable USB stick inserted at boot? If they differ, you could be suffering some kind of device enumeration or driver load order problem that might be solved by changing a BIOS setting, rebuilding an initrd, or changing fstab to mount / by label or UUID.

TheLexx 11-09-2018 05:45 PM

I suppose It would be easier for us to suggest a course of action if you were to explain what you wanted to do with your device.

It was slightly confusing because you called it USB memory. I assume you are talking about a USB flash drive also known as a thumb drive. Technically it is solid state memory, but all operating systems (Linux/Unix,Mac,Windows) treat the device the same as a hard drive/disk drive/zip drive. Sorry to be nit picky, but memory implies ram. And yes, on Linux you can force a thumb drive to act as a swap space, it would be weird and I think it is unlikely that is what you are looking for.

Flash drives are typically used to transfer data between computers or are used as short term storage of data that in not critically important.

From what little you have said on the subject, I am assuming that you want to use the flash drive as some sort of additional hard drive space on your Linux computer. You can do this, but you should be aware that flash drives have a notoriously high failure rate. If you are willing to accept one failure every two to three years you may still pursue this path. Just have a plan on how you will deal with such a failure.

If you are not going to use the flash drive to transfer data to a non-Linux computer, I would suggest that you reformat your flash drive to ext2/ext3/ext4 and name the partition using tune2fs.

Please respond to the question so I can better help you.


All times are GMT -5. The time now is 08:42 AM.