In a recent issue of our popular weekly IT pro newsletter WServerNews we included the following Ask Our Readers request from a reader named Wlad:
“Would it be possible to pose the following question to ask on our readers forum? I have spent last month researching the issue and I’m more confused than ever. I want to create a “rescue disk” for several systems I use, starting with Windows 7 and ending with Windows 10. What I have in mind is a single USB HDD for each system. The drive would be formatted as a “bootable USB” first (whatever that means, I found a dozen different descriptions) and then further partitioned to include a secondary, non-bootable partition. On that second partition I want to create the computer’s HDD clone, but not in the form of the USB HDD being a clone of the computer HDD, but the USB HDD containing a file (or a filesystem) that is an exact clone of the source HDD. Let us call it a “total HDD image.” The goal is to have a single USB HDD that, in case of emergency (WannaCry?) I could connect to the computer in distress, boot from, and then restore the entire HDD from the total HDD image backup. The aim is to restore everything, bit for bit (boot bootstrap, system, Windows files, installed programs, user data, EVERYTHING). Has anybody done this? Could it even be done or am I chasing an impossible dream? Microsoft is not helping with their constant “improvements” of backup and recovery mechanisms and associated mess of confusing terms that have changing meaning over time (like a system backup that may or may not include non-MS applications).”
In the following week’s newsletter several readers of our newsletter offered some suggestions on how Wlad might implement a solution that could meet his needs. One of our readers, though, was helpful enough to provide us with a detailed step-by-step procedure on how one can build a single rescue disk that you can use to boot and restore multiple different versions of Windows. That reader was Mark Van Noy, a Technical Lead/Architect at the University of Colorado Boulder in the Greater Denver Area (and someone we have spoken with before). Mark considers himself an Information Technology generalist who thrives on architecting new tools and services in ways that allow his customers to realize gains in efficiency, productivity, and cost savings while ensuring that IT remains a division that provides a competitive advantage. Let’s now listen as Mark explains how to address the problem Wlad describes.
Good afternoon, Mitch, I think I can help Wlad accomplish exactly what he wants to do. I will break things out in steps to make things easier to follow. I am also trying to be brief since this is a newsletter. The good news is that there is no software to buy! Here is the procedure:
Note that using DISM’s /Apply-Image option to restore a .wim to a hard drive will not re-create the partitions.
Below I will show you a sample batch script named Go.cmd that we have used to image various computers. This script uses a text file named Partitioning.txt, which contains the Diskpart commands needed to automate steps 3-5 of the process shown above.
Finally, I will also mention that the .wim format is what Microsoft uses to ship Windows since Windows Vista, making it a reasonably robust technology.
REM Script deploys an image from a .wim file
REM !!!!!DESTRUCTIVE PROCESS!!!!!
REM Configure the disk to one Main partition and one scratch, format, set as active
REM !!!!!DESTRUCTIVE PROCESS!!!!!
diskpart /s .\Partitioning.txt
REM Apply the image (Assumes image is in the same directory as this script)
REM Restore the Sysprepped Image to both the C and D drives.
DISM /Apply-Image /ImageFile:Spring2017_Sysprep.wim /Index:1 /ApplyDir:C:\ /CheckIntegrity
DISM /Apply-Image /ImageFile:Spring2017_Sysprep.wim /Index:2 /ApplyDir:E:\ /CheckIntegrity
sel disk 0
create part pri size=463053
create part pri
sel part 1
format FS=NTFS Label=Windows10 Quick
sel part 2
format FS=NTFS Label=Scratch Quick
Microsoft TechNet has a Command-Line Reference section where you can learn more about the syntax of the Diskpart and DISM commands for Windows 7 and Windows 8.1. For Windows 10 you can refer to the Windows Commands section of the Windows Server 2016 documentation found on the Windows IT Center. See also the article UEFI/GPT-based hard drive partitions on the Microsoft Hardware Dev Center for more information about using Diskpart with Windows 10. And see also the articles DISM Image Management Command-Line Options on MSDN and Create and Manage a Windows Image Using DISM on the Microsoft Hardware Dev Center for more information about using DISM with Windows 10.
Photo credit: Flickr / James Loesch
Organizations looking to unite application developers, security teams, and IT operations must implement DevSecOps best…
Our Microsoft 365 administration series continues with more on configuring Microsoft Teams. In this article,…
GFI FaxMaker is a powerful and complete solution that should meet the requirements of every…
There’s no rule that says that you have to make use of port ACLs, but…
If the cloud doesn't seem right and buying a server costs too much, maybe network…