{"id":662,"date":"2014-07-09T23:59:44","date_gmt":"2014-07-09T23:59:44","guid":{"rendered":"http:\/\/3.136.9.181\/?p=662"},"modified":"2014-07-09T23:59:44","modified_gmt":"2014-07-09T23:59:44","slug":"automatic-bios-firmware-and-settings-updates","status":"publish","type":"post","link":"https:\/\/vaygh.com\/?p=662","title":{"rendered":"Automatic BIOS Firmware and Settings Updates"},"content":{"rendered":"<p>One of my big projects this summer at work has been to automatically update the BIOS firmware and settings on our roughly 250 (mostly Dell) workstations. I was finally able to develop a working solution using all free tools, and I&#8217;m sharing the results with the Internet in hope they are useful to someone else as well.<\/p>\n<p>This document is designed to explain the process of setting up a Windows PE environment to be used for BIOS update purposes, creating custom automatic BIOS settings files, updating the <i>bios.bat<\/i> file for new computer types, and deploying BIOS updates based on your customizations.<\/p>\n<h1>Setting Up Working Tools<\/h1>\n<p>Before you can create your custom BIOS settings files and deploy them to workstations using Windows PE, you\u2019ll need specialized tools available on your technician workstation.<\/p>\n<h2><b>Windows Automated Installation Kit<\/b><\/h2>\n<p>The WAIK contains components used for deploying Windows 7 systems, including Windows PE, which will be used to create a bootable environment for flashing BIOS updates and automatic BIOS settings files.<\/p>\n<ol>\n<li>Download the <a title=\"Microsoft Windows Automated Installation Kit\" href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=5753\" target=\"_blank\">WAIK<\/a> from Microsoft.<\/li>\n<li>Burn the downloaded ISO to disk using your preferred burning utility, or extract the contents to a folder.<\/li>\n<li>Insert the burned disc or launch <i>StartCD.exe<\/i> from the extracted folder.<\/li>\n<li>Click \u201cWindows AIK Setup\u201d in left navigation pane.<\/li>\n<li>When the setup wizard starts, click Next.<\/li>\n<li>Select the \u201cI Agree\u201d radio button to accept the license agreement, then click Next.<\/li>\n<li>Choose where you\u2019d like to install the software to and who should be able to run it, then click Next, Next again, then Close.<\/li>\n<li>Exit the launcher program by clicking Exit in left navigation pane.<\/li>\n<\/ol>\n<h2><b>Dell Client Configuration Utility<\/b><\/h2>\n<p>To create automatic BIOS settings files to deploy to Dell target workstations, you\u2019ll need the Dell Client Configuration Utility.<\/p>\n<ol>\n<li>Download the <a title=\"Dell Client Configuration Utility\" href=\"http:\/\/en.community.dell.com\/techcenter\/systems-management\/w\/wiki\/1975.dell-client-configuration-utility.aspx\" target=\"_blank\">DCCU<\/a> from Dell.<\/li>\n<li>Launch the installer by right-clicking and choosing \u201cRun as administrator\u201d<\/li>\n<li>Click Next.<\/li>\n<li>Accept the license agreement by selecting the radio button next to \u201cI accept the license agreement\u201d then click Next.<\/li>\n<li>Enter customization information, choose who may run the program, then click Next.<\/li>\n<li>Click Next, then Finish.<\/li>\n<li>The ASP.net AJAX 2.0 Extensions may install automatically once DCCU installation is finished, if they are not already present on your technician workstation.<\/li>\n<\/ol>\n<h2><b>BIOS.BAT<\/b><\/h2>\n<p>The workhorse of the automatic update process is a Windows batch file called <i>bios.bat<\/i>.<\/p>\n<ol>\n<li>Navigate to <a href=\"http:\/\/community.spiceworks.com\/scripts\/show_download\/2669\">http:\/\/community.spiceworks.com\/scripts\/show_download\/2669<\/a><\/li>\n<li>Click the Download button.<\/li>\n<li>Save the file as <i>bios.bat<\/i>.<\/li>\n<\/ol>\n<h2><b>(Optional) WinSCP or FileZilla<\/b><\/h2>\n<p>If you use FOG as your imaging solution, and you wish to add your BIOS update disc to the PXE boot menu, you\u2019ll need an FTP program like WinSCP or FileZilla.<\/p>\n<h1>Gathering Data, Customizing Options, and Generating the BIOS Settings Update Executable<\/h1>\n<p>Gathering the data you need to create custom BIOS setting files is a two-part process. Note: for this section, you will need a sample machine of each type you wish to develop a custom setting file for. It\u2019s recommended the sample machine have any installed antivirus software disabled.<\/p>\n<h2><b>Collecting the BIOS Inventory<\/b><\/h2>\n<p>In order to collect a BIOS inventory from a sample computer, follow the steps above for installing the Dell Client Configuration Utility. Once the DCCU is installed on the sample machine, the following process explains how to capture the BIOS inventory:<\/p>\n<ol>\n<li>Boot the sample computer into BIOS.<\/li>\n<li>Configure the BIOS according to your needs. This will become the baseline for your setting update file.<\/li>\n<li>Restart the sample computer.<\/li>\n<li>Log in with an administrator account.<\/li>\n<li>Launch the DCCU. (I have had the best luck with running the DCCU web interface in Internet Explorer 8 with Compatibility Mode on. Chrome and Firefox fail to render the page correctly for me. YMMV)<\/li>\n<li>Click the \u201cCreate BIOS Inventory Package\u201d link.<\/li>\n<li>When the File Download &#8211; Security Warning pop-up box appears, choose \u201cRun.\u201d<\/li>\n<li>Once the BIOS inventory program has completed, a file called <i>TaskResult.xml<\/i> will be created on the desktop. You may wish to save this file in case you need to make adjustments to the settings update configuration later.<\/li>\n<\/ol>\n<h2><b>Customizing BIOS Settings and Generating the Update File<\/b><\/h2>\n<p>After gathering an inventory of the sample machine\u2019s BIOS, you can now make any needed changes to the automatic BIOS settings update file. Follow these steps to complete the configuration:<\/p>\n<ol>\n<li>On the sample machine or your technician workstation, click the Browse button in the Dell Client Configuration Utility web page under the BIOS Settings heading.<\/li>\n<li>In the \u201cChoose File to Upload\u201d box, navigate to your previously-generated <i>TaskResult.xml<\/i> file, select it, then click Open.<\/li>\n<li>Once you\u2019ve selected the <i>TaskResult.xml<\/i> file you need, click the \u201cImport Selected BIOS Inventory\u201d link in the DCCU.<\/li>\n<li>Now you can customize the available BIOS settings. Items in the list with check marks are available for configuration in the chosen BIOS. To leave a setting as it\u2019s already configured on the target machine &#8211; such as a previously-entered asset tag &#8211; simply clear the check mark for that item. It will be omitted from the custom settings file. To reset a text field, leave the box checked, but remove all text (leave it blank).<\/li>\n<li>Once the BIOS settings are configured according to your specifications, scroll to the bottom of the Dell Client Configuration Utility page and select the \u201cCreate BIOS Settings Package\u201d link.<\/li>\n<li>A File Download &#8211; Security Warning box will pop-up. Choose \u201cSave,\u201d then select a name and location to save the resulting executable to. To make updating the bios.bat file easier, I typically name the file <i>machinemodelset.exe<\/i>, as in <i>745set.exe<\/i>.<\/li>\n<li>You can now use your custom BIOS settings executable to update target PCs.<\/li>\n<\/ol>\n<h1>Creating the BIOS Update Folder<\/h1>\n<p>In order for the automatic updating features of the disc to work, a specific directory structure must be observed:<\/p>\n<ol>\n<li>Create a directory called \u201cBIOS\u201d in the C: drive of your technician workstation.<\/li>\n<li>Place all BIOS setting customization executables created with the Dell Client Configuration Utility or files created by another manufacturer\u2019s similar program in the BIOS directory just created.<\/li>\n<li>Place your customized bios.bat file in this directory.<\/li>\n<li>Create a subdirectory for each model computer to be updated and place the firmware update executable in this folder. (The FW update executable must be named with the BIOS version and nothing else.)<\/li>\n<\/ol>\n<h1>Building the BIOS Update Disc<\/h1>\n<p>The following sections detail creating the Windows PE build environment, customizing the environment, adding the necessary BIOS files, and committing the updated environment to a custom ISO file.<\/p>\n<h2><b>Creating the Windows PE Build Environment<\/b><\/h2>\n<p>Use the following steps to create your Windows PE environment:<\/p>\n<ol>\n<li>Click Start, then navigate to All Programs &#8211; Microsoft Windows AIK.<\/li>\n<li>Right-click on \u201cDeployment Tools Command Prompt\u201d and select \u201cRun as administrator\u201d<\/li>\n<li>Type <b>copype.cmd x86 C:\\winpe_x86<\/b> into the command prompt and hit Enter.<\/li>\n<li>Type <b>copy C:\\winpe_x86\\winpe.wim C:\\winpe_x86\\ISO\\sources\\boot.wim<\/b> into the command prompt and hit Enter.<\/li>\n<\/ol>\n<h2><b>Mounting and Customizing the Windows PE Environment<\/b><\/h2>\n<p>Follow the steps below to mount and customize the Windows PE environment:<\/p>\n<ol>\n<li>In the Deployment Tools Command Prompt, type <b>dism \/Mount-WIM \/WimFile:C:\\winpe_x86\\ISO\\sources\\boot.wim \/index:1 \/MountDir:c:\\winpe_x86\\mount<\/b> and press Enter.<\/li>\n<li>Add the Windows Management Instrumentation to the environment by typing <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\winpe-wmi.cab&#8221;<\/b> and pressing Enter, then running <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\en-us\\winpe-wmi_en-us.cab&#8221;<\/b><\/li>\n<li>Add HTA to the image by entering <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\winpe-hta.cab&#8221;<\/b> and <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\en-us\\winpe-hta_en-us.cab&#8221;<\/b> in the Deployment Tools Command Prompt.<\/li>\n<li>Scripting support needs to be added to the Windows PE environment by typing <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\winpe-scripting.cab&#8221;<\/b> into the command prompt, then pressing Enter. You\u2019ll also need to type <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\en-us\\winpe-scripting_en-us.cab&#8221;<\/b> into the prompt.<\/li>\n<li>Add MDAC support to the environment by entering <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\winpe-mdac.cab&#8221;<\/b> and <b>dism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\Program Files\\Windows AIK\\Tools\\PETools\\x86\\WinPE_FPs\\en-us\\winpe-mdac_en-us.cab&#8221;<\/b><\/li>\n<li>Copy the contents of your BIOS update folder to the Windows PE environment by typing <b>xcopy \/e C:\\BIOS C:\\winpe_x86\\mount\\Windows\\System32<\/b> into the command prompt and pressing Enter.<\/li>\n<li>Type <b>notepad C:\\winpe_x86\\mount\\Windows\\System32\\startnet.cmd<\/b> into the command prompt and press Enter.<\/li>\n<li>Add \u201cbios\u201d to the second line of the file and save it.<\/li>\n<li>Exit Notepad.<\/li>\n<\/ol>\n<h2><b>Committing Changes to the Environment and Creating the Bootable ISO<\/b><\/h2>\n<p>In order to use the customized Windows PE environment, changes must be committed to the system and a bootable ISO created:<\/p>\n<ol>\n<li>In the Deployment Tools Command Prompt, type <b>dism \/unmount-wim \/Mountdir:c:\\winpe_x86\\mount \/commit<\/b> and press Enter.<\/li>\n<li>Type <b>oscdimg -n -bC:\\winpe_x86\\Etfsboot.com C:\\winpe_x86\\ISO C:\\winpe_x86\\BIOS.iso<\/b> next, followed by Enter.<\/li>\n<li>Exit the Deployment Tools Command Prompt.<\/li>\n<li>Burn the resulting CD image file with your preferred disc burning software.<\/li>\n<\/ol>\n<h1>Updating the Environment and Rebuilding the BIOS Update Disc<\/h1>\n<p>It may be necessary to update the environment in order to add new machine types or include updated firmware files. The simplest way to update the disc is to make any needed modifications to your C:\\BIOS folder (new bios.bat, new machine folders, etc. &#8211; Remember, only one firmware update executable can be in a given folder at a time.) then rebuild the environment using the steps above.<\/p>\n<h1>(Optional) Creating a BIOS Update USB Flash Drive<\/h1>\n<p>In lieu of a CD, which can take longer to load, you may wish to follow these steps after you\u2019ve completed \u201cCommitting Changes to the Environment and Creating the Bootable ISO\u201d above:<\/p>\n<ol>\n<li>Insert the target USB flash drive in your technician workstation.<\/li>\n<li>Open a Command Prompt as an administrator (or use the Deployment Tools Command Prompt).<\/li>\n<li>Type <b>diskpart<\/b> and hit Enter.<\/li>\n<li>Type <b>list disk<\/b> and hit Enter.<\/li>\n<li>Type <b>select disk 1<\/b> and hit Enter. (This assumes your flash drive is disk 1. If not, substitute the correct value.)<\/li>\n<li>Type <b>clean<\/b> and hit Enter.<\/li>\n<li>Type <b>create partition primary<\/b> and hit Enter.<\/li>\n<li>Type <b>select partition 1<\/b> and hit Enter.<\/li>\n<li>Type <b>active<\/b> and hit Enter.<\/li>\n<li>Type <b>format quick fs=fat32<\/b> and hit Enter.<\/li>\n<li>Type <b>assign<\/b> and hit Enter.<\/li>\n<li>Type <b>exit<\/b> and hit Enter to exit diskpart.<\/li>\n<li>Type <b>xcopy C:\\winpe_x86\\iso\\*.* \/e F:\\<\/b> (assuming F: is the drive letter assigned to your flash drive) and hit Enter.<\/li>\n<li>Exit the Command Prompt.<\/li>\n<\/ol>\n<h1>(Optional) Adding the Update Disc Image to the FOG PXE Boot Menu<\/h1>\n<p>If you use FOG as your imaging solution, you may wish to make your BIOS update disc available in the PXE boot menu so you can load BIOS updates over the network. The steps below detail this process:<\/p>\n<ol>\n<li>Launch WinSCP (or your preferred FTP client) and connect to your FOG server.<\/li>\n<li>Once connected, navigate to \/tftpboot\/<\/li>\n<li>Copy memdisk to a temporary folder on your technician workstation.<\/li>\n<li>Navigate to \/tftpboot\/fog\/<\/li>\n<li>Create a new directory called \u201cbios\u201d (without quotes).<\/li>\n<li>Upload the BIOS.iso file you created for your update disc and the copy of memdisk into this new folder.<\/li>\n<li>Navigate to \/tftpboot\/pxelinux.cfg\/<\/li>\n<li>Copy the default file to a temporary folder on your technician workstation.<\/li>\n<li>Rename the default file on your FOG server to default.bak<\/li>\n<li>Open the copy of default on your workstation in your favorite text editor.<\/li>\n<li>Insert the following code where you would like the option to appear in the PXE boot menu (I prefer to place it at the end, just before the line PROMPT 0):<\/li>\n<\/ol>\n<blockquote>\n<p style=\"padding-left: 30px;\">LABEL bios<\/p>\n<p style=\"padding-left: 60px;\">kernel fog\/bios\/memdisk<\/p>\n<p style=\"padding-left: 60px;\">append iso initrd=fog\/bios\/BIOS.iso raw<\/p>\n<p style=\"padding-left: 60px;\">MENU LABEL BIOS Update<\/p>\n<p style=\"padding-left: 60px;\">TEXT HELP<\/p>\n<p style=\"padding-left: 60px;\">Utility to automatically update BIOS firmware<\/p>\n<p style=\"padding-left: 60px;\">and settings.<\/p>\n<p style=\"padding-left: 60px;\">ENDTEXT<\/p>\n<\/blockquote>\n<ol>\n<li>Save the default file, then upload the new version to \/tftpboot\/pxelinux.cfg\/ on your FOG server.<\/li>\n<li>To update the utility, simply copy over the BIOS.iso file in \/tftpboot\/fog\/bios\/ with a newer version.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>One of my big projects this summer at work has been to automatically update the BIOS firmware and settings on our roughly 250 (mostly Dell) workstations. I was finally able to develop a working solution using all free tools, and I&#8217;m sharing the results with the Internet in hope they are useful to someone else&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[8],"tags":[803,801,800,809,806,807,808,802,805,804],"class_list":["post-662","post","type-post","status-publish","format-standard","hentry","category-geek-stuff","tag-automatic","tag-bios","tag-dell","tag-firmware","tag-fog","tag-fog-project","tag-pxe","tag-update","tag-usb","tag-windows-pe"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgg9VX-aG","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/vaygh.com\/index.php?rest_route=\/wp\/v2\/posts\/662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vaygh.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vaygh.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vaygh.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vaygh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=662"}],"version-history":[{"count":0,"href":"https:\/\/vaygh.com\/index.php?rest_route=\/wp\/v2\/posts\/662\/revisions"}],"wp:attachment":[{"href":"https:\/\/vaygh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vaygh.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vaygh.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}