Windows BSOD ‘Inaccessible boot device’ on Bootcamp/Macbook

bootboot-campbsodpartitioning

thank you for reading my post!

I am running Windows 8.1 in Bootcamp on my Macbook. For over a year I didn't have any trouble with it. Yesterday, the Windows partition failed to boot and I get a blue screen error since. It says 'Inaccessible boot device'.

First, I tried to start in safe mode, but still got the blue screen. I was looking for a solution online and came across some posts where people had similar problems.

They recommended to run the following commands in terminal:
bootrec /rebuildbcd
bootrec /fixboot
chkdsk C: /f /r /x

But none of them helped to boot the Windows partition.

In OS X, the Windows partition is still showing up using Disk Utility as well as in the Finder.

However, the Bootcamp partition is listed under Devices and I cannot access any files/folder as they seem to be empty.

http://i.stack.imgur.com/BV6fK.png

Any ideas how to fix this? Would highly appreciate any help!


Update:
I mounted the Windows EFI boot loader files and it looks like I did perform an EFI mode installation of Windows.
bootmgfw.efi is located in Windows/Boot/ as well as boot.stl, bootmgr.efi, memtest.efi and BCD and some language specific folders.
As far as I remember, I installed it as follows: I created two partitions using Boot Camp Assistent on the Mac and created a Windows installation USB drive from a Windows 8 ISO file.
However, when installing Windows, it wanted me to partition the Bootcamp partition and that's how I got these two other partitions. I'll attach a screenshot of Disk Utility on the bottom.

I still don't get what went wrong! After closing the Macbook (when using Windows) and trying to re-open it a few minutes later, I couldn't get Windows to wake-up, so I had to long-pres the power button. Ever since, I get the blue screen error.

Disk Utility

Best Answer

Did you do any software installation, filesystem maintenance, or partition adjustments just prior to the problem occurring? It could be that your installation relies on a hybrid MBR (as do all Boot Camp installations), and that your hybrid MBR has become damaged or replaced with a standard GPT protective MBR. If so, the solution is to re-build the correct hybrid MBR -- but there are risks to doing this if you've adjusted your partitions recently. In particular, if you've used Windows tools to resize partitions, your GPT and MBR data will be dangerously out of sync, and recovering a consistent and correct set of partitions will require careful attention to detail. If the hybrid MBR has been replaced with a protective MBR or damaged in a less dangerous way, re-creating it with gdisk, gptsync, or some other tool should be relatively straightforward.

You can check the current state of the disk with gdisk:

$ sudo gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.0

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help):

This example shows a GPT disk (GPT: present) with a standard protective MBR (MBR: protective). A hybrid MBR disk will show MBR: hybrid. You can type p to show the (GPT) partitions, which you can review as a sanity check. Then, use v to check for GPT/MBR consistency (and other partition table problems):

Command (? for help): v

No problems found. 990 free sectors (495.0 KiB) available in 1
segments, the largest of which is 990 (495.0 KiB) in size.

Your details will differ, of course. If you uncover problems, edit your question to include the details and add a comment to my answer so I notice your reply.

A caveat: Some people install Windows 8 and later on Macs in EFI mode rather than using Boot Camp. You specified the latter, but if that detail was in error, you definitely do not want to add a hybrid MBR to your disk, since it will make matters worse.


EDIT:

You could have pasted your output into your original question by editing it. Adding four spaces to the start of each line will preserve formatting, helping legibility.

Before you try to adjust your hybrid MBR, I recommend looking for Windows EFI boot files. It could be that you've unknowingly installed Windows in EFI mode, in which case adjusting your hybrid MBR will be a waste of time that you'll have to undo later. You can check for Windows EFI boot files by mounting your ESP in OS X:

mkdir /Volumes/ESP
sudo mount -t msdos /dev/disk0s1 /Volumes/ESP

The Windows EFI boot loader files will normally be in /Volumes/ESP/EFI/Microsoft/Boot, given the /Volumes/ESP mount point I specified. If you find files there (bootmgfw.efi is the main file, but there are a number of support files), don't try adjusting your hybrid MBR; instead, investigate possible EFI boot troubles for Windows on Macs.

In fact, your partition list makes me suspicious that you did perform an EFI-mode installation of Windows, although I'm not 100% positive of that.

If you don't see any Windows boot files on your ESP, you can create a hybrid MBR by following the instructions on the gdisk hybrid MBR page. You'll need to decide which partitions to include in the hybrid MBR. Your Windows boot partition is the most critical (your partition #5), but it looks like you've got two other Microsoft partitions (#4 and #6).

Related Question