After trying to recover Ubuntu, my Hdd cannot be accessed!!

linux newbie 2024

New Member
Joined
May 3, 2024
Messages
12
Reaction score
2
Credits
123
Please help me saving my data on my hard drive. And please excuse me as I'm not an expert in Ubuntu but can follow instructions.

I have a lenovo ideapad 330 with 1 tera hdd that have dual boot of windows 10 and Ubuntu, Ubuntu is my main OS.

Last month I've encountered repeated problems while booting with the error "filesystem on /dev/sda1 requires a manual fsck" and by searching the problem I was able to solve it and it boots normally.

As Ubuntu 24.04 is out I thought it'll solve this problem for me so I did a clean installation of Ubuntu 24.04 along side windows 10.

Yesterday while using Ubuntu it suddenly freezes and didn't respond at all so I restarted it and choose the recovery mode, but it stuck again during that so I restarted it but it only gives me a blank screen.

I tried to reinstall Ubuntu, but gparted cannot find my Hdd at all, it gives the error "error fsyncing/closing/dev/sda: input/output error" with each partition on my hdd.

BIOS can still see my Hdd but Ubuntu installation can not. I tried to boot windows but I get the error "Default boot Device Missing or Boot failed".

My HDD partitions is as follows:

Sda1 swap partition 14 gb

Sda2 ubuntu OS 149 gb

Sda3 entertainment 781 gb

Sda4 work 722 gb

Sda5 backup 165 gb

Sda6 EFI boot 100 mb

Sda7 win10 30 gb

I don't understand now, is my Hdd dead?! But how can Windows tries to repair itself?

Could you please help me? I really need to get the Hdd fixed it contains all my data and stupidly I don't have a backup for it.

Please help ��


Update:

When I boot I can see the grub menu and When I try to enter the recovery mode of ubuntu it stuck at the first line: Loading Linux 6.8.0.31-generic


Second update:

I realized that it freezes quickly at any stage even at BIOS!! It freezes even at Just pressing F10!

Please help!! Is my Hdd dead?
 


attach a ubuntu usb stick to your laptop and boot from that one.

look if your device shows up at all, as in sudo fdisk -l

If it does, send us the output of smartctl -A /dev/sda

It is very likely that your hdd has physical errors and its on its dying breath. In this case you should try to create a dd image of it, which may or may not work.

Broken hard drives sometimes work for a few minutes, and then they dont, and then they work again and so on.

You can use a tool like ddrescue https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html to create an image of the hard disk. you will need a second hard disk with the same size of the disk to write the image file to it.

Read the manual of ddrescue carefully before attempting that. Make sure you setup your ddrescue command in a way that you can continue where you left off. Its been a while since I used it so i cant give you good exmaples, but the idea is

1) first run, skip sectors that throw errors without retrying
2) write this logfile so you dont have to read sectors twice
3) when you have a half way complete image, run ddrescue again with retry=20 or so to try to recover failed sectors

Do not attach your hdd to electricity again until you have fully understood ddrescue and know exactly what arguments you will give to it on the ubuntu live usb stick. Every time you attach your hdd to electricity, you make the problem worse. If you get lucky, you will be able to create such an image. If not, and you have no backup, your data is gone.
 
attach a ubuntu usb stick to your laptop and boot from that one.

look if your device shows up at all, as in sudo fdisk -l

If it does, send us the output of smartctl -A /dev/sda

It is very likely that your hdd has physical errors and its on its dying breath. In this case you should try to create a dd image of it, which may or may not work.

Broken hard drives sometimes work for a few minutes, and then they dont, and then they work again and so on.

You can use a tool like ddrescue https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html to create an image of the hard disk. you will need a second hard disk with the same size of the disk to write the image file to it.

Read the manual of ddrescue carefully before attempting that. Make sure you setup your ddrescue command in a way that you can continue where you left off. Its been a while since I used it so i cant give you good exmaples, but the idea is

1) first run, skip sectors that throw errors without retrying
2) write this logfile so you dont have to read sectors twice
3) when you have a half way complete image, run ddrescue again with retry=20 or so to try to recover failed sectors

