So you’ve used Windows Server 2008 bare metal restore and it wiped out your Dell Utility Partition. What to do?
Background: I’m setting up a Windows Server 2008 R2 machine as a Hyper-V host on a Dell PowerEdge 2900. I originally configured two RAID arrays (0 and 5). Starting with the Dell Systems Build and Update DVD and the companion Windows OS install support pack (required for Server 2008), I created the Dell system utility partition and installed Windows Server 2008 R2.
Later I decided that I wanted to try a single RAID 10 configuration. So under Windows Server 2008 R2, I used the native Windows Server Backup utility to create a backup with all the components required for a bare metal restore. Then I used the RAID BIOS environment to wipe out the old RAID configuration and create my RAID 10. Finally I restored the server by inserting the Server 2008 R2 installation DVD and doing a bare metal restore.
Empty System Utility Partition
That worked great, except… because I had wiped out the old disk configuration, and because Windows Server Backup doesn’t see the (hidden) Dell system utility partition, that partition was created, but not restored. Here’s the view in Disk Management after the restore:
In another test, I started the process from the Systems Build and Update DVD again. It wiped out all the partitions, re-created the Utility Partition, then asked for the Server 2008 R2 DVD. After I put that in, I got the “Install Now” button but there was no Repair option, so I couldn’t re-do my bare metal recovery. I had to reboot directly to the Server 2008 R2 DVD to get to the Repair option and do the bare metal recovery. Since the Dell Systems Build DVD wiped out all the partitions, I had to let Windows Restore re-create the partitions so it would have a place to restore Windows. That is, I had to leave “Format and repartition disks” checked. When it does that, guess what, it wipes out all the partitions (basically re-creating the MBR record from the backup), so the Dell Utility Partition is gone again. Possibly I could have unchecked “Format and repartition disks” and manually created partitions from the WinPE command line, but what if I don’t know the exact partition sizes for the Windows restore?
Can’t Fix from within Windows
Okay so I have an empty 32MB partition that is already set to type “DE” (Dell Utility Partition). Really all I need to do is get the Utility Partition contents back onto this pre-allocated but empty partition, right?
My first thought was to run this 32 Bit Diagnostics program, which includes an option to Update Existing Diagnostic Partition:
Unfortunately that gave the message “Update not possible – No Diagnostic Utility Partition was found or there was an error accessing the partition!”
Later I came to understand that the utility partition is set up with a custom boot sector, which the above utility probably does not recreate.
I thought maybe I could manipulate the partition under Windows, but I found that I could not even see the volume on the system utility partition from inside Windows. I blogged about that here: Diskpart Does Not See Volumes on OEM Partitions. I realized that I needed to be working in a WinPE environment.
UPINIT to the Rescue
Googling around, I came across the documentation on UPINIT, part of the Dell OpenManage Deployment Toolkit. This little 29MB download contains almost everything you need to populate a utility partition that was created when you did a Server 2008 bare metal restore.
UPINIT (Utility Partition Initialization) is a script that creates and populates the utility partition from an “image” (which in this case is really just a zip file renamed to have a .bin extension).
The UPINIT documentation says that it “ensures that no partitions are present on the target disk.” However by examining the UPINIT.BAT batch file, it looks like that only applies if you are not using the –overwrite parameter. If you ask it to overwrite, and it finds the utility partition, it should format it, set up the boot sector, and copy the image, without disrupting your other partitions.
Warning UPINIT calls diskpart to manipulate the partitions on your disk. What’s the worst that could happen? You could lose all the data on all your partitions. Have a complete backup before using UPINIT.
I do have a full backup, and I’m in a pre-production environment, so I decided to give it a try.
The one thing not included in the Deployment Toolkit is a 64-bit unzip.exe utility. I found that open-source InfoZip worked great:
Note that unz552xn-x64.exe is a self-extracting archive which contains the unzip.exe file you will need. You can run the self-extraction on a 64-bit system, or you can just open the downloaded file in WinZip, for example, and extract the unzip.exe file.
The basic procedure is to get the Deployment Toolkit and unzip.exe onto a USB stick, then to access that from the WinPE environment created by the Windows Server 2008 R2 installation DVD. Here are the details:
- Download the Dell OpenManage Deployment Toolkit and extract it to the root of a USB key, e.g. E:\. If you’d like to read the toolkit documentation, see the E:\Dell\Docs folder for PDF files.
- Copy the 64-bit unzip.exe (see above) to E:\dell\x64\Toolkit\Template\Scripts.
- Insert the USB key into a USB port on your server.
- Boot your server from the Window Server 2008 installation DVD. This puts you in the WinPE environment. I’m using Server 2008 R2 but I think this would work on non-R2 as well.
- Confirm the locale by clicking Next. You should see the Install Now button. Don’t click it!
- Press Shift-F10 to open a command prompt. This is where you will do the rest of the work.
- Change drives and inspect directories until you find your USB stick. Mine wound up on drive H:.
- Change to this directory on the USB stick:
- Type notepad TKENVSET.BAT to edit the file.
- Find the DT_DRIVE line and change it to point to the letter assigned to the USB stick (H: in my case):
- Find the DT_PATH line and change it to read as follows (adding \x64 to the path):
- Save the modified TKENVSET.BAT file.
- Run diskpart to confirm the disk number of your empty utility partition. I know from running Disk Management under Windows (first picture above), that it should be Disk 0. Run these commands to double-check:
select disk 0
select partition 1
You should see a 32MB RAW volume in the partition:
- Assuming you have the same 32MB partition that I do, and that it’s on Disk 0 like mine, run these two commands:
set UP_MOUNT=Z (This tells UPINIT to temporarily mount the utility partition on Z: rather than the default of H:, which is already in use)
upinit –disk=0 –size=32 –file=”H:\dell\x64\Toolkit\Systems\upimg.bin” –overwrite
Early in the process, you will see the message, “Fatal error in TKENVSET.BAT: Platform discovery failed.” This goes back to a missing HAPI driver, but it turns out that it is not needed for this process, so ignore that error. When the process completes, your screen should look like this, with the “Created Dell Utility Partition” message at the bottom:
- Time to test! Reboot the machine and press F10 during the system initialization. The system should boot into the utility partition with this brief menu:
From this point you can run the text-mode hardware and memory diagnostics.
MBR Patch Skipped
The one thing I was nervous about is that the UPINIT does not patch the MBR when the utility partition already exists (see line 271 of UPINIT.BAT). I have no idea what the sysdrmk 0 MBR command does, but fortunately it seems it was not needed in this case.
It seems like Dell could create a simple bootable CD (WinPE or Linux) that would reload the contents of an empty system partition after a Windows 2008 bare metal restore. Until they do, at least this workaround is available. Did it work for you?