Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have dual boot setup with my partitions set up like so:

  • /dev/sda1 - DellUtility (FAT)
  • /dev/sda2 - RECOVERY (NTFS)
  • /dev/sda3 - OS (Windows 7 NTFS)
  • /dev/sda4 - Extended
    • /dev/sda5 - swap
    • /dev/sda6 - ext4 (Ubuntu OS)
    • /dev/sda7 - ext4 (Ubuntu home)

I used Clonezilla to clone my hard drive and clearly screwed up something since now Ubuntu's Disk Utility reports that my partitions are misaligned. I can boot and use Ubuntu with no problems but Windows refuses to boot and shows a Windows Boot Manager error screen with status code 0xc000000e: http://blogs.technet.com/blogfiles/deploymentguys/WindowsLiveWriter/Backtobasics2Brandingthedeployment_84EB/clip_image001_2.jpg

I have a Windows installation disc but I'm worried that "Repairing my computer" could affect either grub or my Ubuntu partition. What's the best way to recover?

share|improve this question

2 Answers 2

This is nothing to do with partition alignment.

Windows isn't complaining about misaligned partitions. It's complaining that it cannot find the Windows boot loader, winload. The reason that it cannot find it is that you've switched hard discs. Microsoft's Boot Manager locates winload, and other so-called boot applications, by a combination of a hard disc ID, partition ID, and pathname within the partition. It's looking for winload on a hard disc and partition combination that is no longer present on your system.

Presuming that your copy is otherwise — apart from the IDs — identical to the original: one workaround for this is, as Alan Adams found, to alter the BCD database entry for the Windows Boot Loader — which is where Microsoft's Boot Manager stores all of this information — to not use specific partition IDs but to use the generic "boot" identifier, using the bcdedit tool from the recovery command line:

BCDEDIT /set {bootmgr} device boot
BCDEDIT /set {default} device boot
BCDEDIT /set {default} osdevice boot

This sets the device and osdevice fields of the {bootmgr} (Microsoft's Boot Manager itself) and {default} (default selection — usually the Windows Boot Loader) entries in the database to "boot". As M. Adams said, one will have to adjust {memdiag} and other entries if they exist and one wants to use them. Multibooters has a whole article on this.

share|improve this answer
    
Sorry, your answer made me realize I'm not having the "winload" issue. I've updated the image with a new one that matches what I'm actually seeing on my computer. –  Patrick Marchwiak Oct 30 '11 at 0:57
up vote 1 down vote accepted

I followed the instructions on the error screen. That is, I inserted my OS disk then ran "Repair your computer". It worked like a charm. I can boot Windows and Ubuntu with no issues.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.