Recovery after a hard drive failure [SOLVED]-sort of

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
mwshook
Level 1
Level 1
Posts: 45
Joined: Sun Nov 27, 2011 1:44 pm

Recovery after a hard drive failure [SOLVED]-sort of

Post by mwshook » Sun Oct 06, 2019 12:31 am

My SSD died. I have a Timeshift backup on a working drive. What's the best way to get back to a working system?

My machine suffered a sudden, unexpected failure of my main Mint SSD. The BIOS no longer recognizes the drive and I assume it is dead. I tried a Timeshift restore to a working drive and I get a "grub rescue>" prompt on boot. I can't figure out anything useful to do from there.

My machine currently has 3 working hard drives.
sda: 120GB SSD. Previously had an unused Windows 8 partition. I restored my Timeshift data here. It seems to be working OK, except booting.
sdb: 2TB HDD. Holds my Timeshift backups, documents, and photos, all backed up to Dropbox. Seems to be working OK.
USB 3TB external drive. I unplugged it for now because it can complicate the boot procedure

From what I gather online, restoring a Timeshift backup to a new hard drive would not be expected to work. I guess Timeshift is geared more toward software regressions than catastrophic hardware failures.

Where do I go from here? I had a lot of customized stuff and would like to avoid a complete reinstall of Mint. Is there some way to keep my restored data on sda1, and fix GRUB, MBR, or some other obscure acronym? Would it make any difference to plug sda's cable into the dead SDD's motherboard slot? Would that trick linux into thinking it's the old drive? I can't remember how they were named before the crash.

Is my fallback to reinstall LM 19.2, open Timeshift, and copy/paste what files I can?

Thanks for any help.
Last edited by mwshook on Wed Oct 09, 2019 1:31 pm, edited 1 time in total.
Linux newbie since 1997

User avatar
Spearmint2
Level 16
Level 16
Posts: 6880
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Recovery after a hard drive failure

Post by Spearmint2 » Sun Oct 06, 2019 1:09 am

All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

User avatar
redx87
Level 3
Level 3
Posts: 115
Joined: Fri Feb 08, 2019 7:20 am

Re: Recovery after a hard drive failure

Post by redx87 » Sun Oct 06, 2019 1:39 am

Hi Spearmint2,

By mistake I deleted a partition on my spare 320gb hdd which held my Timeshift snapshots. This caused me to lose my grub configuration and crashed my Linux Mint 19.1 on my main 500gb hdd drive. I tried several things to fix it but finally had to admit defeat and accept the fact that I'd have to do a full re-install from my live cd,

I found that when doing the re-install you get several choices on how to do it. I selected the option "Something Else" which opened a window showing my Dev/sda 500gb drive, containing my Linux Mint 19.1 O/S. I selected that drive as the target and clicked on "change" which presented a popup box where I could edit the mount point and so on, and here you can choose to format the drive or not . I didn't want to re-format so left it unchecked. The re-installation went ahead and when it finished and re-booted, my old familiar desktop background appeared and all my personal files, data, settings, and configurations were still intact. I'd lost a few programs but they were easily re-installed and all their previous configurations were immediately recognised. So doing a full re-install of Linux Mint doesn't mean you have to lose all your stuff.

Perhaps what I did will work in your case too.

User avatar
pbear
Level 9
Level 9
Posts: 2642
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Recovery after a hard drive failure

Post by pbear » Sun Oct 06, 2019 2:44 am

mwshook wrote:
Sun Oct 06, 2019 12:31 am
Where do I go from here? I had a lot of customized stuff and would like to avoid a complete reinstall of Mint. Is there some way to keep my restored data on sda1, and fix GRUB, MBR, or some other obscure acronym? Would it make any difference to plug sda's cable into the dead SDD's motherboard slot? Would that trick linux into thinking it's the old drive? I can't remember how they were named before the crash.
I've done something similar, i.e., using rsync to move an installed system to a new hard drive. You need to do at least two things. First is editing fstab to reflect the UUIDs of the new drive. Boot a live session. Open Terminal. Run sudo blkid. Now, open fstab with xed admin:///media/mint/<partition>/etc/fstab. (You can get the path information in File Manager.) Copy in new UUID for each mount point. Close and save.

Second, you need to install Grub. Read Spearmint2's link for background. For the actual work, I used and recommend chroot. This askubuntu page has a very clear set of instructions. Those are for a UEFI system. If yours is BIOS, use these instructions. If you're not familiar, chroot is a special mode which lets one system act as if it were the root user of another. Here, we're using chroot to install Grub the same as your installed system would if you could boot it. This may sound a bit like black magic, but it's a natural extension of the principle that root can do pretty much anything.

To be clear, I've not done what I describe for your particular scenario. I think it will work, but can't guarantee. If you want to wait a bit and get a second opinion, I won't be offended. Just trying to help. Good luck.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
pbear
Level 9
Level 9
Posts: 2642
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Recovery after a hard drive failure

Post by pbear » Tue Oct 08, 2019 2:44 am

