Home > Deployment, Windows > Adding additional boot options to your deployment USB key

Adding additional boot options to your deployment USB key

Having a USB key that will install multiple versions of Windows is great, but what if you want to add other Windows PE images to it, above and beyond the installers?  For example, what if you wanted to add a recovery environment, like the Microsoft Diagnostics and Recovery Toolset (DaRT), or a BartPE environment, or any other Windows PE-based environments?  Well, it’s not that hard to do, and I’ll document how to do it with the Microsoft DaRT x86 and x64 recovery ISOs that it creates in this example.

Adding the DaRT files

First, you will need to copy the files from the MS DaRT WinPE ISO image to your “Content” folder that was created when you used MDT 2010 as per my previous post.  The content folder should look something like this:

000

And the contents of the MS DaRT ISO image, once extracted to the hard disk, will look something like this:

001

You will need to go through this folder structure (boot, EFI, and sources) and copy to your “Content” folder anything from the MS DaRT contents that does not already exist as a file or folder in your “Content” folder.  For example, the MS DaRT media is on the left, and the “Content” media is on the right:
002 

And the “Content” folder looks like this afterwards:
003

The same with the EFI and sources folders from the MS DaRT media:004

And the “Content” folder looks like this afterwards:
005 

Since most WinPE distributions use a “boot.wim” file in the “sources” folder, and we’re going to have multiples, you’ll want to rename any boot.wim files you copy here to something else, preferably something descriptive.  For example, I’ve renamed the boot.wim file from the x64 MS DaRT media I just copied over to “msdart64.wim” – this will be important later, when we create our boot entries:

006 
007

 

I’ve repeated the above process for the x86 MS DaRT media as well, and renamed the boot.wim from that media to “msdart86.wim”:

008 

Once you’re done with all of this, the last bit needed is to use bcdedit to add the new .wim files to your boot menu, and copy the updated “Content” folder to your USB key.

Using bcdedit to modify the boot menu

You’ll need to open a command prompt into the \boot folder of your “Content” media folder, and execute some bcdedit commands to modify the boot menu.  To make sure you’re in the right folder, the dir listing output should look something like this:

009 

What you will need to do is use bcdedit to edit the “bcd” file you see here – that file actually contains the boot configuration data used during boot, and we’re going to modify it to add the new .wim files we just copied over.

First, let’s look at the current boot configuration stored in this file.  Run the command “bcdedit /store bcd /enum” to show the current boot manager configuration stored in the bcd file.  You’ll note that we already have 2 entries here – one labeled “Litetouch Boot [MEDIA001] (x86)” and another labeled “Litetouch Boot [MEDIA001] (x64)” – also make a quick note of the default GUID in the {default} entry at the end of the device and osdevice lines, because you’re going to need this later:

010

To create a new entry, you just need to create a copy of the {default} boot entry, and give it a name.  Use the command “bcdedit /store bcd /copy {default} /d “<name>” to create a new entry called “<name>”.  I’ve created a new entry called “Diagnostics and Recovery x64” by using the command “bcdedit /store bcd /copy {default} /d “Diagnostics and Recovery x64” – please note very carefully the GUID that the entry was copied to – you will need this to further modify the entry in the next steps:

011

The next thing you need to do is add the DEVICE that this boot entry is going to use – this is the .wim file that the entry is going to point to, and you do this via the “bcdedit /store bcd /set <GUID for the new entry> DEVICE ramdisk=[boot]\<path to .wim file>,<GUID of default entry>”.  I’ve edited the new entry to point to the msdart64.wim file via the command “bcdedit /store bcd /set {c77ebc03-8748-11de-8cb4-00137228d4cf} DEVICE ramdisk=[boot]\sources\msdart64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}” (remember I told you you’d need the GUID for the new entry, as well as the GUID from the default entry? – here is where you use them):”

012

You will next need to add the OSDEVICE that this boot entry is going to use.  This command is basically identical to the previous, except that “DEVICE” in the previous command is replaced with “OSDEVICE” – “bcdedit /store bcd /set <GUID for the new entry> OSDEVICE ramdisk=[boot]\<path to .wim file>,<GUID of default entry>”.  I’ve edited the new entry to point to the msdart64.wim file via the command “bcdedit /store bcd /set {c77ebc03-8748-11de-8cb4-00137228d4cf} DEVICE ramdisk=[boot]\sources\msdart64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}”:

013

If everything was successful, you should be able to run “bcdedit /store bcd /enum” and see your new entry at the end of the list:

014

If you want to add another (for example, I’m adding the x86 version of MS DaRT as well), just do the same steps over again for the new .wim file:

