oops.

GParted: Windows 8 Boot Camp Partition “Missing Operating System”

Problem

After using GParted to resize an NTFS bootcamp partition, Windows 8 fails to boot with “Missing Operating System”.

Discussion

There are commercial utilities for resizing a bootcamp partition like Camptune or WinClone, but they are unnecessary.  Disk Utility will shrink the OS X partition to make space.  Booting to a Linux USB Drive with GParted can then expand the NTFS partition, and Windows’ bcdboot can fix the resulting error.

Solution

Boot to a Windows 8 USB drive and get to a command prompt.  Then use diskpart to set the NTFS partition to Active, and run bcdboot to repair the boot files.

Example steps:

At the prompt, run diskpart, set the partition to Active, and run bcdboot with your Windows directory as a parameter.  Here is a sample command sequence:

diskpart
select disk 0
list part
select part 4
active
exit

bcdboot d:\windows

The results will look something like this:

Set the GParted Windows 8 partition to Active.

Use disk part, then bcdboot.

And finally, type exit to restart…

This got rid of the “Missing Operating System” error and allowed Windows to boot.

Optional

As a result of the bcdboot command, there was an annoying extra entry in my list of boot loaders:

One too many Windows

One too many Windows

So, I removed the extra entry using bcdedit.  First, find the GUID entry you want to delete (hint:  it’s the one not labeled current).  Then, delete that entry:

Remove the extra entry with BCDEdit

Remove the extra entry with BCDEdit

bcdedit /delete {your-GUID-here}

Now the machine will boot straight into Windows just as it did before, but with a handily resized partition.  No extra commercial software required.  This process can also be used in reverse, i.e. boot to Linux, use GParted to shrink the NTFS partition, repair with bcdboot, then use Disk Utility to enlarge the OS X partition.

10 thoughts on “GParted: Windows 8 Boot Camp Partition “Missing Operating System””

  1. I have a problem . When I write “list part” it shows me only 3 partitions!!! So I tried all the three And each Time it doesn’t work

  2. this worked perfectly. I was so scared when i first saw the text, “Missing Operating System”.
    Cheers

  3. Thanks! That provided the one hint I needed to sort out a similar issue with a Windows 7 Boot Camp installation.

  4. I followed these steps, slightly modifying to my computer’s set up. But I came across an error when trying to use the bcdboot command, saying “Failure when attempting to copy boot files.” Also instead of being on the D:\ drive after using diskpart, my computer remains at X:\Sources, I don’t know if this is making it not work or not. Does anyone have any ideas?

  5. @Drake — yeah, the drive letters can be confusing. X: is the Windows repair environment and not where you want to run bcdboot. In this example, D: was the USB drive containing a clean copy of Windows where I needed to run bcdboot. Using “list volumes” in diskpart will show you which drive is which.

Comment