4

I'm not sure exactly how I overwrote it, but I was writing a floppy image to a floppy disk (using a USB floppy drive), and somehow I inadvertently wrote the floppy disk to my primary hard disk which I have Windows 7 Enterprise x64 installed on with Bitlocker enabled. Now when I boot, I get the error "Non-system disk or disk error." Is there any way to repair this?

I have made a low-level backup in case anything I try does further damage, and here's what I've tried so far...

  • bootrec /fixmbr - didn't work, now it says "invalid partition table" when I try to boot.
  • bootrec /fixboot - didn't work, command returns "element not found."
  • bootrec /rebuildbcd - didn't work, command returns "Total identified Windows installations: 0"

UPDATE: After running bootrec /fixmbr I used diskpart to recreate the partitions and assign drive letters to them. I was then able to use repair-bde D: R: -rp 123456-* to start recovering the files. It's still trucking along at the moment, so we'll see how it works out tomorrow.

3
  • @Ramhound, I will, I am just hoping to resolve this ASAP, and wanted to see if anyone had better suggestions. Jun 11, 2015 at 15:31
  • Why was this question downvoted? Seems like a fine question to me.
    – TTT
    Jun 11, 2015 at 15:47
  • @Ramhound - so basically you're saying that if OP didn't list some of his ideas, the question would have been ok? I think it's perfectly fine to list ideas you have, so that if someone knows the answer, they can just say, "Go with option 3", or "definitely don't go with option 2 because you'll make things worse.", etc.
    – TTT
    Jun 14, 2015 at 17:55

2 Answers 2

4
+50

In case anyone else does this, here's what I had to do, step-by-step, in order to restore my PC to working order.

  1. Boot from Windows Install disk and choose Recovery, and get to command prompt.
  2. Run bootrec /fixmbr (may not be necessary)
  3. Run diskpart and recreate partitions using quick flag. Hopefully you know how big your partitions were exactly.
    • Make sure to mark the System Reserved (if you have one) or C: partition as active.
  4. Attach a drive of the same size or larger with the same number of partitions you need to recover.
  5. Run repair-bde C: Z: -rp 111111-222222-[...] where C: is on the damaged disk and Z: is on the new disk you're going to temporarily store the recovered / decrypted files on. You'll need to do this for each partition. Hopefully, you have your BitLockers recovery passwords.
  6. Once repair-bde finishes, verify you're files were restored. Then use robocopy /mir Z:\ C:\ /xf hiberfil.sys /xj /xjf /xjd to copy the files back to the old damaged disk.
    • UPDATE: Something I did not realize at the time is the /mir flag does not copy ownership or security. What I should have ran is robocopy /e /copyall Z:\ C:\ /xf hiberfil.sys /xj /xjf /xjd.
  7. Use the Windows install disk Startup Recovery option to repair the boot loader & System Reserved partition.
  8. Reboot PC and Windows should load.
  9. Check if your junction points (e.g. C:\Documents and Settings points to C:\Users) were restored properly as junction points. Mine were not. Could have been where I forgot the /xj /xjf /xjd flags the first time I ran robocopy or it could have been repair-bde. I lean towards the latter.
    • If you need to recreate your junction points, I used junction /s /q C:\ > junctionpoints.txt from SysInternals on another working install to list all of the Windows junction points.
    • Then I used mklink /j "C:\Documents and Settings" "C:\Users" to recreate the junction points on the damaged PC.
  10. Re-enable BitLocker
  11. Go to Control Panel and do Repair on Microsoft Office. This may not be necessary for you, but Outlook did not work me until I did this.

Note: After you do this restore PC, your unique machine ID will change, so some licensed software that uses this unique ID (e.g. DameWare Remote Support in my case) may need to be re-activated.

3
  • TIL about diskpart's quick flag :) I'm curious if you tried accessing the disk in another machine after re-creating your partition table though - you should not need to do repair-bde in your situation, as 1.4Mb isn't enough to get close to the actual encrypted partition. One thing to note - robocopy won't copy hardlinks so you will end up with a larger Windows folder and duplicate Windows files on the copy, which may not bode well in the long run if Windows Update updates a file and expects all copies to also be updated
    – qasdfdsaq
    Jun 18, 2015 at 12:53
  • @qasdfdsaq, yes I tried after recreating the partition table, but the partitions appeared empty. repair-bde is to recover the files. The /xj /xjf /xjd flags prevent robocopy from descending into junction points. I don't know of any hard links in Windows to check, but my restored partitions is very close to what it was before. So, the difference must negligible. In retrospect, I really should have used a different tool than robocopy to restore the files. Jun 18, 2015 at 13:21
  • Thanks for the detailed instructions -- this certainly saved my hide! I will mention that robocopy, even the updated version, had permission errors for me. I ended up using CloneZilla to copy the decrypted partition exactly (after shrinking it with PerfectDisk), but for the last few hours it's behaved as though the whole ordeal never even happened. Apr 7, 2017 at 22:58
2

If you hadn't used Bitlocker this would be fairly easy. However, with Bitlocker in the picture it is not only much harder but potentially impossible.

There are three problems you need to resolve.

1) You will have to restore a valid MBR and bootloader (or GPT+EFI bootloader if you were using that). This is fairly easy - the commands you've already done above will do this.

2) You will have to manually re-create your partition table.

3) You will have to retrieve a copy of your Bitlocker master encryption key. This is NOT the password.

Part 3 is the difficult one. However, if you have the default Windows 7 setup of a 100-300MB boot partition followed by your main OS partition, you may be in luck.

Furthermore, the process above is what you need to do if you want to restore the disk to a working state. If you are able to access the disk from a different computer, then recovering data to a second drive is a somewhat easier process than repairing it in situ.

3
  • 2
    While that's true, the question also falls under one that shouldn't be asked - "Questions with too many possible answers or require an extremely long answer". How to do it would involve several pages of explanation and whether it's worth explaining depends on which of the two procedures he wants to use. And to be fair, how to do it can be easily found on Google.
    – qasdfdsaq
    Jun 11, 2015 at 22:08
  • @qasdfdsaq, unfortunately, BitLocker is a company requirement and this is a company laptop. My personal preference is to never ever encrypt my stuff. My experience and opinion on that matter is that only ends up hurting yourself. The best security is physical security. Jun 11, 2015 at 22:25
  • The best security is physical security. ...until someone steals your laptop. Actually the best security is layers of it, that protect against all likely threats. Aug 9, 2017 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .