Deployment Solution

 View Only

Adding OEM extensions to the DS 6.8 Boot Disk Creator Environment 

Oct 26, 2006 04:07 PM

Do you need to customize your DS installation to provide additional files to include into your pre-boot automation boot images (or replace Altiris provided files), without modifying the base Altiris installed setup? Would you like to specify your own default boot image wizard settings? The Boot Disk Creator in DS 6.8 provides a feature called "OEM extensions". OEM extensions provide the ability to create customized "sets" of files, which the end-users may then individually select when a boot configuration is created.

Introduction:

OEM customers may find a need to be able to override or add their own files to the base set of pre-boot files that were originally installed by the standard DS installation. The purpose of this document is to describe how an installation of DS can be customized to accomplish such tasks. This document assumes the user is already familiar with creating configurations and boot images with the Boot Disk Creator (referred to hereafter as BDC).
Note
Although this document targets OEM customers, end-user customers can use this document to add any number of their own customized extensions to the BDC environment.

Requirements:
Deployment Solution 6.8

Boot Image Creation:
Before getting into the details, let's first see how a boot image is created "under-the-hood" by the BDC.

When a user creates a boot image, the BDC copies files into a temporary staging area from which the final boot image is created. The source files are pulled from 5 different areas in the following order:

  1. Base pre-boot operating system files
  2. Altiris-supplied files
  3. OEM supplied files
  4. Additional Files (user-supplied files that are common across configurations)
  5. Configuration Files (user-supplied files that are placed inside a single configuration)

By way of example, lets suppose a user has instructed BDC to create an x86 network boot disk from a WinPE configuration called "myWinPE".

(1) BDC first copies over the pre-boot WinPE operating system files (that were installed previously by the user) into the temporary staging area. (2) Next, the Altiris-supplied files are copied to the same location, effectively replacing any files by the same names that may already exist. (3) Now come the OEM supplied files, again replacing any files by the same names that may already be there. (4) Next come the files the user has added to the "WinPE additional files" area (5) followed by any files found in the "myWinPE" configuration.

The final boot image is then created from the files that are in the temporary staging area.

In summary, the OEM has replaced (or added to) the files that were part of the original pre-boot OS and Altiris-supplied files. However, the user-supplied files (4 and 5 above) will always override the OEM, Altiris, or original pre-boot files.

Setting up the Environment:

Create the following directory structure:

"<DS install path>\bootwiz\oem\<OEM name>\<OS>\<processor>\base"
 
where
 
<OEM name> = your OEM name (i.e. DELL, HP, IBM, MyOEM, etc) or any name that has meaning for how these files will be used. The name that is used will show up in the BDC user interface (see Figure 2) when configurations are created.
 
<OS> = DOS, Linux, or WinPE
<processor> = x86, x64, or ia64 (note: DOS does not require a processor type - see Figure 1)

Figure 1: An example of a working OEM structure for "MyOEM"

Click to view.

By way of example, suppose an OEM customer called MyOEM wishes to override a Windows x86 driver file called "driver.sys" in the drivers folder of the base image. The customer would create the following directory structure in the "bootwiz" folder:

"oem\MyOEM\winpe\x86\base\i386\system32\drivers"

The customer would then place their own "driver.sys" inside this directory structure which would get copied into the WinPE x86 boot image at the time a user creates a boot image.

Selecting an OEM extension to include in a boot image (end-users only):

As a boot configuration is created by the user, BDC will automatically detect and list any OEM folders it can find in the "OEM Extensions" drop-down combo box shown in Figure 2. In addition, 3 other special entries are listed. By way of example, the drop-down combo box in Figure 2 shows 5 different options and are defined as follows:

<none> = don't include any OEM folder structures in the final boot image
<default> = include only the OEMs folder structures found in the OEM section of bootwiz.ini into the final boot image (note: the "<default>"entry will only show up if more than 1 OEM is defined in the bootwiz.ini file)
<all> = include all of the OEMs folder structures in the final boot image
MyOEM=include only the "MyOEM" OEM folder structure in the final boot image
MyOEM2=include only the "MyOEM2" OEM folder structure in the final boot image

Note
If no OEM folder structure is found on the disk then the "OEM Extensions" controls shown in Figure 2 will be hidden.

Figure 2

Click to view.

The "@dot@" Folder

Linux - All of the folders/files that are placed into the "base" folder eventually will end up in the rootfs.gz file in the final boot image. If you want to add folders/files that are on the root of the boot image (siblings to the rootfs.gz file) such as your own conf file or an image file, you can create a special folder called "@dot@" to contain such files. The "@dot@" folder will need to be created as a sibling to the "base" folder as shown in the example in Figure 1 . A special mount point exists in the rootfs called /mnt/atrsboot which provides access to the files external to the rootfs (see tech tip "Restore an Image from a Bootable DVD" posted on the Altiris juice website for more information).

