Solved: Current Struggles with using BCDEdit script to build a custom local recovery option

By | September 16, 2013
Share

Here is the forum I’m posting for assistance.  These guys are champs when it comes to using BCDEdit and WinPE.

http://reboot.pro/topic/18897-can-not-get-winpe4x-to-boot-from-local-partition/

If I come across an answer, I’ll also post it here.

Screen shot of the boot screen freezing while loading:

FrozenWinPEScreen

Update: The issue was that the Windows 7 bootmgr is incapable of booting a Win PE 4x image.  So I simply replaced the bootmgr on the Windows 7 boot partition with a Windows PE 4x version and it booted with no issues.

 

/Brian Gonzalez

Manually updating / creating BCD files for Windows 7/8 using bcdedit

By | September 16, 2013
Share

Compliments of an excellent write-up: http://diddy.boot-land.net/bcdedit/files/examples1.htm

 

Examples – Part 1


The BCD Store used to boot the operating system may be in use as the system store – if a system store is in use then this will be the default store on which all bcdedit commands are carried out. If no system store is in use, or to specify a store other than the system store, the /store switch must be used.

I personally recommend using the /store switch whenever modifying a BCD store to reduce the risk of targeting the wrong store. To specify the BCD store D:\Boot\BCD we would use the commandbcdedit.exe /store D:\Boot\BCD …..

Before modifying a BCD store I recommend that you create a backup. Be aware that modifying a BCD store could result in your system not booting, I therefore recommend that you take either of the following precautions –

  • Create a BOOTMGR bootable CD/DVD/USB/Floppy with your existing (working) BCD store copied to it. BCD entries (with the exception of any devices set as BOOT) contain disk signature and partition offset information – booting the BCD store from another device will therefore still target the correct device.
  • Create a WinPE bootable CD/DVD/USB disk and use this to replace a non-working BCD store with the backup you made earlier. If you do not have access to WinPE then many Linux Live distributions can also be used.

All examples in this section use the same format – the commands as they would be entered at a command prompt followed by an example batch file automating these commands. All of these examples use the /store switch to specify BCD store C:\Boot\BCD. Don’t forget to change the device/path when adapting these examples to your own system.

 

Create a new (empty) store

  • bcdedit.exe /createstore C:\Boot\BCD

 

Create {bootmgr} entry

  • bcdedit.exe /store C:\Boot\BCD /create {bootmgr}
  • bcdedit.exe /store C:\Boot\BCD /set {bootmgr} description “Boot Manager”
  • bcdedit.exe /store C:\Boot\BCD /set {bootmgr} device boot
  • bcdedit.exe /store C:\Boot\BCD /set {bootmgr} timeout 20

 

Create entry for Windows Vista/7

The following entry will add a menu option for either Windows Vista or 7 – don’t forget to change thedescription entry.

  • bcdedit.exe /store C:\Boot\BCD /create /application osloader

Running this first command will return a Globally Unique IDentifier (GUID) value – e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value –

  • bcdedit.exe /store C:\Boot\BCD /set {guid} device partition=C:
  • bcdedit.exe /store C:\Boot\BCD /set {guid} path \Windows\system32\winload.exe
  • bcdedit.exe /store C:\Boot\BCD /set {guid} osdevice partition=C:
  • bcdedit.exe /store C:\Boot\BCD /set {guid} systemroot \Windows
  • bcdedit.exe /store C:\Boot\BCD /set {guid} description “Windows 7”
  • bcdedit.exe /store C:\Boot\BCD /displayorder {guid} /addlast

These commands will boot Windows Vista/7 but will not add any advanced options such asresumeobject‘s or F8 Windows Recovery Environment.

 

Create {ntldr} entry

The {ntldr} option can be used to boot legacy operating systems including Windows 2000/XP/2003. This option is generally only used in dual or multiboot systems. The files boot.ini and ntdetect.com(from an existing Windows 2000/XP/2003) will need to be copied to the boot partition containing BOOTMGR and the BCD store.