015 
016

Once you’re done, you can replace what’s on your USB key with the new contents of the “Content” media folder.  If you want to create an ISO image (for burning to DVD, or testing in a VM), you can open the Deployment Tools command prompt from the Windows AIK start menu folder, and run oscdimg on the “Content” folder.  The command is “oscdimg –b”<path to etfsboot.com>” –h –u2 –m -l<Volume Name> “<path containing content to be copied to ISO>” “<path and name of resulting ISO image>” (note that –l in the command is a lower-case “L”, not an “I”).  I’ve created my image via the command “oscdimg –b”C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\etfsboot.com” –h –u2 –m –lINSTALLER D:\Hybrid_Media\Content D:\Hybrid_Media\installer.iso”:

017 

Seeing it in action

If you boot your new USB key (or ISO image), you should now see the new boot entries:

018

 

That’s it – and you could theoretically do this with any Windows PE-based .wim file.  I used MS DaRT for this example, but you could use something like BartPE or any other Windows PE image.

If you like it, share it:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Live
  • MySpace
  • StumbleUpon
Categories: Deployment, Windows Tags:
  1. GrofLuigi
    August 14th, 2009 at 17:55 | #1

    Congratulations on your blog! The looks is very nice and professional, and the content is very useful!

    GL

  2. Donnieboy
    October 11th, 2009 at 19:52 | #2

    Just wanted to drop you a line to say, I enjoy reading your site. I thought about starting a blog myself but don’t have the time.
    Oh well maybe one day…. :)

  3. keith williams
    November 11th, 2009 at 21:37 | #3

    hello
    thank you so much for the insturction to intergrate msdart 6.0 and 6.5.
    I have successful done this.
    But I cannot get Dart 5.0 to intergrate.
    I am not really sure what the bcdedit commands are to do this.
    Could you possible help me.
    here is what the bcedit store shows.

    Windows Boot Loader
    ——————-
    identifier {a2b6cffc-cf19-11de-9224-005056c00008}
    device ramdisk=[boot]\i386\setupldr.bin,{7619dcc8-fafe-11d9-b411-000476eba25f}
    path \i386\setupldr.bin
    description “erd commander 7″
    locale en-US
    inherit {bootloadersettings}
    osdevice ramdisk=[boot]\i386\setupldr.bin,{7619dcc8-fafe-11d9-b411-000476eba25f}
    systemroot \windows
    detecthal Yes
    winpe Yes
    ems Yes

  4. keith williams
    November 12th, 2009 at 20:15 | #4

    Hello
    Just to say I figured out a way to do what I was trying which was to put msdart 5.0 and 6.0 and
    6.5 all on one boot dvd.
    what I did was follow the instructions in this guide and made a boot cd which would boot
    msdart 6.0 and msdart 6.5 versions of X86 and x64.
    Then I used UltraIso to load the iso of the image above and extracted the boot file from
    the dvd. Ultraiso saves the bootfile with a .bif extension. I named this one all.bif since it
    had the 6.0 and 6.5 version of msdart.
    Then I extracted the bootfile from Erd Commander 7.0,which I think is the same as Msdart 5.0.
    I named it erd.bif
    Then I used the program Easyboot and follow the instructions on how to make the bootable
    dvd.
    After installing Easyboot the directory is C:\EasyBoot\disk1\ezboot
    What you do then is copy all of the files from the Erd commander iso or msdart 5.0 to the
    disk1 folder. Then do the same for the iso image was first made which boots the 6.0 and 6.5 versions of msdart.
    Then copy the bif files into the \disk1\ezboot (easyboot) directory.
    Adjust the settings in easyboot to point to the bif file which starts its related program.
    Rename the menu titles to what ever you would like.
    Click save and the click on make iso.
    THe burn iso to a dvd and you will have a multiboot dvd which gives menu with either to
    boot from Erd commander 7.0 or boot from the iso which contains all of the version 6.0 and 6.5.
    Maybe this will help someone who wants to do this.
    It was not easy for me but I kept at it and after a couple of days I had my multiboot dvd.
    thanks for starting me in the right direction.

  5. gnikolic
    January 12th, 2010 at 15:42 | #5

    Hello Cluberti!

    This is very usefull.
    With GImageX I`ve made it a WIM file with 3 images of MSDaRT 6.0 x86, MSDaRT 6.5 x86 and MSDaRT 6.5 x64.
    Can you please, give some routes to make BCD for booting one of 3 images from one boot.wim file?

    Thanx in advice.
    gnikolic.

  1. No trackbacks yet.

Bad Behavior has blocked 584 access attempts in the last 7 days.