New install accidentally corrupted HDD?

I did a fresh install of the hyprland edition because I wasn’t using KDE anymore and wanted to free up some space. I backed up all my files to another HDD but when I was installing I didn’t notice that GRUB was set to install on the backup HDD instead of the SSD that I was installing garuda on. The install failed at the end because of some issue installing the bootloader and I didn’t really think anything of it until I restarted the install and noticed this issue. The new install went fine but now when I try to access the backup HDD I get an error :

Error mounting /dev/sda1 at irun/media/jt/HP: wrong fs type, bad option, bad Superblock on /dev/sda1, missing codepage or helper program, or other error.

And in dmesg

sda1: volume is dirty and "force" flag is not set!

I tried

sudo ntfsfix -d /dev/sda1

I was eventually able to mount the drive as readonly and I thought everything was ok. But now when I open most files they are empty and I am getting these errors

May 23 10:46:52 jt-precisiont3600 ntfs-3g[21330]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
May 23 10:46:52 jt-precisiont3600 kernel: sd 0:0:0:0: [sda] tag#12 FAILED Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK cmd_age=0s
May 23 10:46:52 jt-precisiont3600 kernel: sd 0:0:0:0: [sda] tag#12 CDB: Read(10) 28 00 52 96 2b 07 00 00 08 00
May 23 10:46:52 jt-precisiont3600 kernel: I/O error, dev sda, sector 1385573127 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
May 23 10:46:52 jt-precisiont3600 kernel: Buffer I/O error on dev sda1, logical block 173196633, async page read

May 23 11:04:49 jt-precisiont3600 ntfs-3g[21330]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
May 23 11:04:49 jt-precisiont3600 kernel: Buffer I/O error on dev sda1, logical block 14381149, async page read
May 23 11:04:49 jt-precisiont3600 ntfs-3g[21330]: Failed to read of MFT, mft=300626 count=1 br=-1: Input/output error
May 23 11:04:49 jt-precisiont3600 ntfs-3g[21330]: ntfs_attr_pread_i: ntfs_pread failed: Input/output error

Here is my garuda-inxi

System:
  Kernel: 6.9.1-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=ace14c83-5832-41ee-b63f-8b4f4078505d rw rootflags=subvol=@
    quiet loglevel=3 ibt=off
  Desktop: Hyprland v: 0.40.0 with: waybar tools: avail: swayidle,swaylock
    vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
  Type: Desktop System: Dell product: Precision T3600 v: 01
    serial: <superuser required> Chassis: type: 7 serial: <superuser required>
  Mobo: Dell model: 08HPGT v: A01 serial: <superuser required>
    uuid: <superuser required> BIOS: Dell v: A18 date: 06/25/2019
