You are not logged in.

#1 2023-05-12 18:54:40

klafyvel
Member
Registered: 2023-04-02
Posts: 6

External Hard Drive not detected in Arch Linux but detected in Ubuntu

Hello,

I'm having trouble getting my external hard drive to be detected by my Arch Linux computer. The external hard drive is detected by my Ubuntu computer, so I know the drive is functioning properly.

When I run the `lsblk` command, the external hard drive is not listed, and there are no error messages or warnings related to it in the output of the `dmesg` command. I have also checked the system logs with `journalctl` and the output of `lsusb` before and after plugin the drive in, but there is no sign of the external hard drive.

I have tried the following troubleshooting steps:

* Connecting the external hard drive to a different USB port on the computer
* Trying a different USB device on the same port that the external hard drive is connected to, and confirming that the system recognizes the other device
* Updating the kernel and system packages to the latest version

However, none of these steps have resolved the issue.

I'm at a loss as to what to try next. Any help or advice would be greatly appreciated.

Thank you.

Offline

#2 2023-05-12 18:58:43

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

What is the output of `uname -r` and `pacman -Q linux` (substitute the name of your kernel package if different).

Offline

#3 2023-05-12 19:02:43

klafyvel
Member
Registered: 2023-04-02
Posts: 6

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

Here it is:

➜  ~ git:(master) ✗ uname -r
6.3.1-arch1-1
➜  ~ git:(master) ✗ sudo pacman -Q linux
linux 6.3.1.arch1-1

Offline

#4 2023-05-12 19:04:19

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

That looks fine. What, exactly, do you see in dmesg when you connect it?

Offline

#5 2023-05-12 19:06:44

klafyvel
Member
Registered: 2023-04-02
Posts: 6

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

Nothing at all :

Before I plug the drive:

➜  ~ git:(master) ✗ sudo dmesg | tail -n 10
[ 2728.888059] wlan0: associated
[ 2738.647921] wlan0: disconnect from AP 9c:5c:8e:44:b1:14 for new auth to 9c:5c:8e:44:b1:10
[ 2738.674610] wlan0: authenticate with 9c:5c:8e:44:b1:10
[ 2738.674619] wlan0: 80 MHz not supported, disabling VHT
[ 2738.682946] wlan0: send auth to 9c:5c:8e:44:b1:10 (try 1/3)
[ 2738.688207] wlan0: authenticated
[ 2738.688227] wlan0: associating to AP 9c:5c:8e:44:b1:10 with corrupt probe response
[ 2738.690542] wlan0: associate with 9c:5c:8e:44:b1:10 (try 1/3)
[ 2738.704569] wlan0: RX ReassocResp from 9c:5c:8e:44:b1:10 (capab=0xc31 status=0 aid=2)
[ 2738.723284] wlan0: associated

After:

➜  ~ git:(master) ✗ sudo dmesg | tail -n 10
[ 2728.888059] wlan0: associated
[ 2738.647921] wlan0: disconnect from AP 9c:5c:8e:44:b1:14 for new auth to 9c:5c:8e:44:b1:10
[ 2738.674610] wlan0: authenticate with 9c:5c:8e:44:b1:10
[ 2738.674619] wlan0: 80 MHz not supported, disabling VHT
[ 2738.682946] wlan0: send auth to 9c:5c:8e:44:b1:10 (try 1/3)
[ 2738.688207] wlan0: authenticated
[ 2738.688227] wlan0: associating to AP 9c:5c:8e:44:b1:10 with corrupt probe response
[ 2738.690542] wlan0: associate with 9c:5c:8e:44:b1:10 (try 1/3)
[ 2738.704569] wlan0: RX ReassocResp from 9c:5c:8e:44:b1:10 (capab=0xc31 status=0 aid=2)
[ 2738.723284] wlan0: associated

Offline

#6 2023-05-12 19:31:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

by my Ubuntu computer

So that's not the same HW you're trying to connect it right now?

What drive is that exactly?
What are the "arch" and "ubuntu" computers?
What's the response in ubuntu when you "dmesg -w" and then plug the drive?

Offline

#7 2023-05-12 19:41:44

klafyvel
Member
Registered: 2023-04-02
Posts: 6

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

Yes, those are two different computers (Arch is on a Dell Latitude E7470 and Ubuntu on a HP Elitebook).

Here is the output of dmesg on ubuntu when I plug the computer in:

[355370.966609] usb 4-2: new SuperSpeed USB device number 14 using xhci_hcd
[355370.988499] usb 4-2: New USB device found, idVendor=1058, idProduct=25a2, bcdDevice=10.21
[355370.988513] usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[355370.988517] usb 4-2: Product: Elements 25A2
[355370.988520] usb 4-2: Manufacturer: Western Digital
[355370.988523] usb 4-2: SerialNumber: 575847314137384B48394453
[355370.992626] usb-storage 4-2:1.0: USB Mass Storage device detected
[355370.993068] scsi host0: usb-storage 4-2:1.0
[355372.016442] scsi 0:0:0:0: Direct-Access     WD       Elements 25A2    1021 PQ: 0 ANSI: 6
[355372.017262] sd 0:0:0:0: Attached scsi generic sg0 type 0
[355372.018519] sd 0:0:0:0: [sda] Spinning up disk...
[355373.038243] .....ready
[355377.134609] sd 0:0:0:0: [sda] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[355377.135036] sd 0:0:0:0: [sda] Write Protect is off
[355377.135045] sd 0:0:0:0: [sda] Mode Sense: 47 00 10 08
[355377.135376] sd 0:0:0:0: [sda] No Caching mode page found
[355377.135378] sd 0:0:0:0: [sda] Assuming drive cache: write through
[355377.239947]  sda: sda1
[355377.240378] sd 0:0:0:0: [sda] Attached SCSI disk
[355377.724577] ntfs3: Unknown parameter 'windows_names'