Don’t forget to change the device partition= to the drive containing your own Windows 2000/XP/2003 installation. Also change the description as required.

  • bcdedit.exe /store C:\Boot\BCD /create {ntldr}
  • bcdedit.exe /store C:\Boot\BCD /set {ntldr} device partition=C:
  • bcdedit.exe /store C:\Boot\BCD /set {ntldr} path \ntldr
  • bcdedit.exe /store C:\Boot\BCD /set {ntldr} description “Windows XP”
  • bcdedit.exe /store C:\Boot\BCD /displayorder {ntldr} /addlast

 

Create entry for VHD boot

At this time only Windows 7 (Ultimate and Enterprise) and Windows Server 2008 R2 can be booted from a VHD file. These commands will add an entry for an existing VHD installation. Edit thedescription and device path as required.

  • bcdedit.exe /store C:\Boot\BCD /create /application osloader

Running this first command will return a Globally Unique IDentifier (GUID) value – e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value –

  • bcdedit.exe /store C:\Boot\BCD /set {guid} device vhd=[C:]\vhd\seven.vhd
  • bcdedit.exe /store C:\Boot\BCD /set {guid} path \Windows\system32\winload.exe
  • bcdedit.exe /store C:\Boot\BCD /set {guid} osdevice vhd=[C:]\vhd\seven.vhd
  • bcdedit.exe /store C:\Boot\BCD /set {guid} systemroot \Windows
  • bcdedit.exe /store C:\Boot\BCD /set {guid} description “Windows 7 VHD”
  • bcdedit.exe /store C:\Boot\BCD /displayorder {guid} /addlast

 

Create entry for Grub4dos

The following example uses device boot – this can be changed to device partition=#:. You will need to copy grldr.mbr to the device specified. You will then need to copy grldr and menu.lst to any supported partition (FAT/NTFS/EXT2/3).

  • bcdedit.exe /store C:\Boot\BCD /create /application bootsector

Running this first command will return a Globally Unique IDentifier (GUID) value – e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value –

  • bcdedit.exe /store C:\Boot\BCD /set {guid} device boot
  • bcdedit.exe /store C:\Boot\BCD /set {guid} path \grldr.mbr
  • bcdedit.exe /store C:\Boot\BCD /set {guid} description “Grub4dos”
  • bcdedit.exe /store C:\Boot\BCD /displayorder {guid} /addlast

 

Create {ramdiskoptions} entry

As far as I am aware {ramdiskoptions} is only used in order to boot a Windows Vista/2008/7 based WinPE. {ramdiskoptions} is used to identify the .sdi file required during the initial stages of booting WinPE.

Due to a bug any subsequent WinPE based objects do not display their own descriptions if a {ramdiskoptions} description has been set. Do not therefore specify any description for {ramdiskoptions} – thanks to boot-land forum member cdob for this tip (see here).

The following example uses device boot – this can be changed to device partition=#: if required. Edit the ramdisksdipath path as required.

  • bcdedit.exe /store C:\Boot\BCD /create {ramdiskoptions}
  • bcdedit.exe /store C:\Boot\BCD /set {ramdiskoptions} ramdisksdidevice boot
  • bcdedit.exe /store C:\Boot\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

Create entry for WinPE

