{"id":854,"date":"2013-07-03T21:52:02","date_gmt":"2013-07-03T19:52:02","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=854"},"modified":"2013-07-09T21:47:04","modified_gmt":"2013-07-09T19:47:04","slug":"windows-windows-did-not-start-howto-write-a-new-mbr-and-recover-windows-os-bootsector","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-windows-did-not-start-howto-write-a-new-mbr-and-recover-windows-os-bootsector\/","title":{"rendered":"Windows: Windows did not start. Howto write a new MBR and recover Windows OS Bootsector"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_854 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_854')){$('.twoclick_social_bookmarks_post_854').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Windows%20did%20not%20start.%20Howto%20write%20a%20new%20MBR%20and%20recover%20Windows%20OS%20Bootsector\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Aif%20you%20migrate%20a%20Windows%20Installation%20to%20another%20Computer%20or%20virtual%20environment%20such%20as%20VMWare%20ESXi%20or%20VMWare%20Workstation%20it%20could%20happen%20that%20the%20system%20won%27t%20start.%0D%0A%0D%0AA%20typical%20error%20when%20the%20master%20boot%20record%20or%20the%20boot%20sector%20of%20the%20boot%20partition%20needs%20to%20be%20updated%20or%20must%20be%20rewritten%20is%20when%0D%0A%0D%0A%09After%20Postscreen%20of%20the%20BIOS%20the%20console%20shows%20%22Operating%20system%20not%20found%22%20this%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-windows-did-not-start-howto-write-a-new-mbr-and-recover-windows-os-bootsector\\\/\",\"post_id\":854,\"post_title_referrer_track\":\"Windows%3A+Windows+did+not+start.+Howto+write+a+new+MBR+and+recover+Windows+OS+Bootsector\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>if you migrate a Windows Installation to another Computer or virtual environment such as VMWare ESXi or VMWare Workstation it could happen that the system won&#8217;t start.<\/p>\n<p>A typical error when the master boot record or the boot sector of the boot partition needs to be updated or must be rewritten is when<\/p>\n<ul>\n<li>After Postscreen of the BIOS the console shows &#8220;Operating system not found&#8221; this means there is no boot code in MBR<\/li>\n<li>or it shows only a blinking cursor in the upper left edge. 2 possible reasons are thinkable<\/li>\n<\/ul>\n<ol>\n<li>MBR boot code is loaded but could not load the operation system =&gt; The boot sector of the Windows Boot partition needs to be updated<\/li>\n<li>The boot(active) flag of Windows boot partition\u00a0 is missing<\/li>\n<\/ol>\n<p>For all cases you can use the command line program &#8220;testdisk&#8221; which is part of the most linux live CDs\/DVDs to correct this.<br \/>\n<!--more--><br \/>\nStart repairing by booting a linux live CD. I prefered <a title=\"KNOPPIX Linux Live CD\" href=\"http:\/\/www.knoppix.org\/\" target=\"_blank\">KNOPPIX<\/a>, but there are many other (<a title=\"SystemRescueCD\" href=\"http:\/\/www.sysresccd.org\" target=\"_blank\">Systemrescuecd,&#8230;.)<\/a> . After the system is up jump to the text console(this is recommended) by pressing Alt-Ctrl-F1. Check if you are root by execute the id command<br \/>\n<code><br \/>\nroot@MicroKnoppix # id<br \/>\nuid=0(root) gid=0(root) groups=0(root)<\/code><\/p>\n<p>otherwise start a root shell(in graphical environment):<\/p>\n<p><code>root@MicroKnoppix # sudo su<\/code><\/p>\n<p>Check if the boot partition has the active flag. An asterisk should be in the boot column of boot partition:<\/p>\n<p><code>fdisk -l<\/code><\/p>\n<p><code>Disk \/dev\/sda: 10.7 GB, 10737418240 bytes<br \/>\n255 heads, 63 sectors\/track, 1305 cylinders, total 20971520 sectors<br \/>\nUnits = sectors of 1 * 512 = 512 bytes<br \/>\nSector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>\nDisk identifier: 0x000e922c<\/code><\/p>\n<p><code>Device Boot\u00a0\u00a0\u00a0\u00a0\u00a0Start\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 End\u00a0\u00a0\u00a0\u00a0Blocks\u00a0\u00a0 Id\u00a0 System<br \/>\n\/dev\/sda1\u00a0\u00a0\u00a0 * \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2048\u00a0\u00a0\u00a0\u00a0 20971519\u00a0\u00a0\u00a0 20969471 7 HPFS\/NTFS\/exFAT<\/code><\/p>\n<p>If not, set the active flag with fdisk. Start fdisk with the disk (usually \/dev\/sda) as parameter. In the fdisk command mode, &#8220;p&#8221; shows the current disk layout, &#8220;a&#8221; sets the boot flag and &#8220;w&#8221; write the changes to disk:<\/p>\n<p><code>fdisk \/dev\/sda<br \/>\nWelcome to fdisk (util-linux 2.21.2).<\/code><\/p>\n<p><code>Command (m for help): p<\/code><\/p>\n<p><code>Disk \/dev\/sda: 10.7 GB, 10737418240 bytes<br \/>\n255 heads, 63 sectors\/track, 1305 cylinders, total 20971520 sectors<br \/>\nUnits = sectors of 1 * 512 = 512 bytes<br \/>\nSector size (logical\/physical): 512 bytes \/ 512 bytes<br \/>\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes<br \/>\nDisk identifier: 0x000e922c<\/code><\/p>\n<p><code>Device Boot\u00a0\u00a0\u00a0\u00a0\u00a0 Start\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 End\u00a0\u00a0\u00a0\u00a0\u00a0 Blocks\u00a0\u00a0 Id\u00a0 System<br \/>\n\/dev\/sda1 \u00a0 2048 20971519 20969471 7 HPFS\/NTFS\/exFAT<\/code><br \/>\n<code><br \/>\nCommand (m for help): a<br \/>\nPartition number (1-4): 1<\/code><\/p>\n<p><code> Command (m for help): p<br \/>\n<\/code><\/p>\n<p><code>\/dev\/sda1 * 2048 20971519 20969471 7 HPFS\/NTFS\/exFAT<\/code><\/p>\n<p><code> Command (m for help): w<br \/>\n<\/code><\/p>\n<p>To write a new MBR start <code>testdisk<\/code>, select the <code>\"No log\"<\/code> option and select your Disk where Windows is installed. This should be the first item in the list. Now select the partition type, for Windows installations prior to Windows 8 this should be a <code>\"Intel\/PC partition\"<\/code>. To write a new MBR select:<\/p>\n<p><code>[ MBR Code ] Write TestDisk MBR code to first sector<\/code><\/p>\n<p>If the system still won&#8217;t boot (cursor is blinking), repair the boot sector of the boot partition.<\/p>\n<p>Start <code>testdisk<\/code> again, select the <code>\"No log\"<\/code> option and select your Disk where Windows is installed. Do the same steps as above. Choose<\/p>\n<p><code>[ Advanced ] Filesystem Utils<\/code><\/p>\n<p>Select the boot partition and choose<\/p>\n<p><code>[boot] Boot sector Recover<\/code><\/p>\n<p><code> <\/code> following by option<br \/>\n<code>[Rebuild BS] Rebuild boot sector<\/code><\/p>\n<p>and write the new sector to disk.<\/p>\n<p>You can also use a Windows PE environent for repairing.\u00a0 Use the following commands:<\/p>\n<p>Write a new mbr:<code> bootrec \/fixmbr<\/code><\/p>\n<p>Rewrite the bootsector of the boot partition: <code>bootrec \/fixboot<\/code><\/p>\n<p>Set the active flag on the boot partition. Let us assume, as above,\u00a0 the boot partition is the first partition on disk 0.\u00a0 Use diskpart<\/p>\n<p><code>Microsoft DiskPart version 6.1.7601<br \/>\nCopyright (C) 1999-2008 Microsoft Corporation.<br \/>\nOn computer: S281308<\/code><\/p>\n<p><code>DISKPART&gt; select disk 0<\/code><\/p>\n<p><code>Disk 0 is now the selected disk.<\/code><\/p>\n<p><code>DISKPART&gt; select partition 1<\/code><\/p>\n<p><code>Partition 1 is now the selected partition.<\/code><\/p>\n<p><code>DISKPART&gt; active<\/code><\/p>\n<p><code>DiskPart marked the current partition as active.<\/code><\/p>\n<p>However, in a very special setup, 2 disks in the system, windows was installaed\u00a0 at the second disk, the Windows PE way did not work for me. Testdisk did the job:-)<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, if you migrate a Windows Installation to another Computer or virtual environment such as VMWare ESXi or VMWare Workstation it could happen that the system won&#8217;t start. A typical error when the master boot record or the boot sector of the boot partition needs to be updated or must be rewritten is when After &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/windows-windows-did-not-start-howto-write-a-new-mbr-and-recover-windows-os-bootsector\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Windows: Windows did not start. Howto write a new MBR and recover Windows OS Bootsector<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[227,226,228,236,223,224,222,221,225,20],"class_list":["post-854","post","type-post","status-publish","format-standard","hentry","category-windowsknowhow","tag-boot","tag-bootsector","tag-failed","tag-fixboot","tag-fixmbr","tag-linux-2","tag-mbr","tag-recover","tag-testdisk","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=854"}],"version-history":[{"count":32,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/854\/revisions"}],"predecessor-version":[{"id":947,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/854\/revisions\/947"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}