Announcement

Collapse
No announcement yet.

Cannot mount external ntfs hard disk

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [System] Cannot mount external ntfs hard disk

    Kubuntu 24.04
    Plasma 5.27.11

    Hello, all. Linux newbie here, escaping from Windows. I bought a nice, inexpensive mini-PC, with a (more-than-sufficient) midrange Ryzen and TWO nvme slots, for Linux and Windows. Not dual-boot, just through BIOS, with Kubuntu booting if I don't intervene.
    No problem installing Kubuntu - I like it a lot... wiggly windows... Windows installation couldn't find the wifi, so that took a while. I had an old usb wifi stick in my junk drawer -- eureka!

    During these operations, I formatted two external hard disks (Western Digital 5To and HGST 1To) as ntfs using gparted. Windows recognized both. Then... Linux recognized neither.
    I turned off "fast boot" in Windows, and now the 5To disk works in both OSes. Kubuntu still can't access the 1To disk (so can't mount it), although all the file and disk manager apps "see" it.
    The error message in Dolphin when I try to mount the disk is
    "An error occurred while accessing 'HGST 1To', the system responded: The requested operation has failed: Error mounting system-managed device /dev/sda1: Unknown error when mounting none".

    Any ideas on how to get it "accessed" in Kubuntu?
    Thanks.​

    inxi dump:
    System:
    Host: m5 Kernel: 6.8.0-36-generic arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.11 Distro: Kubuntu 24.04 LTS (Noble Numbat)
    Machine:
    Type: Mini-pc Mobo: GMKtec model: GMKtec v: Version 1.0 serial: <superuser required> UEFI: American Megatrends LLC. v: M5 Pro 1.03 date: 01/05/2024
    CPU:
    Info: 8-core model: AMD Ryzen 7 5700U with Radeon Graphics
    bits: 64
    type: MT MCP
    cache: L2: 4 MiB
    Speed (MHz): avg: 1314 min/max: 400/4372
    cores: 1: 400 2: 2766 3: 1564 4: 1485 5: 1789 6: 1477 7: 1372 8: 1312 9: 1805 10: 2667 11: 400 12: 400 13: 1485 14: 400 15: 400 16: 1304
    Graphics:
    Device-1: AMD Lucienne driver: amdgpu v: kernel
    Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.6 driver: X: loaded: amdgpu unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: amdgpu resolution: 2560x1440~60Hz
    API: EGL v: 1.5 drivers: radeonsi,swrast platforms: x11,surfaceless,device
    API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.5-1ubuntu1 renderer: AMD Radeon Graphics (radeonsi renoir LLVM 17.0.6 DRM 3.57 6.8.0-36-generic)
    API: Vulkan v: 1.3.275 drivers: N/A surfaces: xcb,xlib
    Audio:
    Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: N/A
    Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel
    API: ALSA v: k6.8.0-36-generic status: kernel-api
    Server-1: PipeWire v: 1.0.5 status: active
    Network:
    Device-1: Realtek RTL8125 2.5GbE driver: r8169
    IF: enp1s0 state: down mac: 84:47:09:38:c8:96
    Device-2: Realtek RTL8125 2.5GbE driver: r8169
    IF: enp2s0 state: down mac: 84:47:09:38:c8:95
    Device-3: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter driver: mt7921e
    IF: wlp3s0 state: up mac: d0:12:55:b9:2f:fb
    Device-4: TP-Link Archer T3U [Realtek RTL8812BU] driver: rtw_8822bu type: USB
    IF: wlxc006c35ff9aa state: down mac: c0:06:c3:5f:f9:aa
    IF-ID-1: virbr0 state: down mac: 52:54:00:e2:11:6a
    Bluetooth:
    Device-1: MediaTek Wireless_Device driver: btusb type: USB
    Report: hciconfig ID: hci0 state: up address: D0:12:55:B9:2F:FC bt-v: 5.2
    Drives:
    Local Storage: total: 3.66 TiB used: 228.29 GiB (6.1%)
    ID-1: /dev/nvme0n1 vendor: Sabrent model: N/A size: 953.87 GiB
    ID-2: /dev/nvme1n1 vendor: Lexar model: SSD NM610PRO 2TB size: 1.82 TiB
    ID-3: /dev/sda vendor: HGST (Hitachi) model: HTS721010A9E630 size: 931.51 GiB type: USB
    Partition:
    ID-1: / size: 1.79 TiB used: 228.25 GiB (12.5%) fs: ext4 dev: /dev/nvme1n1p2
    ID-2: /boot/efi size: 299.4 MiB used: 34.8 MiB (11.6%) fs: vfat dev: /dev/nvme1n1p1
    Swap:
    ID-1: swap-1 type: file size: 512 MiB used: 0 KiB (0.0%) file: /swapfile
    Sensors:
    System Temperatures: cpu: 57.0 C mobo: 54.0 C gpu: amdgpu temp: 50.0 C
    Fan Speeds (rpm): N/A
    Info:
    Memory: total: 28 GiB note: est. available: 28.19 GiB used: 6.2 GiB (22.0%)
    Processes: 400 Uptime: 23h 17m Shell: Bash inxi: 3.3.34


    ​For information, the instructions for inxi didn't work for me. But just knowing "inxi" was needed got me there in the end.

    #2
    Welcome to KFN!

    You likely don't have the package ntfs-3g installed. This is necessary for Kubuntu to be able to see and access ntfs formatted drives.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Some terminal output might help. I assume this drive is /dev/sda.

      Open Konsole and enter lsblk and it should list all your partitions and file system types. Assuming it reads /dev/sda it should look something like:

      Code:
      sda
      sda1 ntfs HGST 1To <UUID>
      If that's similar to what you see, then try and mount it:

      Code:
      sudo mount /dev/sda1 /mnt
      Use your partition number (sda1, sda2, etc.). Then post the output here.​

      Please Read Me

      Comment


        #4
        Originally posted by oshunluvr View Post
        Some terminal output might help. I assume this drive is /dev/sda.

        Open Konsole and enter lsblk and it should list all your partitions and file system types. Assuming it reads /dev/sda it should look something like:

        Code:
        sda
        sda1 ntfs HGST 1To <UUID>
        If that's similar to what you see, then try and mount it:

        Code:
        sudo mount /dev/sda1 /mnt
        Use your partition number (sda1, sda2, etc.). Then post the output here.​
        lsblk yields this:
        sda 8:0 0 931,5G 0 disk
        └─sda1 8:1 0 931,5G 0 part

        The "sudo mount" command worked! Yay! And thank you. I'll let you know if this still works after a restart.

        Comment


          #5
          Originally posted by oshunluvr View Post
          Some terminal output might help. I assume this drive is /dev/sda.

          Open Konsole and enter lsblk and it should list all your partitions and file system types. Assuming it reads /dev/sda it should look something like:

          Code:
          sda
          sda1 ntfs HGST 1To <UUID>
          If that's similar to what you see, then try and mount it:

          Code:
          sudo mount /dev/sda1 /mnt
          Use your partition number (sda1, sda2, etc.). Then post the output here.​


          After relaunch, the disk was not accessed... but after repeating your "sudo mount /dev/sda1 /mnt" command, Dolphin could access the disk. This is certainly better than inaccessible, but I'd rather not have to go to Konsol at every use.

          More ideas??

          Comment


            #6
            So the way mounting of file systems generally works is only file systems defined to specific mount points in /etc/fstab/ will be mounted at boot up. So if you want this booted every time you boot up, you would want to define it in fstab. This is usually the way "fixed" (installed) devices are handled.

            Non-fixed (removable) device are normally handed by UDEV at insertion, or when selected from the "Disks and Devices" menu in the System Tray or when clicking on them in Dolphin "Devices" section.

            So how to proceed depends on how you intend to use the drive.​ This is Linux so you have a lots of options on how to do this and all the control to do it.

            For example, I have 4 nvme devices and 2 hard drives installed in my system. I don't need or want them all to mount at boot so they are listed in /etc/fstab but with the "noauto" option. Then I also add the "users" option whcih lets me mount and un-mount them without having to enter my password every time. Done this way - and with all my file systems having meaningful labels, they appear in the Dolphin Device section as:
            Code:
            storage
            vm_drive
            root_backup
            vm_backup
            etc.

            This kind of setup might work for you. I will say normally, removable devices like USB attached drives should be mountable by just attaching and selecting them. To find out why this isn't working will take some more sleuthing.

            Please Read Me

            Comment


              #7
              Originally posted by oshunluvr View Post
              So the way mounting of file systems generally works is only file systems defined to specific mount points in /etc/fstab/ will be mounted at boot up. So if you want this booted every time you boot up, you would want to define it in fstab. This is usually the way "fixed" (installed) devices are handled.

              Non-fixed (removable) device are normally handed by UDEV at insertion, or when selected from the "Disks and Devices" menu in the System Tray or when clicking on them in Dolphin "Devices" section.

              So how to proceed depends on how you intend to use the drive.​ This is Linux so you have a lots of options on how to do this and all the control to do it.

              For example, I have 4 nvme devices and 2 hard drives installed in my system. I don't need or want them all to mount at boot so they are listed in /etc/fstab but with the "noauto" option. Then I also add the "users" option whcih lets me mount and un-mount them without having to enter my password every time. Done this way - and with all my file systems having meaningful labels, they appear in the Dolphin Device section as:
              Code:
              storage
              vm_drive
              root_backup
              vm_backup
              etc.

              This kind of setup might work for you. I will say normally, removable devices like USB attached drives should be mountable by just attaching and selecting them. To find out why this isn't working will take some more sleuthing.
              Before moving my stuff to Kubuntu, I made a couple of 500 Go backup sd cards. So... of course... one of them mounted without resorting to your magic formula, but the other did not. Scratching head...

              I have no idea what "/etc/fstab" is... I assume it's one of those many unintelligible folders in root. I'll go see now.

              Thanks again.

              Comment


                #8
                Yeah, you might want to do a little reading up on basic Linux stuff before you start slogging about with your system and data.

                /etc/fstab means: folder = /etc/, file = fstab

                Here's more than anyone needs to know about fstab.

                I'll emphatically state one thing often said to new Linux users: "Linux is not Windows". You're in for some learnin', lol

                Like I said though - if one mounted "magically" and the other didn't there's likely a reason. We just haven't sussed it out yet.

                Since you're a newbie - let's throw you into the fire - AKA the terminal

                Open the program "Konsole." With both drives not connected to your system, type this:
                Code:
                sudo dmesg
                This will dump a huge amount of text onto the screen.
                Look at the last line and note the time on the left side.
                This is the time the last entry was sent to dmesg.
                Now plug in the drive that works and wait a few seconds. Then type
                Code:
                sudo dmesg
                again. All the lines after the time you previously noted were caused by the insertion of the drive.
                In Konsole, highlight the new lines with your mouse - just highlight them and leave them highlighted.
                Open the program "Kate" and click "New" in the upper left to open a new file.
                Hover your mouse cursor over the blank document and click the middle mouse button.
                The highlighted test should appear in the document.
                Add a couple blank lines below the text.
                Unplug the drive

                You now have some output about how your "working" drive is detected by the system.

                Now do the whole thing above again. Do the first
                Code:
                sudo dmesg
                and again note the timestamp.
                Plug the "bad" drive and collect the dmesg output as described above and pate it into the text document at the bottom.

                Save the file somewhere, and copy the contents into a post on this thread and we'll have a look.

                Please Read Me

                Comment


                  #9
                  Originally posted by oshunluvr View Post
                  Yeah, you might want to do a little reading up on basic Linux stuff before you start slogging about with your system and data.

                  /etc/fstab means: folder = /etc/, file = fstab

                  Here's more than anyone needs to know about fstab.

                  I'll emphatically state one thing often said to new Linux users: "Linux is not Windows". You're in for some learnin', lol

                  Like I said though - if one mounted "magically" and the other didn't there's likely a reason. We just haven't sussed it out yet.

                  Since you're a newbie - let's throw you into the fire - AKA the terminal

                  Open the program "Konsole." With both drives not connected to your system, type this:
                  Code:
                  sudo dmesg
                  This will dump a huge amount of text onto the screen.
                  Look at the last line and note the time on the left side.
                  This is the time the last entry was sent to dmesg.
                  Now plug in the drive that works and wait a few seconds. Then type
                  Code:
                  sudo dmesg
                  again. All the lines after the time you previously noted were caused by the insertion of the drive.
                  In Konsole, highlight the new lines with your mouse - just highlight them and leave them highlighted.
                  Open the program "Kate" and click "New" in the upper left to open a new file.
                  Hover your mouse cursor over the blank document and click the middle mouse button.
                  The highlighted test should appear in the document.
                  Add a couple blank lines below the text.
                  Unplug the drive

                  You now have some output about how your "working" drive is detected by the system.

                  Now do the whole thing above again. Do the first
                  Code:
                  sudo dmesg
                  and again note the timestamp.
                  Plug the "bad" drive and collect the dmesg output as described above and pate it into the text document at the bottom.

                  Save the file somewhere, and copy the contents into a post on this thread and we'll have a look.


                  The deep end!

                  I ran the sudo dmesg command, but I can't see the forest because of all the trees. The output all looks the same. It changed some when I inserted the external disk that works. I had to tell Dolphin to mount it, but that wasn't a problem.

                  The second dmesg dump (after the HD insertion) looked like this:
                  [27347.644978] rtw_8822bu 3-3:1.0: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71
                  [27347.645740] rtw_8822bu 3-3:1.0: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71
                  [27347.793499] rtw_8822bu 3-3:1.0: timed out to flush queue 0
                  [27347.819580] rtw_8822bu 3-3:1.0: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71
                  [27347.820709] rtw_8822bu 3-3:1.0: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71
                  [27347.822017] rtw_8822bu 3-3:1.0: rtw_usb_reg_sec: reg 0x4e0, usb write 1 fail, status: -71
                  [27428.821671] kioslave5[68494]: segfault at 0 ip 000075e59379e9e4 sp 00007ffc1993e958 error 4 in libKPim5GAPIDrive.so.5.24.5[75e59379a000+46000] likely on CPU 5 (core 2, socket 0)
                  [27428.821687] Code: 05 06 00 48 89 de 48 8d 15 39 06 06 00 e8 44 cc ff ff 4c 89 e7 e8 5c c8 ff ff 48 89 d8 5b 41 5c 5d c3 0f 1f 40 00 f3 0f 1e fa <8b> 07 31 d2 85 c0 74 0a 83 f8 ff 75 0f ba 01 00 00 00 89 d0 c3 0f
                  [27439.145275] ntfs3: sdc1: ino=24, Correct links count -> 1.
                  [27439.147174] kioslave5[68518]: segfault at 0 ip 000076b2fda209e4 sp 00007ffdcd597ce8 error 4 in libKPim5GAPIDrive.so.5.24.5[76b2fda1c000+46000] likely on CPU 10 (core 5, socket 0)
                  [27439.147192] Code: 05 06 00 48 89 de 48 8d 15 39 06 06 00 e8 44 cc ff ff 4c 89 e7 e8 5c c8 ff ff 48 89 d8 5b 41 5c 5d c3 0f 1f 40 00 f3 0f 1e fa <8b> 07 31 d2 85 c0 74 0a 83 f8 ff 75 0f ba 01 00 00 00 89 d0 c3 0f
                  b@m5:~$​


                  I found the fstab file:
                  # /etc/fstab: static file system information.
                  #
                  # Use 'blkid' to print the universally unique identifier for a device; this may
                  # be used with UUID= as a more robust way to name devices that works even if
                  # disks are added and removed. See fstab(5).
                  #
                  # <file system> <mount point> <type> <options> <dump> <pass>
                  UUID=DB1D-FA51 /boot/efi vfat defaults 0 2
                  UUID=575e24f9-318d-4064-82ad-c363f7b149d8 / ext4 defaults 0 1
                  /swapfile swap swap defaults 0 0
                  tmpfs /tmp tmpfs noatime,mode=1777 0 0
                  /dev/sda1 none ntfs users,x-gvfs-show 0 0​


                  Comment


                    #10
                    Now the HGST disk mounted without my having to wave the magic wand.

                    A dmesg dump looks like before. Line after line of... stuff...

                    Comment


                      #11
                      This:
                      Code:
                      [27428.821671] kioslave5[68494]: segfault at 0 ip 000075e59379e9e4 sp 00007ffc1993e958 error 4 in libKPim5GAPIDrive.so.5.24.5[75e59379a000+46000] likely on CPU 5 (core 2, socket 0)
                      ​may be the issue. Not sure where or why this is happening but it's not normal. Hopefully, an update or kernel change will fix it sooner rather than later.

                      Breaking down your fstab:

                      The EFI oe ESP partition:
                      UUID=DB1D-FA51 /boot/efi vfat defaults 0 2

                      Your installation "root" partition:
                      UUID=575e24f9-318d-4064-82ad-c363f7b149d8 / ext4 defaults 0 1

                      Not a partition, but a swap file:
                      /swapfile swap swap defaults 0 0

                      Temporary File System (tempfs) mounted here:
                      tmpfs /tmp tmpfs noatime,mode=1777 0 0

                      Your Windows partition:
                      /dev/sda1 none ntfs users,x-gvfs-show 0 0​​

                      So like I said, those two external drives are not in here, but could be if that's what you want. With that segfault happening, it might not be a bad idea. Like I said before, the external drives will never be mounted automatically because they are removable. You can write a specific UDEV rule to create this behavior but that might be a little beyond your level at this point and frankly probably not worth it. "Clicking" on the drive with Dolphin or in the System Tray > Devices is the normal way to access removable devices.

                      The thing with mounting USB drives in fstab is they often change device names, so they should be mounted using UUID or File System Label.

                      This is a UUID: 575e24f9-318d-4064-82ad-c363f7b149d8

                      This is a Device Name: /dev/sda1

                      Labeling the File System on the drives can be done using KDE Partition Manager and IMO a good idea because it makes it easier to know one from the other. Then you would need to create folders to use as mount points for them, and then edit fstab to make them available that way if you want.

                      Please Read Me

                      Comment


                        #12
                        Thanks for your help.
                        Today, the WD disk and both sd cards mounted just fine in Dolphin. I had to say the magic words to get the HGST to mount, but that's not really much of a problem. I can live just fine with the situation... and a reminder post-it stuck to the HGST...

                        Comment


                          #13
                          Saw an article this morning that may have something to do with the issues you were having.

                          Anyway, made me think that there is an "automount" feature where you can control removable devices:

                          System Settings > Connected Devices > Disks and Camera > Device Automount

                          From that menu, you can select: All Known Devices, Attached Devices, or Disconnected Devices.

                          Assuming your external drives are attached, open the Attached Device drop down and they should be listed there. Check the "On Attach" box and the "Apply" in the lower right. From then on, they should mount when plugged in.

                          Please Read Me

                          Comment


                            #14
                            I didn't find exactly what you said, but this:
                            Removable Storage
                            Removable Devices
                            Attached Devices
                            (Here there are check-boxes for "on login" and "on attach", which I checked for "All Known Devices".
                            I also checked "Automatically mount removable media that have never been mounted before".)
                            After a restart, Dolphin still needed the magic words to mount the HGST... but the Windows nvme was mounted...

                            I love it!

                            Comment


                              #15
                              LOL, OK there's clearly a demon at work here.

                              I just want to verify the HGST drive is NTFS file system?

                              Please Read Me

                              Comment

                              Working...
                              X