0

After booting my computer one day, my computer routed me to the "grub rescue" shell. All the settings there seemed fine. I booted ubuntu from my usb drive to try to get to my ubuntu partition on my hard drive. I could get into some folders but trying to get into my home folder gave me an "Input/Output error".

Not able to access my files through usb drive ubuntu, I use the grub2 shell and I was able to access my files with the "cat" command and read them. Is there any way to transfer all my files from my hard drive to an external storage device?

PS: I have some very important files that I haven't backed up on my ubuntu partition of my hard drive.

Any help is much appreciated.

Thanks in advance.

EDIT: My smartctl checkup on the hard drive said that the health status is OK.

  • 2
    If you can cat a file, I'd expect you could cp (copy) it to another device. The IO error though implies to the disk is failing, so I'd validate using SMART data first (it's read from the electronics of the drive so won't impact or use any remaining life of a dying drive) to see what life it has left, and not waste IO if the drive is in fact dying. – guiverc May 02 '19 at 01:40
  • @guiverc the cat command was in the grub2 and I can't find any cp command or any other copy related command. How do I validate the hard drive using the SMART data. (sorry I am new to this) – Vishal Muthuraja May 02 '19 at 01:43
  • Also, the partitions from the hard drive sometimes disappear. – Vishal Muthuraja May 02 '19 at 01:44
  • I'd boot using 'live' (eg. ubuntu install media) and avoid using the hdd/sdd if at all possible (in case it's failing; each use can hasten complete-death). You have smartctl which will display drive stats (provided by drive electronics, so won't use heads/platters/media so should not impact any remaining life), gnome-disks or like tool (there are many). I would not 'boot' the drive unless it's just a glitch caused by hit/power-failure/whatever & you've got confirmation it's not a failing drive.. – guiverc May 02 '19 at 01:53
  • smartctl returned SMART Health Status: OK but i still have a feeling my hard drive is failing as it has made some weird noises and it wouldn't be recognized sometimes. – Vishal Muthuraja May 02 '19 at 02:01

1 Answers1

1

DDRescue can make an image of the damaged hdd despite reading errors

In case of complete hardware failure, there is nothing to do else of an hardware intervention. In many cases, the electronic board of the hard-drive is failing, disks and other mechanical parts are ok. So, if you can find an identical drive, you can switch pcbs and have the hdd running again... But that is a bit tricky.

The software solution will be to make an image of the damaged hdd despite reading errors. DDRescue was made for this.
Once booted from USB Live Ubuntu, simply install -to ram- the required software, plug-in another external media and save on it an image of the failing hdd.
You have two options:
- Text mode with gddrescue package
- Graphical mode with ddrescue-gui package

1/ Graphical mode

ddrescue-gui

# Graphical Mode:
# Boot with live usb
# Install DDRescue graphical
sudo add-apt-repository ppa:hamishmb/myppa
sudo apt-get update
sudo apt-get install ddrescue-gui

2/ Text mode

# Text mode:
# Boot with live usb
# Install gddrescue
sudo apt install gddrescue

Official documentation:
https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

Find some howtos on how to use ddrescue:
- https://www.youtube.com/watch?v=6iiyREu4-wI
- https://www.technibble.com/guide-using-ddrescue-recover-data/

cmak.fr
  • 8,696