Has your friend just asked you to re-install windows for the 4th time? Or maybe your company has checkout laptops that need to keep a static image…. You ever wish that you could take a snapshot of your PC and capture that moment when everything was setup perfectly so you can restore it easily with just a few keystrokes? After all, a lot of the major Laptop manufacturers have such a recovery partition…why can’t we create our own custom restore image?
This is actually a project that I’ve been wanting to write about for awhile now, but I always seemed to hit a dead-end when trying to figure this one out on my own. Thankfully, Steve over at rmprepusb.com has figured out a way to make setting up your own custom recovery partition as simple as possible – both setting it up and creating/restoring the image! No need to re-image your PC or buy expensive software – In fact you can have your custom recovery partition setup within an hour!
Below is a great video detailing the process, courtesy of Britec09.
While the video does a great job of covering the essentials to get you started, I wanted to cover the process myself and highlight some of the great features and customizble options available when setting this up. For instance, Don’t like the default boot image? We can change it! Want to hide the boot prompt from your end users? We can do that to. I’m also going to highlight a few roadblocks I ran into during my test installs, hopefully saving you a a bit of trouble.
Disclaimer! I highly recommend that you start out working with a PC image you can afford to lose. I have tested the below method to be working and functional in Windows XP, but ran into a few issues working with Windows 7 – namely images that were deployed via network installs or in virtual-box. Please take care to test the process before you implement this on your target machine!
You have been warned!
Create Your Recovery Partition
First things first, We need to create a separate partition for our Recovery Image & CloneZilla to reside.
In Windows 7…
1.) Start > R-Click “Computer” > Manage
2.) Select: Storage > Disk Management
3.) On your main OS Drive, R-Click and select “Shrink Volume“
4.) Adjust the size of the shrink job to accommodate your backup image.
If your used space on your C:\ drive is 18gb, shrink your volume by ~20gb just to be safe. It is important to note also, that these numbers do not reflect Clonezillas final compression of your backup image!
5.) Next, We will need to format the volume.
>>> R-Click on the free space and select “New Simple Volume”
6.) Finally, Click through the prompts to format your new recovery partition.
I’ve left file and folder compression unchecked intentionally, simply because I know that CloneZilla will compress the backup image. I didn’t deem a slight increase in compression worth any stability issues that I may have encountered having 2 different forms of compression ( Windows partition compression & Clonezillas image compression). Probably me just being paranoid..but better safe than sorry when it comes to your data. 😀
In Windows XP
If you are using Windows XP, You will need to use the free EaseUS Partitioning Tool. Usually I would take the time to document the process…but once you run the tool, it should be pretty intuitive to figure out how to re-size your current partition and create your new recovery partition. That being said, If anyone runs into trouble here – let me know and I’ll update the post with some nice screenshots and directions 🙂
[/learn_more][learn_more caption=”Step 2 – Downloading The Required Software”]
Downloading the Required Software
There are 3 downloads you will need before we can get started…
- CloneZillaBackup.Zip – (At the very bottom of the page)
- Winrar or 7-zip
- CloneZilla Live Files – (.Zip file preferably)
If you are not Sure which Clonezilla version to download, the below information should help.
Single Core CPU. (Does not support PAE, Multi-Core, Hyper-threading or multi-processor)
Compatible on PC’s with AMD64, intel 64 or VIA Nano processors. Also compatible with Xen Hypervisor.
Requires one more processors that support PAE ( Physical Address Extension ). Below is a list of support CPU’s
AMD Geode NX
AMD Athlon (K7)
***For Most modern PC’s, you will want use the i686 Download of CloneZilla![/learn_more][learn_more caption=”Step 3 – Installing Grub4Dos & CloneZilla”]
Installing Grub4Dos & CloneZilla On Your Recovery Partition
If you haven’t already installed Winrar or 7-zip go ahead and do so now.
You should also have the x2 following .zip files downloaded as well.
1.) First we simply need to extract the contents of the CloneZillaBackup.zip file to our recovery partition.
2.) Next, we need to extract the “live” folder from our clonezilla-live.zip file and place it @ Z:\clonezilla.
3.) Now that our recovery partition folder structure is all set, we need to install the grub4dos boot menu. Simply run the InstallGrub4dos.cmd command and hit ‘y’ at the prompt to install it.
(In Windows 7 – Run as administrator)
4.) Finally, we need to reboot the machine and make sure the splash screen comes up properly and we are able to boot back into our Windows OS still. If you encounter any issues after the reboot, please take a look at the Troubleshooting section later on in this guide!
Upon successfully rebooting back into Windows, I recommend running the “hide.cmd” command to hide the important recovery partition system files from the end users. I also highly recommend checking out the Additional Features section if you would like to modify the splash image, change the splash screen timeout, etc.[/learn_more][learn_more caption=”Step 4 – Backup Your Image”]
Backup Your Image
1.) On your new splash screen, select option 2.
2.) After a few moments you will be prompted to name your backup image.
3.) That is it! It will take about 10-15 minutes to create your recovery image
(now is a great time to grab a beer)
When the backup is done, it will reside on your recovery drive @ Z:\clonezilla\images
For what it is worth, Clonezilla compressed my 10.6gb Windows 7 image down to 3.4gb! Your mileage may vary here, so I would start with a larger partition if possible and shrink the volume to suite your needs.[/learn_more][learn_more caption=”Step 5 – Restore Your Image”]
Restore Your Image
1.) At the splash screen, hit F6 to restore an image.
2.) Next, select an image to recover.
3.) After a few moments, Clonezilla will begin the recovery process of your image.
That should be it! The recovery process will vary depending on the size of your initial backup image, but expect it to take ~10 minutes. When it is done, it should reboot and load Windows.[/learn_more][learn_more caption=”Additional Features”]
Most of the below modifications come to you courtesy of rmprepusb.com. I encourage you to check out the original authors tutorial for additional tips & tricks and to check out their huge library of other helpful Tutorials!
Cleaning up the Splash Screen
Copy & Paste following lines of code to the top of your menu.lst file.
# removes the heading & version info. Copy and paste the below so you get the correct spacing!
write (md)0x220+1 !BAT\necho -n -P:0000 $ \0
# The command parameters 0 0 0 0 0 0 0 0 sets a 0 size border. Removing the border.
/clonezilla/menusetting.gz 0 0 0 0 0 0 0 0
If you want the menu entries to be invisible to the end user, You can also add the following line:
# set menu colors - white normal menu text, purple highlighted, green heading, white console text, black menu border
color normal=31 highlight=0x75 helptext=0x1D heading=0x0A standard=0x0F border=0x00
#Change the above lines in menu.lst to....
#set black text on black background so user will not see countdown timer or menu text
However, it is important to note that the black text will still be visible against a non-black background. I am working with the author currently to remedy this, but in the mean time – I have found that creating a background image with a logo in the center and a black background where the menu text would be will make the menu text essentially invisible to the end user.
Here is an example of the splash screen I setup for my Moms PC, using the above changes. The idea is that now whenever she says her pc image is trashed, I can just tell her ” Ok ma, just reboot your pc and hit F6 when you see the robot”. Tested this in Windows XP and it worked beautifully!
(For best results – use a 800×600 pixel image.)
Change Splash Image
1.) Create a .bmp image in the \Clonezilla\ folder.
2.) Change the following lines in menu.lst to reflect your image name.
if "%GM%"=="800_32" graphicsmode -1 800 100:1000 24:32 && splashimage /clonezilla/YOUR_IMAGE_HERE.BMP
if "%GM%"=="800_16" graphicsmode -1 800 100:1000 16 && splashimage /clonezilla/YOUR_IMAGE_HERE.BMP
Change Splash Screen Timeout
Change the timeout value in menu.lst
Hide your Recovery Partition
To hide your recovery partition, you can use the free for home use version of EaseUS Partition Master Tool.
In Windows 7: If you encounter the below after a failed restore operation….
You can boot to the windows recovery CD, Select Repair and choose command prompt.
Then run the following:
bootrec.exe /fixboot (may return an 'Eliment not found' message)
Or, If you encounter a grub command prompt after reboot, type in the following:
find --set-root /menu.lst
If you encounter the grub command prompt during every reboot, you will need to copy the menu.lst file from your recovery partition to the root of your C:\ drive.
If you encounter any other errors/issues along the way – please feel free to leave me a comment below or @ the original authors blog via rmprepusb.com.[/learn_more]