Thinking it over, occurs to me the simpler solution might be to do a fresh installation, then restore the Timeshift snapshot to that. Just did a test run in VirtualBox and it seemed to work. No fiddling with Grub, as the installer handled that. Didn't even have to fix fstab (which surprised me). FWIW, I did the restore in the same live session as I used for installation, mainly because I prefer to do this sort of thing outside the system being restored. Also, to save time, I did a minimal install (no internet, no third party apps), on the assumption the Timeshift restore would supply those (which it did).

You don't risk much by trying this strategy, as you'll still have the snapshot to try another solution if this one goes sideways.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
Spearmint2
Level 16
Level 16
Posts: 6880
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Recovery after a hard drive failure

Post by Spearmint2 » Tue Oct 08, 2019 11:53 am

Since this was due to undefined partition, if your drive was GPT setup, you could have used the gdisk utility command to copy the backup partition table at the end of the drive, back to the front.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

mwshook
Level 1
Level 1
Posts: 45
Joined: Sun Nov 27, 2011 1:44 pm

Re: Recovery after a hard drive failure

Post by mwshook » Tue Oct 08, 2019 1:31 pm

I'm still a bit confused by this. I tried a fresh install, as recommended, but ended up with a BusyBox/initramfs prompt. This is back where I started with the original crash! (when I came home, my computer wasn't frozen, it was at an initramfs prompt)

I forgot to mention, when I boot, the BIOS spends 30 seconds looking for drives, when it used to take 2 seconds. I wonder if the dead drive is not fully dead and is interfering with my boot process. The dead drive is not showing up in the BIOS interface. Who knows? This weekend, I will try physically removing the drive and see if that helps this process along.
Linux newbie since 1997

User avatar
Spearmint2
Level 16
Level 16
Posts: 6880
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Recovery after a hard drive failure

Post by Spearmint2 » Tue Oct 08, 2019 2:31 pm

try using nomodeset in a boot line, just after quiet splash. If you can get into Mint, then run the Driver Manager program from Menu.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

mwshook
Level 1
Level 1
Posts: 45
Joined: Sun Nov 27, 2011 1:44 pm

Re: Recovery after a hard drive failure

Post by mwshook » Wed Oct 09, 2019 1:31 pm

Ugh, this is seeming more catastrophic than I thought. It seems like my motherboard only has one working SATA port.
I've got a fresh install working now on an SSD. But I can't get to my backups on the HDD, but they were still intact as of a couple days ago.
I think I may need a new motherboard, a least. I'm going to mark this [SOLVED], unless I can mark it [DEJECTEDLY BOUGHT NEW HARDWARE].
Linux newbie since 1997

User avatar
Spearmint2
Level 16
Level 16
Posts: 6880
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Recovery after a hard drive failure [SOLVED]-sort of

Post by Spearmint2 » Wed Oct 09, 2019 8:42 pm

when you start working on it again,paste a link in new thread back to this one please.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

mwshook
Level 1
Level 1
Posts: 45
Joined: Sun Nov 27, 2011 1:44 pm

Re: Recovery after a hard drive failure [SOLVED]-sort of

Post by mwshook » Sun Oct 13, 2019 12:12 am

I've made some more progress on this problem today. I had some of my cables confused and had not actually unplugged the bad drive. Leaving the bad drive plugged in would disable any port on the same row. After smacking my forehead over that I got my other SDD and HDD working and did a fresh install.
Simply restoring the Timeshift backup didn't work (as expected) leaving me with only a root# recovery prompt.

I fresh installed again, opened up Timeshift and browsed the backed-up files. I was able to copy-paste the contents of my home directory and recover a fair amount of stuff. All my documents and photos are fine on the HDD, backed up on Dropbox.

Two things I'm trying to figure out:

During the initial partitioning I apparently forgot to add a swap partition. Is there a way to go back and do this?

I had Minecraft installed and I'm not sure if it was backed up. Somewhere in /var or /opt or /usr/local? I never know where these things go and Google is surprisingly unhelpful. It doesn't look like my son's home directory was backed up, so his .minecraft is probably lost. :?

I had heard good things about Timeshift but had hoped it would be a little more useful in a situation like a hard drive failure. Any tips on preventing future headaches? The dead drive was 10 years old and the "new" drive is 8.
Linux newbie since 1997

User avatar
Spearmint2
Level 16
Level 16
Posts: 6880
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Recovery after a hard drive failure [SOLVED]-sort of

Post by Spearmint2 » Sun Oct 13, 2019 6:43 am

Code: Select all

info mkswap
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

User avatar
pbear
Level 9
Level 9
Posts: 2642
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Recovery after a hard drive failure [SOLVED]-sort of

Post by pbear » Sun Oct 13, 2019 12:41 pm

mwshook wrote:
Sun Oct 13, 2019 12:12 am
Any tips on preventing future headaches?
Use something designed for the task, e.g., rsync, Clonezilla or Macrium. Timeshift is a special purpose utility for restoring the system to a prior known-working state. It's not a general purpose backup utility.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Post Reply

Return to “Installation & Boot”