{"id":1223,"date":"2013-09-19T21:23:11","date_gmt":"2013-09-19T19:23:11","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=1223"},"modified":"2013-09-19T21:29:24","modified_gmt":"2013-09-19T19:29:24","slug":"windows-writing-a-new-mbr-an-a-usb-drive-to-boot-windows-pe","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-writing-a-new-mbr-an-a-usb-drive-to-boot-windows-pe\/","title":{"rendered":"Windows: Writing a new MBR an a USB Drive to boot Windows PE"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_1223 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_1223')){$('.twoclick_social_bookmarks_post_1223').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Writing%20a%20new%20MBR%20an%20a%20USB%20Drive%20to%20boot%20Windows%20PE\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Abooting%20operating%20systems%2C%20such%20as%C2%A0linux%20live%20systems%20or%20Windows%20PE%20based%20installations%20%28Windows%20Vista%2C7%2C8%29%2C%C2%A0%20from%20a%20USB%20Drive%20or%20Stick%20is%20a%20nice%20featured.%0D%0A%0D%0AUnfortunately%20each%20writes%20it%20own%20boot%20code%20to%20the%20MBR%20%28Master%20boot%20record%29.%20The%20boot%20code%20of%20Windows%20PE%202%20and%20later%C2%A0%20loads%20%5CBOOTMGR%2C%20linux%20is%20usually%20loaded%20with%20%5Csyslinux.%0D%0A%0D%0AWell%20known%20linux%20installers%20like%20TUXBOOT%2C%20the%20Universa%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-writing-a-new-mbr-an-a-usb-drive-to-boot-windows-pe\\\/\",\"post_id\":1223,\"post_title_referrer_track\":\"Windows%3A+Writing+a+new+MBR+an+a+USB+Drive+to+boot+Windows+PE\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>booting operating systems, such as\u00a0linux live systems or Windows PE based installations (Windows Vista,7,8),\u00a0 from a USB Drive or Stick is a nice featured.<\/p>\n<p>Unfortunately each writes it own boot code to the MBR (Master boot record). The boot code of Windows PE 2 and later\u00a0 loads \\BOOTMGR, linux is usually loaded with \\syslinux.<\/p>\n<p>Well known linux installers like TUXBOOT, the Universal-USB-Installer or\u00a0UNetBootin do updating the MBR by installing the syslinux bootloader.<\/p>\n<p>To get the\u00a0 Windows PE MBR back without formating the stick, do the following steps.<br \/>\n<!--more--><\/p>\n<ul>\n<li>Look up for a Windows 7 DVD and insert it in your DVD drive. In my example D:<\/li>\n<li>Copy the \\boot folder of the DVD to a local temporary directory:<br \/>\n<code>robocopy\u00a0 \/S D:\\boot %TEMP%<\/code><\/li>\n<li>open a command prompt in Administrator mode<\/li>\n<li>Change to the directory:<br \/>\n<code>cd \/d %TEMP%\\boot<\/code><\/li>\n<\/ul>\n<p>Connect your USB device. On my PC\u00a0 Drive letter E: is assigned. To restore a Windows PE2 (or later) based MBR execute<\/p>\n<p><code>bootsect.exe \/nt60 e:<\/code><\/p>\n<pre><code>\r\nTarget volumes will be updated with BOOTMGR compatible bootcode.\r\n\r\nE: (\\\\?\\Volume{7120ac9a-191c-11e3-b648-003067a44706})\r\n\r\n    Successfully updated FAT32 filesystem bootcode.\r\n\r\nBootcode was successfully updated on all targeted volumes.\r\n<\/code><\/pre>\n<p>Now the Drive is prepared. If you want to install an Windows from this drive it is also neccessary that the partition with the installations sources\u00a0 is set to active. See this example. The USB Drive is disk 1 with 7650MB.<\/p>\n<pre><code>\r\nDISKPART&gt; list disk\r\n\r\n  Disk ###  Status         Size     Free     Dyn  Gpt\r\n  --------  -------------  -------  -------  ---  ---\r\n* Disk 0    Online          698 GB      0 B\r\n  Disk 1    Online         7650 MB      0 B\r\n\r\nDISKPART&gt; select disk 1\r\n\r\nDisk 1 is now the selected disk.\r\n\r\nDISKPART&gt; list partition\r\n\r\n  Partition ###  Type              Size     Offset\r\n  -------------  ----------------  -------  -------\r\n  Partition 1    Primary           7646 MB  3180 KB\r\n\r\nDISKPART&gt; select partition 1\r\n\r\nThere is no disk selected to set the partition.\r\nSelect a disk and try again.\r\n\r\nDISKPART&gt; select disk 2\r\n\r\nDisk 2 is now the selected disk.\r\n\r\nDISKPART&gt; list partition\r\n\r\n  Partition ###  Type              Size     Offset\r\n  -------------  ----------------  -------  -------\r\n  Partition 1    Primary           7646 MB  3180 KB\r\n\r\nDISKPART&gt; select partition 1\r\n\r\nPartition 1 is now the selected partition.\r\n\r\nDISKPART&gt; list partition\r\n\r\n  Partition ###  Type              Size     Offset\r\n  -------------  ----------------  -------  -------\r\n  Partition 1    Primary           7646 MB  3180 KB\r\n\r\nDISKPART&gt; active\r\n\r\nDiskPart marked the current partition as active.\r\n\r\nDISKPART&gt; list partition\r\n\r\n  Partition ###  Type              Size     Offset\r\n  -------------  ----------------  -------  -------\r\n* Partition 1    Primary           7646 MB  3180 KB\r\n<\/code><\/pre>\n<p>Now copy the whole content of the Windows 7 DVD to the root of the USB Drive, adjust your BIOS to boot from it\u00a0 and\u00a0 the windows installation environment should coming up.<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, booting operating systems, such as\u00a0linux live systems or Windows PE based installations (Windows Vista,7,8),\u00a0 from a USB Drive or Stick is a nice featured. Unfortunately each writes it own boot code to the MBR (Master boot record). The boot code of Windows PE 2 and later\u00a0 loads \\BOOTMGR, linux is usually loaded with \\syslinux. &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/windows-writing-a-new-mbr-an-a-usb-drive-to-boot-windows-pe\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Windows: Writing a new MBR an a USB Drive to boot Windows PE<\/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":[306,305,304,301,302,300,303],"class_list":["post-1223","post","type-post","status-publish","format-standard","hentry","category-windowsknowhow","tag-bootmgr","tag-bootrec","tag-rewrite-mbr","tag-usb-drive","tag-usb-stick","tag-windows-pe","tag-write-mbr"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1223","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=1223"}],"version-history":[{"count":14,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1223\/revisions"}],"predecessor-version":[{"id":1237,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/1223\/revisions\/1237"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=1223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=1223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=1223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}