Author Topic: The joy of Master boot record recovery  (Read 378 times)

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 3252
    • View Profile
The joy of Master boot record recovery
« on: June 06, 2017, 04:29:22 PM »
It's the vera crypt software that hosed it. I have a dual disk setup, I used to mirror them.

well, I encrypted the primary HDD, then cloned it. So the cloned image is broken, does not boot. The MBR must be hosed.  I decided to encrypt it just in case, while booted off the primary HDD.

Now yesterday the primary HDD fails. Sounds like a loose bit floating inside of it and that noise it makes now. Hardware failure. 

I try to boot off secondary HDD, not only does it not boot due to MBR issues but it's encrypted. I used the Vera Crypt recovery DVD and it decrypted it - took 36 hours - I used different algorithms - one on top of another - however still not booting obviously. And I lost my copy of Windows CD so I cannot use its recovery features.

tomorrow I am getting that Windows 7 recovery disk and will try to salvage the MBR. If all goes well, it will boot. It has an entire operating system on it. why oh why did I get involved with this veracrypt byllshyte.

Friends, don't let friends use Windows?

I don't understand Windows. It's a miracle I lasted in IT as long as I did, not having a deep understanding of it - and not really desiring it either.
Brawndo. It's got what plants crave.

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2435
    • View Profile
Re: The joy of Master boot record recovery
« Reply #1 on: June 06, 2017, 08:16:42 PM »
Ugg. Doesn't sound too fun. Good luck, I hope it works out for you.

In linux I just backup my MBR by a single command --   dd if=/dev/sda   of=FILENAME  bs=512  count=1

The inverse command restores the MBR from its backup --  dd  if=FILENAME  of=/dev/sda

For the newer disks with GPT partitioning, just use the sgdisk command.

The Gorn

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 21457
  • Gorn Classic, user of Gornix
    • View Profile
Re: The joy of Master boot record recovery
« Reply #2 on: June 07, 2017, 09:00:28 AM »
Ugg. Doesn't sound too fun. Good luck, I hope it works out for you.

In linux I just backup my MBR by a single command --   dd if=/dev/sda   of=FILENAME  bs=512  count=1

The inverse command restores the MBR from its backup --  dd  if=FILENAME  of=/dev/sda

For the newer disks with GPT partitioning, just use the sgdisk command.

Benali, I've seen you (and maybe also Pxsant) mention a disk imaging backup here in the past.

Do you wind up having a bunch of portable HDDs laying around with backups on them? One reason I use Acronis is the incremental backup... I can update my initial backup of a system and every time I do so it adds a few GB to the original.... not an entire new copy of the drive.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.

pxsant

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 1545
    • View Profile
Re: The joy of Master boot record recovery
« Reply #3 on: June 07, 2017, 10:46:05 AM »
Here is a link to a short article on encrypting hard drives

http://www.pcworld.com/article/2858642/you-can-encrypt-your-hard-drive-but-the-protection-may-not-be-worth-the-hassle.html

Here is a key paragraph in the article - "But that level of security comes at a cost. Encrypting the entire drive can brick your PC.  Make an image backup first, and make sure you have emergency repair drives for both the encryption software and your image backup program."

I would have encrypted only the specific folders which contain your data, not the entire drive.   That way the MBR is not affected.

Unix you might look at this article on how to restore a Windows MBR using Linux.

http://ubuntuhandbook.org/index.php/2013/08/repair-windows-mbr-from-ubuntu/

Gorn, I also normally use either Acronis or Clonezilla.

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2435
    • View Profile
Re: The joy of Master boot record recovery
« Reply #4 on: June 07, 2017, 03:53:31 PM »
Do you wind up having a bunch of portable HDDs laying around with backups on them?

I can update my initial backup of a system and every time I do so it adds a few GB to the original.... not an entire new copy of the drive.

For personal situations ---

No, for backup and restoring the operating system, I just keep one current copy around to rebuild any of the couple dozen computers I support.

