1

After laptop (Lenovo T520) fell on the ground, my HDD (Crucial_CT240M500SSD3) started making clicking sounds during boot and at startup started receiving following message: 2100: Detection error on HDD0 (Main HDD)

So I presume my disk has been damaged and cannot reach login screen in Ubuntu as it always boots into Emergency mode.

You are in emergency mode. 
After logging in, type "journalctl -xb" to view system logs, 
"systemctl reboot" to reboot, "systemctl default" 
or ^D to try again to boot into default mode". 

My main goal is to retreive personal data and save it to an external disk.


The problem is that my /home directory is empty. I have found many methods which point toward resolving the issue, but nothing really worked and I don't know what else to try.

In my /etc/fstab I have separate entries for / and /home, but I haven't created a separate partition for home during Ubuntu installation (at least not manually):

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=99d3a843-b520-41c0-bc80-e64fb67439c8 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda1 during installation
UUID=f0b370b3-90d8-46ca-956f-f620b5c40536 /home           ext4    defaults        0       2  
# swap was on /dev/sdb5 during installation
UUID=0e4c9122-3317-4478-bc6b-852415505118 none            swap    sw              0       0

journalctl -xb snippet where the mountin of /home UUID fails

...
dec 10 12:11:18 jp-pc kernel: input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
dec 10 12:11:18 jp-pc systemd[1]: Received SIGRTMIN+20 from PID 384 (plymouthd).
dec 10 12:11:27 jp-pc kernel: thinkpad_acpi: EC reports that Thermal Table has changed
dec 10 12:12:45 jp-pc systemd[1]: dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device: Job dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device/start timed out.
dec 10 12:12:45 jp-pc systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device.
-- Subject: Unit dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device has failed
-- Defined-By: systemd
-- ...
-- 
-- Unit dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device has failed.
-- 
-- The result is RESULT.
dec 10 12:12:45 jp-pc systemd[1]: Dependency failed for /home.
-- Subject: Unit home.mount has failed
-- Defined-By: systemd
-- ...
-- 
-- Unit home.mount has failed.
-- 
-- The result is RESULT.
dec 10 12:12:45 jp-pc systemd[1]: Dependency failed for Local File Systems.
-- Subject: Unit local-fs.target has failed
-- Defined-By: systemd
-- ..
-- 
-- Unit local-fs.target has failed.
-- 
-- The result is RESULT.
dec 10 12:12:45 jp-pc systemd[1]: Dependency failed for Clean up any mess left by 0dns-up.
-- Subject: Unit dns-clean.service has failed
-- Defined-By: systemd
-- ...
-- 
-- Unit dns-clean.service has failed.
-- 
-- The result is RESULT.
dec 10 12:12:45 jp-pc systemd[1]: dns-clean.service: Job dns-clean.service/start failed with result 'dependency'.
dec 10 12:12:45 jp-pc systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
dec 10 12:12:45 jp-pc systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
dec 10 12:12:45 jp-pc systemd[1]: home.mount: Job home.mount/start failed with result 'dependency'.
dec 10 12:12:45 jp-pc systemd[1]: Dependency failed for File System Check on /dev/disk/by-uuid/f0b370b3-90d8-46ca-956f-f620b5c40536.
-- Subject: Unit systemd-fsck@dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.service has failed
-- Defined-By: systemd
-- ...
-- 
-- Unit systemd-fsck@dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.service has failed.
-- 
-- The result is RESULT.
dec 10 12:12:45 jp-pc systemd[1]: systemd-fsck@dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.service: Job systemd-fsck@dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.service/start failed with result 'dependency'.
dec 10 12:12:45 jp-pc systemd[1]: dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device: Job dev-disk-by\x2duuid-f0b370b3\x2d90d8\x2d46ca\x2d956f\x2df620b5c40536.device/start failed with result 'timeout'.
...

fdisk says that partition does not start on physical sector boundary (I noticed that sda2 and sda5 reside on the same interval):

$ fdisk -l

Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: Crucial_CT240M50
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x021adb68

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 429799423 429797376 204.9G 83 Linux
/dev/sda2       429801470 468860927  39059458  18.6G  5 Extended
/dev/sda5       429801472 468860927  39059456  18.6G 82 Linux swap / Solaris

Partition 2 does not start on physical sector boundary.

blkid (removed loop entries for readability):

$ blkid
/dev/sda1: UUID="99d3a843-b520-41c0-bc80-e64fb67439c8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="021adb68-01"
/dev/sda5: UUID="0e4c9122-3317-4478-bc6b-852415505118" TYPE="swap" PARTUUID="021adb68-05"

/dev/sda2 is missing, but when I explicitly call:

$ blkid /dev/sda2
/dev/sda2: PTUUID:"d5620a3d" PTTYPE="dos" PARTUUID="021adb68-02"

lsblk in LiveOS (removed loop entries for readability)

$ lsblk -o NAME,RM,SIZE,TYPE,MOUNTPOINT,UUID
NAME   RM   SIZE RO TYPE MOUNTPOINT   UUID
sda     0 223.6G  0 disk  
├─sda1  0 204.9G  0 part /home/xx/mnt 99d3a843-b520-41c0-bc80-e64fb67439c8
├─sda2  0     1K  0 part  
└─sda5  0  18.6G  0 part              0e4c9122-3317-4478-bc6b-852415505118
sr0     1  1024M  0 rom 

There is no entry for the UUID of /home (taken from /etc/fstab) in /dev/disks/by-uuid/. Only for sda1 and sda5.

Please let me know if any additional info is required.


What I've tried already:
  1. In emergency mode:
$ mount -o rw,remount /
$ mount -a
mount: /home: can't find UUID=f0b370b3-90d8-46ca-956f-f620b5c40536.
  1. In LiveOS I ran fsck on /dev/sda1 which found a lot of bad sectors, but now it returns clean.

$ fsck /dev/sda2
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Could this be a zero-length partition?

Same error with fsck.ext3 and fsck.ext4

  1. Commenting out /home part in /etc/fstab brings me to Ubuntu login screen, but after entering the password it freezes. I presume this is due /home not mounted properly by the system
oknajp
  • 11
  • 2
  • There reference to a separate home partition in fstab is very strange, given the facts that you don't remember creating it, and it not shown by `fdisk -l`. Anyway, reading data from a damaged HDD is possible if it is readable, which doesn't seem to be the case. – mikewhatever Dec 11 '20 at 10:14
  • can you manually `mount /dev/sda1 /home` ? if you can get it mounted you should take backups immediately. I'm guessing that you used to have linux on disk 1, and then installed linux on disk 2, and it kept the home directories from the previous installation – Jad Dec 11 '20 at 10:41
  • Thank you for the replies @mikewhatever: yes, it does seem it is not readable @jad: Ubuntu 16.04 LTS was installed on a freshly formatted disk (which had windows installed previously), with no partitions done. It was upgraded to 18.04 LTS afterward and worked fine. `/dev/sda1` is mounted to root, but the `/home` directory is empty. – oknajp Dec 12 '20 at 11:29

0 Answers0