top of page
Search

Data Recovery & Test Disk

There are times when Linux doesn't boot. This can happen directly after an update. Perhaps you, by accident deleted a partition or the kernel simply rolled over and died: (aka, kernel panic). It could be that the hard drive went south too.


The key here is to be able to recover your files and other data when this happens.


In this tutorial I'll be going over what has worked for me flawlessly. I'll discuss further down in the article another way to recover your data using Test Disk.





By using a Live version of Linux, either on a ( USB Thumb drive or CD/DVD ) you can boot to the desktop and recover your data. To do that, download the .iso image of Linux Mint or any other Linux distro, verify the integrity of the .iso and then make that .iso bootable on the USB thumb drive.


I tend to keep a Live version of Linux Mint on a USB thumb drive handy.


When my Linux distributions won't boot I shut down the computer completely.


Next I plug in the Live USB of Linux Mint while the computer is still shut down. As soon as I press the power button I immediately press the Del ( delete key ) repeatedly until the BIOS Menu comes up.


Now, with most desktop computers it's usually the delete key that will get you into your BIOS.

Laptop's may be different. With my Sony laptop it's the F2 key that allows me to enter the BIOS.

Check your motherboard manual or look for your computer's manual online to find out which key it is to enter into the BIOS.


Once you are in the BIOS Menu navigate to the boot section. While there, make the USB of the Live Linux distro to become the first in the boot list. Save the changes in the BIOS and your computer will reboot.


Once your Live USB or CD/DVD has booted into the desktop session you can begin to start copying and transferring your files and other data onto your external drive or other USB devices.


If that fails there is software that you can use called Test Disk.

Here's the link to get you started:


To install Test Disk on Ubuntu or Debian run:


sudo apt install testdisk

To launch Testdisk run:
testdisk




Test Disk is designed to help recover lost partitions and or make non-booting disk's bootable.

Test Disk can run under Windows, Windows Server, Linux, FreeBSD, SunOS and MacOS X.


Another helpful tip is to perform regular backups.

By this I mean: plugging in your external hard drive and copy and paste all of your data onto that device.


Also, install ( if you haven't already ) Timeshift. It's a real gem!






Keep in mind that "Timeshift" can and will ( depending on how you set it up ) take up a lot of space on your hard drive. I suggest setting up your Timeshift snapshots to go directly to an external drive <or> a USB device that can be used for storage.


Otherwise your Linux system could start complaining that your hard drive is low on disk space.


Enjoy your Linux and drive safe.


Alex




87 views0 comments

Recent Posts

See All
Post: Blog2_Post
bottom of page