Linux is 2 Gig in size total (you're not talking the tens of gigs involved in a Windows system.)

Also, Linux does not bind to the specific hardware it runs on. You can take a single linux master and just Copy it onto any other computer, and it works immediately. (There is no Registry to prevent cross-machine transportability.) The most I've ever had to change is edit the ETC/FSTAB to match a different disk configuration. Restoring the OS does not affect their personal data because it's on a different partition.

For backing up their personal data, I just back up their HOME directory with a scheduled background script. Rare is the user who has more than a gig of personal data, even with pictures and the like involved. (None have video or big digital libraries it might be a different story).

For business situations --

Of course, here you have an entirely different matter. As a DBA, I've supported (and designed) backup/recovery systems for any number of businesses. As you say, you must have incrementals. Plus you need cumulatives, differentials, block-level imaging supported by the operating system, etc, etc. And you must have (1) a user-friendly GUI interface to manage it all (2) a whole stock of underlying scripts to automate it (3) a scheduler system to control it all (4) off-site disaster recovery strategy that's been tested .... and more.



unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 3252
    • View Profile
Re: The joy of Master boot record recovery
« Reply #5 on: June 07, 2017, 05:55:47 PM »
Interesting points you make. I am downloading Ubuntu right now and will certainly try it.

Brawndo. It's got what plants crave.

ilconsiglliere

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2634
    • View Profile
Re: The joy of Master boot record recovery
« Reply #6 on: June 08, 2017, 05:30:40 AM »
Disk encryption when it goes bad can be very nasty as we are seeing here.

There is an easier solution - keep your data separate from OS. On desktop/mini towers I have  2 or more physical drives. A C hard drive and a D hard drive.

Even on machines that have a single disk drive like laptops I will partition the drive down to a C and D drive and move all the user files to the D drive. If the C drive craps out than you will at least still have your stuff on D and it will be untouched. Of course this doenst work if the hard drive goes bad. But if you loose C, at least you can slap an OS into C and get your stuff.

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2435
    • View Profile
Re: The joy of Master boot record recovery
« Reply #7 on: June 08, 2017, 05:31:21 AM »
For an individual user, this would be my preference for how to set up Ubuntu --

1- HOME directory in its own partition

2- Linux OS in its own partition

3- Isolate all individual user settings into their HOME partition (eg, the Desktop folder, etc)

4- Incrementals are needed for big data, not needed for small personal data

    (eg, backing up a gig or two at 3-5 mbps only takes 5 to 15 minutes with a Copy command, so incrementals are not really necessary.
     But backing up tens of gigs, incrementals become vital to speed things up.  See this article for various free tools to manage/implement B/R --
     www.tecmint.com/linux-system-backup-tools/)

5- If you have big data, put it on its own partition. If you only have a gig or two of personal data, just have the user keep it in his HOME partition

6- Ubuntu lets you encrypt your HOME partition simply by checking a box during the Install process.

7- You can still backup & recover an encrypted HOME partition simply by the linux Copy command (or other dd-like commands if you prefer).
    ( That's true even though no ID including ROOT can read the encrypted data!)

8- If you want a dual boot with Windows, let Linux control the boot process. Do backup/recovery of MBR/GPT data via linux. (Avoid Windows' restrictions.)


The Gorn

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 21457
  • Gorn Classic, user of Gornix
    • View Profile
Re: The joy of Master boot record recovery
« Reply #8 on: June 08, 2017, 07:09:03 AM »
4- Incrementals are needed for big data, not needed for small personal data

I have big personal data... image files and movie files. The old idea that personal data is just a gig or two is obsolete. Unless one doesn't take movies or pictures.

I just ran the utility WinDirScan on my personal data directory in Windows... about 25% or 50GB+ is images. Similar in movies. Of course, I don't add to the images rapidly but it does grow steadily over the years, and increases in camera resolution means that the yearly delta increases as well.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2435
    • View Profile
Re: The joy of Master boot record recovery
« Reply #9 on: June 08, 2017, 06:16:01 PM »
Gorn, sounds like we're sparring about something, but I don't know what. I don't disagree with anything you've said. All I've done is share what I do to support a number of PCs I work with. I don't mean to come off as saying I have the answers for everybody else. Cheers.

The Gorn

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 21457
  • Gorn Classic, user of Gornix
    • View Profile
Re: The joy of Master boot record recovery
« Reply #10 on: June 08, 2017, 06:57:30 PM »
No, I didn't write that being passive aggressive or anything. I'm not sparring. I literally meant that it used to be the case that personal data was a few hundred MB, and that moved to a few GB, and now it's much larger. So what's considered "personal data" has changed a lot.

Sorry for sounding aggressive and I didn't mean to be that way at all.

Thanks for your ideas.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.

benali72

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 2435
    • View Profile
Re: The joy of Master boot record recovery
« Reply #11 on: June 09, 2017, 07:24:38 AM »
Hi Gorn, thanks for your response. Sounds like I misinterpreted your comments, and should be apologizing to you! Cheers.

Your point about how personal data has exploded is key. The people I'm supporting are seniors so they probably aren't in the mainstream anymore with the way everybody else's data has grown. We're all going to really need those SSDs with their data access rates in the sub-100 microsec range to help push all that data around. The PCs I support are probably outdated in that respect, too... we don't have any SSDs at all.

The Gorn

  • I absolutely DESPISE improvised sulfur-charcoal-salt peter cannons made out of hollow tree branches filled with diamonds as projectiles.
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 21457
  • Gorn Classic, user of Gornix
    • View Profile
Re: The joy of Master boot record recovery
« Reply #12 on: June 09, 2017, 08:44:33 AM »
Then there's my mother in law's Chromebox tied to the evil NSA empire, with absolutely no on-board storage. Heaven!  8) She wouldn't know what to do with an .mpeg file if it came up and bit her.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.

unix

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 3252
    • View Profile
Re: The joy of Master boot record recovery
« Reply #13 on: June 09, 2017, 05:07:06 PM »
I am trying to install Ubuntu, the install hangs at the point of filesystem creation, where is there is a little "+/-" icon. Just hangs forever.  I am not sure what the problem might be, maybe bad DVD?

Borrowed a Windows 7 CD, tried to use the  "recovery" unbootable system feature, no go. It does it thing forever and then says it cannot recover it. Maybe the CD is defective.

I bought another Windows 7 recovery CD will try that. If that still does not work, will buy Windows, install it on the new HD and see if I can recognize the data on the other hard drive. If it cannot boot, maybe it's at least visible.
Brawndo. It's got what plants crave.

pxsant

  • CCF Winner's Circle - Supporter
  • Wise Sage
  • *
  • Posts: 1545
    • View Profile
Re: The joy of Master boot record recovery
« Reply #14 on: June 09, 2017, 05:11:55 PM »
Hold on - you don't install Ubuntu.   Read the article.   You boot on the live CD, get into Linux and follow the directions from there.  If you install Linux on the hard drive, even as a dual boot setup you are screwed.   You will have killed your objective to restore the Windows MBR in a clean way.

Here is another potential way to repair the MBR.

Go to the section "Via the Boot-Repair graphical tool" and read that.  Not certain if the current Ubuntu has this utility.

https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader

In either case always do this from a live CD without installing Linux on the hard drive.
« Last Edit: June 09, 2017, 05:31:11 PM by pxsant »