Something weird happened when I plugged it to my Ubuntu computer on the same port I used it earlier: nothing happened. I then tried a second port, nothing happened, and when I went back to the first port the disk got detected, yielding the message above in dmesg. Out of curiosity I then tried on the Arch computer and it connected, with the following message in dmesg:

[10397.468024] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[10397.485757] usb 2-1: New USB device found, idVendor=1058, idProduct=25a2, bcdDevice=10.21
[10397.485770] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10397.485777] usb 2-1: Product: Elements 25A2
[10397.485782] usb 2-1: Manufacturer: Western Digital
[10397.485787] usb 2-1: SerialNumber: 575847314137384B48394453
[10397.487805] usb-storage 2-1:1.0: USB Mass Storage device detected
[10397.488107] scsi host3: usb-storage 2-1:1.0
[10398.495581] scsi 3:0:0:0: Direct-Access     WD       Elements 25A2    1021 PQ: 0 ANSI: 6
[10398.497266] sd 3:0:0:0: [sdb] Spinning up disk...
[10399.511101] ......ready
[10404.574701] sd 3:0:0:0: [sdb] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[10404.575018] sd 3:0:0:0: [sdb] Write Protect is off
[10404.575025] sd 3:0:0:0: [sdb] Mode Sense: 47 00 10 08
[10404.575331] sd 3:0:0:0: [sdb] No Caching mode page found
[10404.575337] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[10404.670607]  sdb: sdb1
[10404.670896] sd 3:0:0:0: [sdb] Attached SCSI disk

In all cases the disk switches on a starts to spin.

Offline

#8 2023-05-12 19:50:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

lsusb -tv

Make sure to use a USB 3 hub.
While the protocol is downward compatible, the energy demand is not.
I guess when it didn't show up, it also didn't spin up?

Offline

#9 2023-05-12 20:00:12

klafyvel
Member
Registered: 2023-04-02
Posts: 6

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

Just in case, i ran a short smartctl test on the drive, there does not seem to be an issue:

➜  ~ git:(master) ✗ sudo smartctl -t short /dev/sdb
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.3.1-arch1-1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Fri May 12 21:48:06 2023 CEST
Use smartctl -X to abort test.

... a few moments later

➜  ~ git:(master) ✗ sudo smartctl -H /dev/sdb
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.3.1-arch1-1] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

Make sure to use a USB 3 hub.
While the protocol is downward compatible, the energy demand is not.
I guess when it didn't show up, it also didn't spin up?

Okay, so the USB port that did not work at all on the Ubuntu laptop is USB 2.0; sorry about that. The other ports I tried (on both the Ubuntu and Arch laptops) are 3.0.

➜  ~ git:(master) ✗ lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 1058:25a2 Western Digital Technologies, Inc. Elements 25A2
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 2: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
        ID 1bcf:2b93 Sunplus Innovation Technology Inc.
    |__ Port 2: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
        ID 1bcf:2b93 Sunplus Innovation Technology Inc.
    |__ Port 7: Dev 4, If 0, Class=Application Specific Interface, Driver=, 12M
        ID 0a5c:5834 Broadcom Corp.
    |__ Port 7: Dev 4, If 1, Class=Chip/SmartCard, Driver=, 12M
        ID 0a5c:5834 Broadcom Corp.
    |__ Port 7: Dev 4, If 2, Class=Chip/SmartCard, Driver=, 12M
        ID 0a5c:5834 Broadcom Corp.
    |__ Port 7: Dev 4, If 3, Class=Vendor Specific Class, Driver=, 12M
        ID 0a5c:5834 Broadcom Corp.
    |__ Port 8: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0a2b Intel Corp. Bluetooth wireless interface
    |__ Port 8: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0a2b Intel Corp. Bluetooth wireless interface
    |__ Port 9: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 04f3:2248 Elan Microelectronics Corp.

I think it did spin up when it did not show up (I can try unplugging it and try to see if it starts not being recognized again if that helps).

Offline

#10 2023-05-12 20:26:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

If the drive has enough power to spin up it's not likely that it lacks power to have the firmware respond - it'd rather be the other way round (firmware responds but the drive doesn't spin up and you get IO errors)

Loose cable/plugs?
Other external devices show up?
If this happens again, see whether re-connects are a reliable workaround.

"smartctl -a", the "PASSED" there isn't a very good indicator for anything.

Offline

#11 2023-05-12 20:51:12

klafyvel
Member
Registered: 2023-04-02
Posts: 6

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu

Sorry, full output: https://0x0.st/HNAw.txt

I don't think it's the cable: nothing happens when I gently push it while it's plugged. Unfortunately, re-connects don't seem to be a reliable workaround, I can't get the drive to get detected reliably on my arch laptop.

Offline

#12 2023-05-12 21:07:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: External Hard Drive not detected in Arch Linux but detected in Ubuntu


197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       3
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       5

# 1  Short offline       Completed: read failure       90%       787         504836840

That doesn't explain why the device doesn't respond (do you have another drive to test) but isn't exactly healthy either.
See whetehr the short test failed because you unplugged the drive during the test, but if it consistently fails at that sector, there's a problem.
You can use https://wiki.archlinux.org/title/Badblocks to see how bad it is.
The destructive test is (usually "much") faster, but wipes the drive (as in "it'll delete all data")

Offline

Board footer

Powered by FluxBB