Do not attach your hdd to electricity again until you have fully understood ddrescue and know exactly what arguments you will give to it on the ubuntu live usb stick. Every time you attach your hdd to electricity, you make the problem worse. If you get lucky, you will be able to create such an image. If not, and you have no backup, your data is gone.
Hi,
Thanks for replying.
I'm now on the USB stick
this is the output for sudo fdisk -l

Disk /dev/loop0: 1.63 GiB, 1748217856 bytes, 3414488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 457.53 MiB, 479752192 bytes, 937016 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 868.06 MiB, 910225408 bytes, 1777784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 74.24 MiB, 77844480 bytes, 152040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 269.63 MiB, 282722304 bytes, 552192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 10.72 MiB, 11239424 bytes, 21952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 505.09 MiB, 529625088 bytes, 1034424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 28.92 GiB, 31051513856 bytes, 60647488 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1CF7D054-8DB5-4194-971E-3C8665684807

Device Start End Sectors Size Type
/dev/sdb1 64 11931883 11931820 5.7G Microsoft basic data
/dev/sdb2 11931884 11942023 10140 5M EFI System
/dev/sdb3 11942024 11942623 600 300K Microsoft basic data
/dev/sdb4 11943936 60647423 48703488 23.2G Linux filesystem


Disk /dev/loop8: 10.32 MiB, 10821632 bytes, 21136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 38.73 MiB, 40615936 bytes, 79328 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 476 KiB, 487424 bytes, 952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 137.29 MiB, 143962112 bytes, 281176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 116.72 MiB, 122392576 bytes, 239048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes



So I think my HDD is not showing. But it appears in disk as below!!

Screenshot from 2024-05-03 16-39-47.png


I also did: smartctl -A /dev/sda

and it gives me :

Smartctl open device: /dev/sda failed: Permission denied

Please excuse me for my ignorance and English is my second language.
 
put sudo in front if it - sudo smartctl -A /dev/sda

you may need to check if smartmontools is installed or not you can check that through the Synaptic Package Manager just type it in the Search Block

View attachment 19729
I've already installed smatmontools and when I added sudo , it gives me : Smartctl open device: /dev/sda failed: INQUIRY failed.
 
Same result!
Here's the output:
sudo smartctl --attributes --log=selftest /dev/sda

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-31-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

Smartctl open device: /dev/sda failed: INQUIRY failed
 
No offense meant in this at all.

If you dont know that permission denied means you need sudo, dont try this yourself or via a forum. Find someone in your area or find a data recovery company to do this for you.

Every time you attach that disk, you are loosing the minutes you can recover it.

In case you still want to try - INQUIRY failed could mean that only the controller is broken. In this case you might be able to purchase an identical drive and swap the controller board.
 
As Ubuntu 24.04 is out I thought it'll solve this problem for me so I did a clean installation of Ubuntu 24.04
Ubuntu 24.04 has been criticised heavily since its release.

You may get a more stable result by downloading and Installing Linux Mint 21.3 Cinnamon

Question ...how old was that drive which appears to have failed ?
 
No offense meant in this at all.

If you dont know that permission denied means you need sudo, dont try this yourself or via a forum. Find someone in your area or find a data recovery company to do this for you.

Every time you attach that disk, you are loosing the minutes you can recover it.

In case you still want to try - INQUIRY failed could mean that only the controller is broken. In this case you might be able to purchase an identical drive and swap the controller board.
No worries.

I'll take it to the repair center today and see what can be done. As I'm not an expert, I'll discuss this idea of swaping the controller board with the technician.
 
Keep an open mind....the latest Ubuntu does have problems.....weird things are possible.

Good luck.
 
Ubuntu 24.04 has been criticised heavily since its release.

You may get a more stable result by downloading and Installing Linux Mint 21.3 Cinnamon

Question ...how old was that drive which appears to have failed ?
I've never used any other flavour of Linux so far. But I guess I'll give it a try.
Not sure, but I think that drive is about four years now.
 
4 years is very young. i know it can happen at any time, but 4 years would bring a look of disapproval to most peoples faces.

I know I push Linux Mint ....that is a fact....I do.

There is good reason for me doing that...it is as stable as a rock

Your previous Ubuntu was also reasonably stable....you could also go back. if you are unsure, go to Linux Mint
 


Top