CPU:
  Info: model: Intel Xeon E5-2665 0 bits: 64 type: MT MCP arch: Sandy Bridge
    level: v2 built: 2010-12 process: Intel 32nm family: 6 model-id: 0x2D (45)
    stepping: 7 microcode: 0x71A
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB
    L3: 20 MiB desc: 1x20 MiB
  Speed (MHz): avg: 1199 high: 1200 min/max: 1200/3100 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 1197 2: 1200 3: 1200
    4: 1200 5: 1200 6: 1200 7: 1200 8: 1200 9: 1200 10: 1200 11: 1200 12: 1200
    13: 1200 14: 1200 15: 1200 16: 1197 bogomips: 76610
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: AMD Barts PRO [Radeon HD 6850] vendor: Gigabyte driver: radeon
    v: kernel alternate: amdgpu arch: TeraScale-2 code: Evergreen
    process: TSMC 32-40nm built: 2009-15 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 16 link-max: gen: 2 speed: 5 GT/s ports: active: HDMI-A-1
    empty: DP-1,DVI-D-1,DVI-I-1 bus-ID: 03:00.0 chip-ID: 1002:6739
    class-ID: 0300 temp: 48.0 C
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: Hyprland v: 0.40.0 driver: X: loaded: radeon
    unloaded: modesetting alternate: fbdev,vesa dri: r600 gpu: radeon
    display-ID: 1
  Monitor-1: HDMI-A-1 model: LG (GoldStar) 27MP75 built: 2014 res: 1920x1080
    hz: 60 dpi: 81 gamma: 1.2 scale: 1 size: 600x340mm (23.62x13.39")
    diag: 690mm (27.2") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: Vulkan v: 1.3.279 layers: 4 device: 0 type: cpu name: llvmpipe (LLVM
    17.0.6 256 bits) driver: mesa llvmpipe v: 24.0.7-arch1.3 (LLVM 17.0.6)
    device-ID: 10005:0000 surfaces: xcb,xlib,wayland
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel C600/X79 series High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1d20
    class-ID: 0403
  Device-2: AMD Barts HDMI Audio [Radeon HD 6790/6850/6870 / 7720 OEM]
    vendor: Gigabyte driver: snd_hda_intel v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 16 link-max: gen: 2 speed: 5 GT/s bus-ID: 03:00.1
    chip-ID: 1002:aa88 class-ID: 0403
  API: ALSA v: k6.9.1-zen1-1-zen status: kernel-api tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.0.6 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Dell driver: e1000e
    v: kernel port: f040 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Info: services: NetworkManager, smbd, systemd-timesyncd
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-4:3 chip-ID: 0a5c:21e8
    class-ID: fe01 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 4.0
    lmp-v: 6 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
  Local Storage: total: 1.13 TiB used: 186.93 GiB (16.2%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM003-1CH162
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: <filter> fw-rev: CC47 scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 model: SATA SSD size: 223.57 GiB block-size:
    physical: 512 B logical: 512 B speed: <unknown> tech: SSD serial: <filter>
    fw-rev: 61.2 scheme: MBR
Partition:
  ID-1: / raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 8.49 GiB (3.8%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
  ID-2: /home raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 8.49 GiB (3.8%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
  ID-3: /var/log raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 8.49 GiB (3.8%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
  ID-4: /var/tmp raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 8.49 GiB (3.8%) fs: btrfs dev: /dev/sdb1 maj-min: 8:17
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 15.57 GiB used: 0 KiB (0.0%) priority: 100
    comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 16 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 46.0 C mobo: 0.0 C sodimm: SODIMM C gpu: radeon
    temp: 48.0 C
  Fan Speeds (rpm): cpu: 1031
Info:
  Memory: total: 16 GiB available: 15.57 GiB used: 2.27 GiB (14.6%)
  Processes: 319 Power: uptime: 9h 24m states: freeze,standby,mem,disk
    suspend: deep avail: s2idle,shallow wakeups: 1 hibernate: platform
    avail: shutdown, reboot, suspend, test_resume image: 6.22 GiB
    services: upowerd Init: systemd v: 255 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 1446 libs: 400 tools: pacseek,paru Compilers:
    gcc: 14.1.1 Shell: garuda-inxi default: fish v: 3.7.1 running-in: foot
    inxi: 3.3.34
Garuda (2.6.26-1):
  System install date:     2024-05-22
  Last full system update: 2024-05-23 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       <superuser required>
  Failed units:   

I really hope that this is recoverable.
If you need any more details let me know.
Thanks in advance!

I would recommend that you boot the HDD with Windows and try repairing it with Windows tools (for example with chkdsk). NTFS is a proprietary file system and is not 100% supported by Linux. If you don’t have access to a Win PC, you can also boot a WinPE with a USB stick and do this using cmd.

Looks like the mft is corrupt. If you don’t have a backup of the HDD, take an image of it and try to recover the files using data recovery tools. Do the whole thing on Windows.

2 Likes

At one point the drive wasn’t even showing up on my system at all. Then I tried booting windows and it wouldn’t boot. I ran the windows recovery tool and it said it failed, but then when I booted back to linux the drive was at least visible again, but I couldn’t mount it.

I tried booting a copy of Rescatux and running the disk repair utility there. I booted back to Garuda and I was able to mount the drive and access files. I managed to recover some config files and some pictures, but once I tried to transfer a lot of files at once it hung and wouldn’t transfer and now it’s back to where I sarted.

I don’t have another drive right now, but I’m going to get one in the next day or so to make a copy of this and try to recover things before any more damage is done.

I agree with you. If you get stuck with ntfsfix and various mount options, then either try with windows or create an image.

It gets stuck when copying if the attributes/name/location and other information of the corresponding file are no longer available in the mft. That’s why you should make a 1:1 image of the HDD and try to rescue the files from the image.

Let’s see what the general condition of the Seagate HDD looks like. Post the output from:

sudo smartctl -a /dev/sda

I got an old HDD from a friend today and I was going to make the copy but then I realized that the drive was mounted and the files were accessible. So I copied the most important files from it. I got most of them off of there before it stopped working.

Now here is the output

Smartctl open device: /dev/sda failed: INQUIRY failed

Not good I’m guessing.

I’ll try to make the copy tomorrow.

That just means that the drive was offline.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.