WinPE - If you are booting WinPE into RAM, then all of the folders/files that are placed into the "base" folder eventually will end up in the winpe.iso file in the final boot image. If you want to add folders/files to the root of the boot image that are external to the winpe.iso file, then follow the same steps listed above in the Linux case for creating the "@dot@" folder as a sibling to the "base" folder. If you are not booting WinPE into RAM then any files that are stored in the "@dot@" folder will still end up on the root of the boot disk along with the files from the "base" folder (there will be no winpe.iso file). Note: In DS 6.8, all BDC-generated WinPE boot images boot into RAM except CDs.

The "default.bdc" File

Inside each configuration exists a "<config name>.bdc" file that stores all of the wizard settings specified by the user at the time the configuration was created. A "default.bdc" file is very similar to a "<config name>.bdc" file in that it shares the same section, key, and value names but the "default.bdc" file is used as inputs to the default wizard settings rather than storing outputs like the "<config name>.bdc" file. It is not required that an OEM provide a "default.bdc" file in their own OEM structure, nor is it required that a "default.bdc" file contain all of the possible settings. An OEM may specify only the default settings they wish to override.

The "default.bdc" files can exist at 3 different levels within the OEM directory structure.

  1. OEM name level - contains settings that are generic across all OS types
    The path is:
    "<DS install path>\bootwiz\oem\<OEM name>\default.bdc".
  2. OS level - contains settings that are specific to an OS but generic across all processor types
    The path is:
    "<DS install path>\bootwiz\oem\<OEM name>\<OS>\default.bdc".
  3. Processor level - contains settings that are specific to an OS and processor type (no settings exist in 6.8 to warrant placing the file at this level but may exist in the future)
    The path is:
    "<DS install path>\bootwiz\oem\<OEM name>\<OS>\<processor>\default.bdc".

In step 1 of the configuration wizard (see Figure 2), the user specifies the pre-boot OS type and the OEM type. As the user proceeds to step 2, BDC now has the information it needs to read in the appropriate "default.bdc" files in the OEM structure in order to populate the default settings for the remaining wizard pages.

By way of example, suppose the user picks "WinPE" as the pre-boot OS and "MyOEM" as the OEM extension. Also suppose that "<DS install path>\bootwiz\oem MyOEM\winpe\default.bdc" exists with the entries shown in Figure 3.

Figure 3

Click to view.

The [Network] entries in figure 3 result in the default drive mapping to use drive I instead of F as shown in Figure 4. Note: MAPPATH<n> is defined where 0 maps to drive "F" and continues on up to where 20 maps to drive "Z".

Figure 4

Click to view.

The entry "WINPE_BOOT_MODEL=1" causes the "factory -winpe" radio button to be selected by default instead of the "factory -minint" radio button as shown in figure 5.

Figure 5

Click to view.

If you want the OEM extension field (shown in figure 2) to automatically be populated with "MyOEM" as the default, then it will be necessary to edit the "OEMExt" field inside of "bootwiz\default.bdc" file (see figure 6). This "default.bdc" file ships with Deployment Solution 6.8 and should not be modified by an OEM with the exception of the OEMExt field - All OEM specific changes should be specified in the "default.bdc" file in the OEM specific folder, not in the "bootwiz\default.bdc" that ships with DS 6.8.

Figure 6

Click to view.

The "/Merge=TRUE" Specifier

Items that contain multiple entries such as map drives can be merged with previous defined defaults by using the "/Merge" specifier. If you want to merge multiple entries such as "map drives" in your "default.bdc" file with previously defined defaults (defaults that have already been read in via other "default.bdc" files), then you will need to use the "/Merge=TRUE" specifier (see Figure 7).

Figure 7

Click to view.

Suppose "MAPPATH0=\\MyDS\eXpress" was already read in from "bootwiz\default.bdc". Now suppose BDC is processing the OEM's "default.bdc" shown in Figure 7. The defaults that will show up on the drive mapping wizard page will contain 2 mapped drives. Drive F will be mapped to "eXpress" and Drive I will be mapped to "images". Without using the "/Merge" specifier, the previously defined default of "MAPPATH0=\\MyDS\express" would be overwritten by "MAPPATH3=\\MyDS\images" that was specified in the OEM "default.bdc" file, causing only drive I to be mapped.


Note
BDC supports special tokens for the DS server name and DS server share that are resolved at the time a boot image is created. This allows OEMs to specify what drive they want their DS share to map to without knowing ahead of time what the names of the DS server and share are. The format is "MAPPATH<n>=\\%DS_SERVER_NAME%\%DS_SERVER_SHARE%".

