我有一台 HP EliteDesk 800 GM D1 迷你机箱,我曾在其内置 SSD 上(反复)安装 Ubuntu 22.04.1 和 22.04.3(全新和完全更新)。在所有情况下,USB3 端口都无法识别 USB3 驱动器。我已将此内置 SSD 与联想 W500 笔记本电脑的 SSD(Ubu 22.04.3)交换,但 USB 问题仍然存在于 HP 机箱中(联想机箱中的所有驱动器都自动安装)。
为了排除端口问题(在之前的 Ubuntu(16.04)上运行良好),我尝试将多个不同的驱动器连接到每个端口(支持此 USB3 键盘和鼠标以及连接它们的 USB3 集线器的相同端口)。结果有点令人困惑。
只有两个驱动器能够自动挂载;两个 Kingston USB2 驱动器均格式化为安装程序(Ubuntu 22.04.1 和 ProxMox)。其他驱动器(带有 EXT4 和 UDF 的 USB3 WD、带有 FAT32 和 UDF 的 USB3 拇指驱动器、带有 FAT32 的存储卡(USB3 读卡器))均无法挂载。此外,lsusb、lsblk、blkid、Disks 和 GParted 等工具未显示这些故障所附加的任何内容。最后,dmesg 没有显示与这些故障的附加和分离相关的任何条目,journalctl 也没有显示任何活动。
我使用 UDF 取出一个 USB3 拇指并创建了一个 Ubu 22.04.3 安装程序。它仍然无法识别。然后我取出 USB2 Ubu 22.04.1 安装程序(这些安装程序都是 ISO9660)并将其创建为 22.04.3。它自动安装。
编辑 2:看起来正常运行的驱动器是 USB2,而发生故障的驱动器则试图通过 USB3 运行。但是,USB3 集线器按预期工作;我甚至可以连接 USB2 安装程序,它通过 USB3 集线器自动安装。
下面的输出是连接了 Kingston USB2 安装程序 (22.04.3) 和 WD USB3 EXT4 后的结果。
$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4K 1 loop /snap/bare/5
loop1 7:1 0 62M 1 loop /snap/core20/1587
loop2 7:2 0 63.5M 1 loop /snap/core20/2015
loop3 7:3 0 73.9M 1 loop /snap/core22/864
loop4 7:4 0 163.3M 1 loop /snap/firefox/1635
loop5 7:5 0 236.9M 1 loop /snap/firefox/3131
loop6 7:6 0 400.8M 1 loop /snap/gnome-3-38-2004/112
loop7 7:7 0 349.7M 1 loop /snap/gnome-3-38-2004/143
loop8 7:8 0 485.5M 1 loop /snap/gnome-42-2204/126
loop9 7:9 0 496.9M 1 loop /snap/gnome-42-2204/132
loop10 7:10 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop11 7:11 0 45.9M 1 loop /snap/snap-store/582
loop12 7:12 0 12.3M 1 loop /snap/snap-store/959
loop13 7:13 0 40.8M 1 loop /snap/snapd/20092
loop14 7:14 0 284K 1 loop /snap/snapd-desktop-integration/14
loop15 7:15 0 452K 1 loop /snap/snapd-desktop-integration/83
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 118.7G 0 part /var/snap/firefox/common/host-hunspell
/
sdb 8:16 1 14.5G 0 disk
├─sdb1 8:17 1 4.7G 0 part /media/X/Ubuntu 22.04.3 LTS amd64
├─sdb2 8:18 1 4.9M 0 part
└─sdb3 8:19 1 300K 0 part
$ sudo blkid
/dev/sda2: UUID="87549ab1-a5e5-4de2-ba03-d7379bd2107d" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="80e7635e-d96e-4b12-af65-6eb1cbddcbdb"
/dev/loop1: TYPE="squashfs"
/dev/loop8: TYPE="squashfs"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="ESP" LABEL="ESP" UUID="F7DB-4D56" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Appended2" PARTUUID="f45e2fa1-c5a6-4d79-876d-c8245af921e0"
/dev/sdb3: PARTLABEL="Gap1" PARTUUID="f45e2fa1-c5a6-4d79-876c-c8245af921e0"
/dev/sdb1: BLOCK_SIZE="2048" UUID="2023-08-08-01-19-05-00" LABEL="Ubuntu 22.04.3 LTS amd64" TYPE="iso9660" PARTLABEL="ISO9660" PARTUUID="f45e2fa1-c5a6-4d79-876e-c8245af921e0"
/dev/loop15: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop0: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: UUID="665D-3D08" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="26c459fa-c12f-4bd2-b634-742e3371f6a4"
/dev/loop14: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
$ sudo lsusb
Bus 001 Device 009: ID 0930:6544 Toshiba Corp. TransMemory-Mini / Kingston DataTraveler 2.0 Stick
Bus 001 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
无论是否连接 WD USB3 EXT4 驱动器,此输出都不会改变:
$ ls -l /dev/* | wc -l
514
(连接金士顿 USB2 后,数字升至 528。)
解开或解决这个谜团的下一步是什么?
编辑:在评论中请求(@waltinator)。
$ sudo journalctl --follow
Sep 23 23:34:48 MYMACHINE kernel: usb 1-1.5.4: USB disconnect, device number 27
Sep 23 23:34:48 MYMACHINE kernel: usb 1-1.5.4.1: USB disconnect, device number 28
Sep 23 23:34:48 MYMACHINE acpid[565]: input device has been disconnected, fd 15
Sep 23 23:34:48 MYMACHINE acpid[565]: input device has been disconnected, fd 16
Sep 23 23:34:49 MYMACHINE kernel: usb 1-1.5.4.2: USB disconnect, device number 29
Sep 23 23:34:49 MYMACHINE kernel: usb 1-1.5.4.4: USB disconnect, device number 30
Sep 23 23:34:49 MYMACHINE acpid[565]: input device has been disconnected, fd 17
Sep 23 23:34:49 MYMACHINE acpid[565]: input device has been disconnected, fd 18
Sep 23 23:34:53 MYMACHINE sudo[5048]: pam_unix(sudo:session): session closed for user root
Sep 23 23:35:02 MYMACHINE sudo[5192]: ME : TTY=pts/1 ; PWD=/home/ME ; USER=root ; COMMAND=/usr/bin/journalctl --follow
Sep 23 23:35:02 MYMACHINE sudo[5192]: pam_unix(sudo:session): session opened for user root(uid=0) by ME(uid=1000)
__detached and re-attached EXT4__
__detached and re-attached installer__
Sep 23 23:35:49 MYMACHINE kernel: usb 1-1.2: USB disconnect, device number 25
Sep 23 23:35:49 MYMACHINE udisksd[604]: Cleaning up mount point /media/ME/Ubuntu 22.04.3 LTS amd64 (device 8:17 no longer exists)
Sep 23 23:35:49 MYMACHINE systemd[1]: media-ME-Ubuntu\x2022.04.3\x20LTS\x20amd64.mount: Deactivated successfully.
Sep 23 23:35:55 MYMACHINE kernel: usb 1-1.2: new high-speed USB device number 31 using ehci-pci
Sep 23 23:35:55 MYMACHINE kernel: usb 1-1.2: New USB device found, idVendor=0930, idProduct=6544, bcdDevice= 1.00
Sep 23 23:35:55 MYMACHINE kernel: usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 23 23:35:55 MYMACHINE kernel: usb 1-1.2: Product: DataTraveler 2.0
Sep 23 23:35:55 MYMACHINE kernel: usb 1-1.2: Manufacturer: Kingston
Sep 23 23:35:55 MYMACHINE kernel: usb 1-1.2: SerialNumber: 50E549C6942EC1B1E9025DA5
Sep 23 23:35:55 MYMACHINE kernel: usb-storage 1-1.2:1.0: USB Mass Storage device detected
Sep 23 23:35:55 MYMACHINE kernel: scsi host6: usb-storage 1-1.2:1.0
Sep 23 23:35:55 MYMACHINE mtp-probe[5218]: checking bus 1, device 31: "/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2"
Sep 23 23:35:55 MYMACHINE mtp-probe[5218]: bus: 1, device: 31 was not an MTP device
Sep 23 23:35:55 MYMACHINE mtp-probe[5222]: checking bus 1, device 31: "/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.2"
Sep 23 23:35:55 MYMACHINE mtp-probe[5222]: bus: 1, device: 31 was not an MTP device
Sep 23 23:35:56 MYMACHINE kernel: scsi 6:0:0:0: Direct-Access Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 4
Sep 23 23:35:56 MYMACHINE kernel: sd 6:0:0:0: Attached scsi generic sg1 type 0
Sep 23 23:35:56 MYMACHINE kernel: sd 6:0:0:0: [sdb] 30310400 512-byte logical blocks: (15.5 GB/14.5 GiB)
Sep 23 23:35:56 MYMACHINE kernel: sd 6:0:0:0: [sdb] Write Protect is off
Sep 23 23:35:56 MYMACHINE kernel: sd 6:0:0:0: [sdb] Mode Sense: 45 00 00 00
Sep 23 23:35:56 MYMACHINE kernel: sd 6:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Sep 23 23:35:56 MYMACHINE kernel: GPT:Primary header thinks Alt. header is not at the end of the disk.
Sep 23 23:35:56 MYMACHINE kernel: GPT:9839183 != 30310399
Sep 23 23:35:56 MYMACHINE kernel: GPT:Alternate GPT header not at the end of the disk.
Sep 23 23:35:56 MYMACHINE kernel: GPT:9839183 != 30310399
Sep 23 23:35:56 MYMACHINE kernel: GPT: Use GNU Parted to correct GPT errors.
Sep 23 23:35:56 MYMACHINE kernel: sdb: sdb1 sdb2 sdb3
Sep 23 23:35:56 MYMACHINE kernel: sd 6:0:0:0: [sdb] Attached SCSI removable disk
Sep 23 23:35:56 MYMACHINE systemd-udevd[5216]: sdb: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb' failed with exit code 1.
Sep 23 23:35:56 MYMACHINE systemd-udevd[5229]: sdb3: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb3' failed with exit code 1.
Sep 23 23:35:56 MYMACHINE systemd-udevd[5228]: sdb2: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb2' failed with exit code 1.
Sep 23 23:35:56 MYMACHINE systemd-udevd[5216]: sdb1: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb1' failed with exit code 1.
Sep 23 23:35:56 MYMACHINE kernel: ISO 9660 Extensions: Microsoft Joliet Level 3
Sep 23 23:35:56 MYMACHINE kernel: ISO 9660 Extensions: Microsoft Joliet Level 3
Sep 23 23:35:56 MYMACHINE kernel: ISO 9660 Extensions: RRIP_1991A
Sep 23 23:35:57 MYMACHINE udisksd[604]: Mounted /dev/sdb1 at /media/ME/Ubuntu 22.04.3 LTS amd64 on behalf of uid 1000
__detached and re-attached EXT4__
^C
您可以看到拆卸和连接 USB2 安装程序显示输出,但没有显示 USB3 EXT4 驱动器。
答案1
在测试了 Ubu 20.04、18.04 和 16.04 以及 LinuxMint 21 之后,我开始怀疑我是否对硬件做了什么(这台机器在重建之前使用 16.04 和 USB3 自动挂载)。
我拆下所有东西,打开盒子,取出固态硬盘和内存,仔细查看。这是非常基本的硬件,我没有看到任何可能被推开或断开的东西。然后我把内存和固态硬盘放回原位,关上盒子,重新连接所有东西。
启动时,USB3 驱动器再次自动安装并被上述所有工具识别。我无法解释为什么会有这种特殊的关系,但事实就是如此。幸运的话,这将防止其他人为此烦恼。