{"id":469,"date":"2017-04-02T14:33:09","date_gmt":"2017-04-02T19:33:09","guid":{"rendered":"http:\/\/triplescomputers.com\/blog\/?p=469"},"modified":"2017-04-17T11:37:39","modified_gmt":"2017-04-17T16:37:39","slug":"repair-a-corrupted-efiuefi-boot-sector-and-bcd","status":"publish","type":"post","link":"https:\/\/www.triplescomputers.com\/blog\/casestudies\/repair-a-corrupted-efiuefi-boot-sector-and-bcd\/","title":{"rendered":"SOLUTION: &#8220;The requested system device cannot be found&#8221; on UEFI systems"},"content":{"rendered":"<p>With GPT disks and UEFI all the rage now, it&#8217;s not uncommon to encounter a scenario where boot parameters need to be repaired in order to reach the operating system. \u00a0Generally speaking, it&#8217;s often easy enough to accomplish this by executing the command\u00a0<strong>bcdboot X:\\windows\u00a0<\/strong>(where X is the system drive letter) from a recovery environment.<\/p>\n<p>However, other times,\u00a0even in spite of this command properly completing, the\u00a0system still will not boot. \u00a0In many cases the failure is evident when attempting to perform\u00a0<strong>bcdedit \/enum\u00a0<\/strong>and receiving a message\u00a0such as this one:<\/p>\n<blockquote><p>The boot configuration data store can not be opened.<br \/>\nThe requested system device cannot be found.<\/p><\/blockquote>\n<p>Performing\u00a0<strong>bootrec \/fixboot\u00a0<\/strong>also provokes the following error:<\/p>\n<blockquote><p>Element not found<\/p><\/blockquote>\n<p>This is bad news on a GPT disk using UEFI rather than BIOS. \u00a0Essentially, the system is looking for the EFI partition, which in this case is either missing or corrupt.<\/p>\n<p>If it&#8217;s corrupt but still exists, you can simply enter\u00a0<strong>diskpart<\/strong>, select the system partition (usually around 500 MB in size and with an ID of &#8220;EFI&#8221;) and assign it a letter, exit diskpart, and then perform a\u00a0<strong>chkdsk\u00a0<\/strong>command on the new partition assignment. \u00a0This sometimes will correct it. \u00a0Other times, forcibly removing the <strong>EFI<\/strong> and <strong>boot<\/strong> folders from the EFI partition and then executing the bcdboot command with a specific system partition parameter (e.g.:\u00a0<strong>bcdboot X:\\windows \/s E:<\/strong>, where X: is the Windows partition and E: is the EFI paritition) works.<\/p>\n<p>But let&#8217;s say the partition is missing altogether. \u00a0This is most often the case following a drive image using imaging tools to a new SSD for example. \u00a0Sometimes the tools (especially if executed externally on another system rather\u00a0than live within the target OS) will remove the EFI partition and\u00a0<em>only\u00a0<\/em>image the Windows partition.<\/p>\n<p>If this happens, most people will tell you that you will need to reinstall Windows from scratch. \u00a0However, all is not yet lost! \u00a0It&#8217;s fixable &#8212; but in order to accomplish it, you must\u00a0<em>recreate\u00a0<\/em>the EFI partition manually and then reload the boot parameters from there.<\/p>\n<p>Here&#8217;s how it&#8217;s done at a command prompt from a recovery environment. \u00a0I&#8217;ve bolded the commands I typed to make it easier to read &#8212; hold on tight:<\/p>\n<p>X:\\windows\\system32&gt;<strong>diskpart<\/strong><\/p>\n<p>Microsoft DiskPart version 10.0.10240<\/p>\n<p>Copyright (C) 1999-2013 Microsoft Corporation.<br \/>\nOn computer: MININT-3A416N9<\/p>\n<p>DISKPART&gt; <strong>list disk<\/strong><\/p>\n<p>Disk ### Status Size Free Dyn Gpt<br \/>\n&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;- &#8212; &#8212;<br \/>\nDisk 0 Online 489 GB 0 B *<\/p>\n<p>DISKPART&gt; <strong>sel disk 0<\/strong><\/p>\n<p>Disk 0 is now the selected disk.<\/p>\n<p>DISKPART&gt; <strong>list part<\/strong><\/p>\n<p>Partition ### Type Size Offset<br \/>\n&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;-<br \/>\nPartition 1 Primary 489 GB 1024 KB<\/p>\n<p>DISKPART&gt; <strong>sel part 1<\/strong><\/p>\n<p>Partition 1 is now the selected partition.<\/p>\n<p>DISKPART&gt; <strong>shrink desired=1024<\/strong><\/p>\n<p>DiskPart successfully shrunk the volume by: 1024 MB<\/p>\n<p>DISKPART&gt; <strong>create partition efi size=260<\/strong><\/p>\n<p>DiskPart succeeded in creating the specified partition.<\/p>\n<p>DISKPART&gt; <strong>format quick fs=fat32<\/strong><\/p>\n<p>100 percent completed<\/p>\n<p>DiskPart successfully formatted the volume.<\/p>\n<p>DISKPART&gt; <strong>exit<\/strong><\/p>\n<p>Leaving DiskPart&#8230;<\/p>\n<p>X:\\windows\\system32&gt;<strong>bcdboot c:\\windows<\/strong><br \/>\nBoot files successfully created.<\/p>\n<hr \/>\n<p>Following these steps, the machine should now be bootable. \u00a0If it&#8217;s not,\u00a0it&#8217;s probably time to call a professional!<\/p>\n<p>Good luck!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With GPT disks and UEFI all the rage now, it&#8217;s not uncommon to encounter a scenario where boot parameters need to be repaired in order to reach the operating system. \u00a0Generally speaking, it&#8217;s often easy enough to accomplish this by &hellip; <a href=\"https:\/\/www.triplescomputers.com\/blog\/casestudies\/repair-a-corrupted-efiuefi-boot-sector-and-bcd\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,135],"tags":[64,212,210,9,211,213],"class_list":["post-469","post","type-post","status-publish","format-standard","hentry","category-casestudies","category-recovery","tag-bcd","tag-bcdboot","tag-boot-configuration-data","tag-boot-problems","tag-bootrec","tag-winre"],"_links":{"self":[{"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/posts\/469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/comments?post=469"}],"version-history":[{"count":0,"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/posts\/469\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/media?parent=469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/categories?post=469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.triplescomputers.com\/blog\/wp-json\/wp\/v2\/tags?post=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}