DELETE_FILES Section

The "DELETE_FILES" section provides a way for users to have control over what files are deleted from the WinPE (available to WinPE only) image. By default, several files are deleted out of the image to try to keep the final size of the boot image as small as possible. The following syntax will delete ONLY the file "myfile.exe" out of the boot image (notice the '-' to the right of the '=' sign).

[DELETE_FILES]
%SRC%\%PATH_WINDIR%\system32\myfile.exe=-


Note
%SRC% and %PATH_WINDIR% are variables that BDC resolves when it creates the boot image.

The following syntax will delete the file "myfile.exe" out of the system32 folder in addition to the files that have already been specified by previous defaults.

[DELETE_FILES]
/Merge=TRUE
%SRC%\%PATH_WINDIR%\system32\myfile.exe=-

If you want to keep one of the files that would normally be deleted as one of the defaults, then use the '+' as the value (to the right of the "=" sign) instead of '-'. For instance, suppose you want to keep "alrsvc.dll" which is one of the files that is deleted by default. You could do this by placing the following syntax in your "default.bdc" file.

[DELETE_FILES]
/Merge=TRUE
%SRC%\%PATH_WINDIR%\system32\ alrsvc.dll=+

If you don't want any files deleted from the boot image then insert an empty "[DELETE_FILES]" section.

Empty Section

Items that contain multiple entries such as map drives (contained in [NETWORK]) or extraneous WinPE files to be deleted (contained in [DELETE_FILES]) can be erased by simply putting in a section containing no entries.

By way of example, suppose you want to change the default behavior of a WinPE configuration by NOT deleting any extraneous files from the boot image. The way to override this default behavior is to insert the empty "[DELETE_FILES]" section into the OEM "default.bdc" file (see figure 8). The empty "[NETWORK]" section also deletes any existing default drive mappings.

Figure 8

Click to view.

Multiple OEMs

BDC provides 2 options for a user to specify multiple OEMs in a configuration. If you want to add all of the OEMs to the configuration and don't care about the order in which the OEM folders are processed, then select the "<all>" option from the drop-down combo-box in figure 2. If you want to specify an order in which the OEMs are processed or if you want to exclude specific OEMs from the configuration, you will need to first edit the "bootwiz.ini" file, restart BDC, and then select the "<default>" option from the drop-down combo-box (also shown in Figure 2). Edit the "bootwiz.ini" file by doing the following:

Open up "<DS install path>\bootwiz\bootwiz.ini" and add the OEMS to be processed (see Figure 9):

[OEM]
<OEM name>=TRUE
<OEM name>=FALSE
<OEM name>=TRUE

where <OEM name> is the name of the OEM (must match the name of folder on the disk "bootwiz\oem\<OEM name>".

BDC will process items found in the OEM section first to last. Therefore, the last item in the section that is set to true will overwrite any conflicting files that were previously copied to the staging area. OEM entries that are set to false are excluded from the image.


Note
An OEM selection can only be made when creating a new configuration. When editing an existing configuration, the drop-down combo-box will be disabled.

Figure 9

Click to view.

The "prestart" and "startup" Folders

When a Linux or WinPE boot image first boots up, the startup script will attempt to launch any scripts or programs that were placed into either of these special folders. The folders are located in the following locations:

For Linux (currently the "prestart" folder is not supported in Linux):

"<DS install path>\bootwiz\oem\<OEM name>\linux\<processor>\base\startup"

For WinPE:

"<DS install path>\bootwiz\oem\<OEM name>\winpe\<processor>\base\prestart"
"<DS install path>\bootwiz\oem\<OEM name>\winpe\<processor>\base\startup"

The contents of the "prestart" folder are executed before networking starts. Only WinPE supports a "prestart" folder. The contents of the "startup" folder are executed after networking starts but before the agent runs. To run scripts after the agent has been started, modify the "etc/rc.local" file (for Linux) or the "startup.bat" file (for WinPE).


Note
DOS currently does not support the "prestart" and "startup" folders. (A separate in-depth article exists which describes the startup sequence for the DOS, Linux and WinPE automation. Refer to that article for more details on how the startup sequence works in Altiris pre-boot automation environments).

Summary

The ability for OEM customers to add their own extensions in DS 6.8 provides much more flexibility over previous versions of DS. Customers can now integrate their own customizations into BDC without the hassle of tweaking the original set of pre-boot files. The end result is cleaner upgrades while reducing the chance of data corruption within the original set of pre-boot files and improving the overall experience of the end-user.

Statistics
0 Favorited
2 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.