A {ramdiskoptions} object must exist before creating an entry for WinPE. The following example usesdevice ramdisk=[boot] – this can be changed to device ramdisk=[#:] if required. Edit thedescription and device path as required.

 

  • bcdedit.exe /store C:\Boot\BCD /create /application osloader

Running this first command will return a Globally Unique IDentifier (GUID) value – e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value –

  • bcdedit.exe /store C:\Boot\BCD /set {guid} systemroot \Windows
  • bcdedit.exe /store C:\Boot\BCD /set {guid} detecthal Yes
  • bcdedit.exe /store C:\Boot\BCD /set {guid} winpe Yes
  • bcdedit.exe /store C:\Boot\BCD /set {guid} osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
  • bcdedit.exe /store C:\Boot\BCD /set {guid} device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
  • bcdedit.exe /store C:\Boot\BCD /set {guid} description “Windows PE”
  • bcdedit.exe /store C:\Boot\BCD /displayorder {guid} /addlast

 

Using multiple {ramdiskoptions}

Thanks to boot-land forum member cdob for this tip (see here).

Although only one {ramdiskoptions} object can be created it is possible to use a different .sdi file to the one specifed in {ramdiskoptions} ramdisksdipath by using the following workaround. At present I have not found any real use for implementing this however, as cdob points out, it may be necessary in future.

  1. bcdedit.exe /store C:\Boot\BCD /create /device

Running this first command will return a Globally Unique IDentifier (GUID) value – e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {ramdisk_guid} with this value –

  1. bcdedit.exe /store C:\Boot\BCD /set {ramdisk_guid} ramdisksdidevice partition=C:
  2. bcdedit.exe /store C:\Boot\BCD /set {ramdisk_guid} ramdisksdipath \Boot\different.sdi

Now to use this to boot WinPE –

  1. bcdedit.exe /store C:\Boot\BCD /create /application osloader

Running this command will return a Globally Unique IDentifier (GUID) value – e.g. {bdaf610c-622d-11df-a7ee-a711d7fae90e}. In all subsequent commands replace {guid} with this value and replace {ramdisk_guid} with the GUID created by running the command in step 1 –

  1. bcdedit.exe /store C:\Boot\BCD /set {guid} systemroot \Windows
  2. bcdedit.exe /store C:\Boot\BCD /set {guid} detecthal Yes
  3. bcdedit.exe /store C:\Boot\BCD /set {guid} winpe Yes
  4. bcdedit.exe /store C:\Boot\BCD /set {guid} osdevice ramdisk=[C:]\Sources\boot.wim,{ramdisk_guid}
  5. bcdedit.exe /store C:\Boot\BCD /set {guid} device ramdisk=[C:]\Sources\boot.wim,{ramdisk_guid}
  6. bcdedit.exe /store C:\Boot\BCD /set {guid} description “Windows PE”
  7. bcdedit.exe /store C:\Boot\BCD /displayorder {guid} /addlast

SCCM 2012 failed to start DP health monitoring task error

By | September 4, 2013
Share

Compliments of http://dbgriffin.wordpress.com/2013/03/01/configuration-manager-2012-failed-to-start-dp-health-monitoring-task/#comment-173. A stray log file in the root of C: or D: named “Microsoft” caused this issue. Deleting the file allowed SCCM2012 to redistribute the package with no errors.

SCCMNotStagingConfigMgrPackageIssue

Screenshot of SCCM Content Status displaying not staged Config Mgr Client Install package. Check out under eye masks products if you need further information.

/Brian G

Silent install of Microsoft Security Essentials software.

By | August 30, 2013
Share

Its free! And works great. So if you do not run virus protection in your Organization, grab and it start!

Download URL for client: http://windows.microsoft.com/en-us/windows/security-essentials-download

Silent install for client:

start /w "" "%~dp0mseinstall.exe" /s /runwgacheck /o

Download URL for definition updates for Microsoft Security Essentials: http://support.microsoft.com/kb/971606

Silent install for definition updates for Microsoft Security Essentials:

start /w "" "%~dp0mpam-fe.exe" /s

Download for latest Network Inspection System Definition Updates:
X86: http://definitionupdates.microsoft.com/download/definitionupdates/x86/nis_full.exe
X64: http://definitionupdates.microsoft.com/download/definitionupdates/amd64/nis_full.exe

Silent install for Network Inspection System Definition Updates:

start /w "" "%~dp0nis_full.exe" /s

/Brian G