{"id":759,"date":"2012-12-04T11:39:54","date_gmt":"2012-12-04T09:39:54","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=759"},"modified":"2021-05-08T22:58:25","modified_gmt":"2021-05-08T20:58:25","slug":"hyper-v-error-loading-operating-system-after-running-disk2vhd","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html","title":{"rendered":"Hyper-v &#8220;error loading operating system&#8221; after running disk2vhd"},"content":{"rendered":"\n<p>Converting a physical Windows 2003 Server to a <a href=\"\/en\/tag\/hyper-v-2\">Hyper-v<\/a> virtual machine with <a href=\"https:\/\/docs.microsoft.com\/en-us\/sysinternals\/downloads\/disk2vhd\">disk2vhd<\/a> tool may throw the following generic error on a black screen on boot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">Error loading operating system<\/code><\/pre>\n\n\n\n<p>\u00a0<br>Needless to say Windows is not even starting.<br>I tried to repair Windows with a 2003 server image, fixmbr, fixboot, and they all failed.<br>The Master Boot Record needs to be fixed. The only tool around that does seem to work is <a href=\"http:\/\/www.cgsecurity.org\/wiki\/TestDisk\">TestDisk<\/a>.<br>\u00a0<br>Now, download TestDisk on above link and unzip on your Hyper-v host.<br>Attach the virtual disk under Disk Management in Computer Manager.<br>Then run testdisk_win.exe from the command line.<br>Choose if you&#8217;d like to get logs enable<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\"> [ Create ]\n [ Append ]\n&gt;[ No Log ]<\/code><\/pre>\n\n\n\n<p>\u00a0<br>Select the disk matching the virtual disk, the description should be Msft Virtual Disk<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">Select a media (use Arrow keys, then press Enter):\n Disk \/dev\/sda - 320GB \/ 298 GiB - ST320LT007-9ZV142\n&gt;Disk \/dev\/sdb - 73GB \/ 68 GiB - Msft Virtual Disk\n Drive E: - 623 MB \/ 594 MiB\n\n&gt;[PROCEED ]  [  QUIT  ]<\/code><\/pre>\n\n\n\n<p>\u00a0<br>Select default Intel\/PC partition type<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">Disk \/dev\/sdb - 73GB \/ 68 GiB - Msft Virtual Disk\n\nPlease select the partition table type, press Enter when done.\n>[Intel  ] Intel\/PC partition\n [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)\n [Humax  ] Humax partition table\n [Mac    ] Apple partition map\n [None   ] Non partitionned media\n [Sun    ] Sun Solaris partition\n [XBox   ] XBox partition\n [Return ] Return the disk selection\n\nHint: Intel partition table type has been detected.\nNote: Do NOT select 'None' for media with only a single partition. It's very\nrare for a drive to be 'Non-partitionned'.<\/code><\/pre>\n\n\n\n<p>\u00a0<br>And MBR Code in the list of actions <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">Disk \/dev\/sdb - 73GB \/ 68 GiB - Msft Virtual Disk\n     CHS 8920 255 62 - sector size=512\n\n [ Analyse  ] Analyse current partition structure and search for the lost partitions\n [ Advanced ] Filesystem Utils\n [ Geometry ] Change disk geometry\n [ Options  ] Modify options\n&gt;[MBR Code  ] Write TestDisk MBR code to first sector\n [ Delete   ] Delete all data in the partition table\n [ Quit     ] Return to disk selection<\/code><\/pre>\n\n\n\n<p>\u00a0<br>Proceed with Y to override the first sector<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">Disk \/dev\/sdb - 73 GB \/ 68 GiB - CHS 8920 255 63\n\nWrite a new copy of MBR code to first sector? (Y\/N)<\/code><\/pre>\n\n\n\n<p>\u00a0<br>Confirm<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">Write a new copy of MBR code, confirm ? (Y\/N)<\/code><\/pre>\n\n\n\n<p>&nbsp;<br>Then quit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">A new copy of MBR code has been written.\nYou have to reboot for the change to take effect.\n\n&gt;[OK]<\/code><\/pre>\n\n\n\n<p>\u00a0<br>You may also need to rebuild the NTFS boot sector in the same way as described above. Instructions can be found at xtralogic.<br>Unfortunately the link is broken, so here is a quick set of instructions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">&gt;[ No Log   ]\n&gt;Disk \/dev\/sdb - 73GB \/ 68 GiB - Msft Virtual Disk\n&gt;[Intel     ] Intel\/PC partition\n&gt;[ Advanced ] Filesystem Utils\n&gt;1 * HPFS - NTFS [...]\n&gt;[Rebuild BS]\n&gt;[ Write    ]\n&gt;[ Confirm  ]\n&gt;[ Quit     ]<\/code><\/pre>\n\n\n\n<p>\u00a0<br>The virtual machine should boot ok from now on. Don&#8217;t forget to detach the Vdisk before booting the virtual machine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Converting a physical Windows 2003 Server to a Hyper-v virtual machine with disk2vhd tool may throw the following generic error on a black screen on boot: \u00a0Needless to say Windows is not even starting.I tried to repair Windows with a 2003 server image, fixmbr, fixboot, and they all failed.The Master Boot Record needs to be [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[346,70],"tags":[347,348,290,391],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Hyper-v &quot;error loading operating system&quot; after running disk2vhd<\/title>\n<meta name=\"description\" content=\"You converted a Windows 2003 Server to a Hyper-v virtual machine with disk2vhd and get &quot;Error loading operating system&quot; message at boot\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Hyper-v &quot;error loading operating system&quot; after running disk2vhd\" \/>\n<meta property=\"og:description\" content=\"You converted a Windows 2003 Server to a Hyper-v virtual machine with disk2vhd and get &quot;Error loading operating system&quot; message at boot\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2012-12-04T09:39:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-08T20:58:25+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html\",\"name\":\"Netexpertise - Hyper-v \\\"error loading operating system\\\" after running disk2vhd\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2012-12-04T09:39:54+00:00\",\"dateModified\":\"2021-05-08T20:58:25+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"You converted a Windows 2003 Server to a Hyper-v virtual machine with disk2vhd and get \\\"Error loading operating system\\\" message at boot\",\"breadcrumb\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hyper-v &#8220;error loading operating system&#8221; after running disk2vhd\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Hyper-v \"error loading operating system\" after running disk2vhd","description":"You converted a Windows 2003 Server to a Hyper-v virtual machine with disk2vhd and get \"Error loading operating system\" message at boot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Hyper-v \"error loading operating system\" after running disk2vhd","og_description":"You converted a Windows 2003 Server to a Hyper-v virtual machine with disk2vhd and get \"Error loading operating system\" message at boot","og_url":"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html","og_site_name":"Netexpertise","article_published_time":"2012-12-04T09:39:54+00:00","article_modified_time":"2021-05-08T20:58:25+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html","url":"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html","name":"Netexpertise - Hyper-v \"error loading operating system\" after running disk2vhd","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2012-12-04T09:39:54+00:00","dateModified":"2021-05-08T20:58:25+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"You converted a Windows 2003 Server to a Hyper-v virtual machine with disk2vhd and get \"Error loading operating system\" message at boot","breadcrumb":{"@id":"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.netexpertise.eu\/en\/systems\/windows\/hyper-v-error-loading-operating-system-after-running-disk2vhd.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Hyper-v &#8220;error loading operating system&#8221; after running disk2vhd"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/759"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=759"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/759\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=759"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}