Unable to boot/backup HDD partition

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rocCity
Level 1
Level 1
Posts: 4
Joined: Sat Mar 03, 2018 12:16 pm

Unable to boot/backup HDD partition

Post by rocCity »

Hello all. I'm struggling with what looks to be a corrupted HDD and could use some advice on trying to backup my data, which I'm not able to find using the disk utilities I've read about online. I've been at it for a while and apologize upfront for how lengthy this is -- I thought there maybe something useful in the details.

I have a dual boot installation with partitions for Windows 10 and Mint. A couple weeks ago, Windows complained of bad system config info then a few days later grub failed to boot with a no such device error/unknown filesystem error that put me into a grub rescue prompt.

Initially, I was only able to see one partition when I booted with a live CD. Today, after unplugging then re-plugging my HDD back into the motherboard, I can see a bit more. But, my /home directory, which I'm most interested in restoring has most data missing.

Disks utility
States disk is OK, but has ~3500 bad blocks.

fdisk
When using fdisk, I saw the partition block size is causing an issue, so I held back on using the following to try to fix the bad blocks.

Code: Select all

sudo e2fsck -cfpv /dev/sdc5
Thoughts on if this is worth trying or potentially cause more harm?
fdisk error is below. From what I've been reading this is due to the sector size difference between the logical/physical.

Code: Select all

mint@mint:~$ sudo fdisk -l

Disk /dev/sdc: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: ST3000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
[b]Sector size (logical/physical): 512 bytes / 4096 bytes[/b]
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xd7fdf697

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sdc1  *         2048  613649904  613647857 292.6G  7 HPFS/NTFS/exFAT
/dev/sdc2       613650432  614723583    1073152   524M 27 Hidden NTFS WinRE
/dev/sdc3       614727286 4292680454 3677953169   1.7T  5 Extended
/dev/sdc5       614727288  688192131   73464844    35G 83 Linux
/dev/sdc6       688192533  720965069   32772537  15.6G 82 Linux swap / Solaris

Partition 3 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
lsblk & blkid
I then listed the block devices and printed block device attributes.

Code: Select all

mint@mint:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0   1.9G  1 loop /rofs
sda      8:0    0   1.8T  0 disk 
└─sda1   8:1    0   1.8T  0 part 
sdb      8:16   0   1.4T  0 disk 
└─sdb1   8:17   0   1.4T  0 part 
sdc      8:32   0   2.7T  0 disk 
├─sdc1   8:33   0 292.6G  0 part 
├─sdc2   8:34   0   524M  0 part 
├─sdc3   8:35   0     1K  0 part 
├─sdc5   8:37   0    35G  0 part 
└─sdc6   8:38   0  15.6G  0 part 
sdd      8:48   0  74.5G  0 disk 
└─sdd1   8:49   0  74.5G  0 part /media/mint/4BD5-AC18
sr0     11:0    1     2G  0 rom  /cdrom

Code: Select all

mint@mint:~$ sudo blkid
/dev/sda1: LABEL="disk2" UUID="0000000000000000" TYPE="ext4" PARTUUID="00000000-01"
/dev/sr0: UUID="0000000000000000" LABEL="Linux Mint 20.2 Cinnamon 64-bit" TYPE="iso9660" PTUUID="00000000" PTTYPE="dos"
/dev/loop0: TYPE="squashfs"
/dev/sdc1: LABEL="Windows10" UUID="0000000000000000" TYPE="ntfs" PARTUUID="00000000-01"
/dev/sdc2: UUID="0000000000000000" TYPE="ntfs" PARTUUID="00000000-02"
/dev/sdc5: UUID="0000000000000000" TYPE="ext4" PARTUUID="00000000-05"
/dev/sdd1: UUID="0000000000000000" TYPE="vfat" PARTUUID="00000000-01"
testdisk
testdisk is unable to see more than the content when the drive is mounted. The superblock feature provided the following output.

Code: Select all

     Partition                  Start        End    Size in sectors

  Linux                38265   1  1 42837 249 36   73464840
superblock 0, blocksize=4096 []
superblock 32768, blocksize=4096 []
superblock 98304, blocksize=4096 []
superblock 163840, blocksize=4096 []
superblock 229376, blocksize=4096 []
superblock 294912, blocksize=4096 []
superblock 819200, blocksize=4096 []
superblock 884736, blocksize=4096 []
superblock 1605632, blocksize=4096 []
superblock 2654208, blocksize=4096 []

To repair the filesystem using alternate superblock, run
fsck.ext4 -p -b superblock -B blocksize device
I'm assuming the recommendation is to run the following. Is it likely to repair the partition issue to allow me to see the file contents?

Code: Select all

fsck.ext4 -p -b 32768 -B 4096  /dev/sdc5
ddrescue
ddrescue isn't allowing me to restore from sdc partitions with Linux (only sdc1/sdc2, which contain Win10 data). The GUI isn't able to see them and hard coding it results in quick write without data.

gparted
In gparted, I'm seeing the partitions with caution signs as it can't read them. For the better part of the day I've been trying to use the data restore feature that has been searching for file systems on /dev/sdc for over six hours.

Thanks for taking the time to read this and offer your advice.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
kato181
Level 9
Level 9
Posts: 2577
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: Unable to boot/backup HDD partition

Post by kato181 »

Firstly, winwoes has a bad habit of corrupting you grub file after updates, to fix that you can usually bot into a live session usb and in terminal copy & paste the following command then do a reboot. Then see if that helps, if not then post back again.
sudo update-grub
If you are able to can you post the results of gparted with regards to the drive that is red flagged. If you have dual booting on the same drive, and your /home is also there, then the chances of getting back lost data especially in those faulty data blocks will be near impossible.
Ext4 or Extended Files System version 4 is the file system for Linux. ... While Linux supports NTFS, Windows 10 doesn't offer any support for Ext4. So the answer to the question can Windows 10 read ext4 is – No! But you can use third-party software to read ext4 on Windows 10.
You can however copy your /home directory with all the files etc to another drive, if the faulty data block is not in that partition. I don't know of a linux program that can mark bad blocks and move the data to new ones, but winwoes has lot's of those programs, like norton utilities, if it's out that is.
rocCity
Level 1
Level 1
Posts: 4
Joined: Sat Mar 03, 2018 12:16 pm

Re: Unable to boot/backup HDD partition

Post by rocCity »

This morning gparted completed its scans of the HDD and wasn't able to find a file system (image attached). I installed windows on its own partition with NTFS. For Linux, I used separate ext4 partitions for root, /home, and swap.
I'll try recovering grub to see if it helps and report back.
Attachments
gparted flags
gparted flags
rocCity
Level 1
Level 1
Posts: 4
Joined: Sat Mar 03, 2018 12:16 pm

Re: Unable to boot/backup HDD partition

Post by rocCity »

The grub command didn't seem to work.

Code: Select all

mint@mint:~$ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.
I was able to find a way to restore with ddrescue, but the contents were still missing data (same data I could find by mounting the listed drive directly. Still troubleshooting to see if I can access the missing data, but any additional recommendations to try to recover are appreciated.
User avatar
kato181
Level 9
Level 9
Posts: 2577
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: Unable to boot/backup HDD partition

Post by kato181 »

Find attached a snapshot of my LM, yours should be similar to mine except for the ssd. You have 2 unallocated partitions so that may well be a problem also
Screenshot from 2021-09-20 15-08-27.jpg
Locked

Return to “Installation & Boot”