Here’s a summary of my experience in setting up a customized non-factory image of already installed Windows 7 into the recovery partition of a Dell laptop. This image can be accessed with Dell Datasafe local backup software on boot time F8 key (Windows Recovery environment).
You can probably use many of the steps in the post modified to do the following:
- Your internal HDD died and you want to restore your factory state from recovery DVD to a new HDD
- You want to replace the internal Dell laptop hard disc with a new HDD or SSD and want to move your OS and recovery partitions to the new HDD/SSD
- You want to create a recovery partition and image for your custom built PC
The premise:
I have an old Dell Inspiron laptop that I bought 5 years back with Windows Vista Homepremium installed as factory OS. I was so frustrated with vista that I purchased Windows 7 Prof upgrade on the day it was released in 2009. Although it was upgrade, I couldn't install it as upgrade since it was Prof version and Microsoft allowed a way to clean install it. I have formatted the HDD and did the full clean install of the Windows 7 Prof. Now, I don’t have a recovery partition or factory state image or anything. So on a system disaster, I can’t restore to a factory state.
This is an attempt to put back the Dell Datasafe recovery software tools from one of my other laptops; the donor laptop (XPS15z), and replace the donor factory image with the Inspiron Win7 prof customized system image. It is like a transplant of Dell Datasafe software and partition content from a working PC to the new PC, except for the actual factory image.
This is an attempt to put back the Dell Datasafe recovery software tools from one of my other laptops; the donor laptop (XPS15z), and replace the donor factory image with the Inspiron Win7 prof customized system image. It is like a transplant of Dell Datasafe software and partition content from a working PC to the new PC, except for the actual factory image.
Now I can use F8 key to go to recovery, use Dell Datasafe recovery and restore to a system image state that I have customized. This system image is now on the recovery partition. Recovery partition is now the active partition containing bootmgr and BCD. Hence it is convenient to format the C- drive at any time without losing the recovery environment, ‘bootmgr missing’ or ‘no bootable device’ errors.
The Windows installed may be
- A clean install from a Windows 7 disc or
- An image of your official Dell factory installation + your software already installed on top of the factory Windows 7. This is especially useful when you do a factory reset. Now the obvious advantage is that you don’t need to install all your software and Windows updates again after the restore saving considerable amount of time. Also you can remove all the bloatwares in the official Dell factory image and keep in lean and clean. This means, you get the customized, efficient and productive version of Windows 7 for your need by a simple 30min factory restore from F8 key.
Basic tools needed:
- Intact Dell Datasafe recovery partition of a donor Dell laptop.(Should match 32/64bit OS). If you lost the recovery partition, the recovery DVD contents would be sufficient
- Hirens BootCD (HBCD)
- An external NTFS formatted USB hard disk with space to store big size files (~20GB single file)
- A Windows 7 installation/recovery disk
Step1) Copy recovery partition from donor laptop (XPS15z) to a folder in external USB HDD
- Plug your USB hard disk to the donor laptop
- Power on your laptop and boot with HBCD (Make your CD drive as the first boot device by changing the setting in your BIOS)
- Load mini Windows XP (Your partition letters may be changed. Recognize correct partition by looking at the contents of the partition)
- Copy all the content of the recovery partition to a folder in your external USB HDD
- Once done, power down donor laptop and eject the CD and external HDD. You don’t need the donor laptop anymore.
Step2) Image the C drive OS of the recipient laptop
- Plug your USB hard disk to the recipient laptop
- Power on your recipient laptop and boot with HBCD (Make your CD drive as the first boot device by changing the setting in your BIOS)
- Now OS partition imaging: From HBCD menu, open GUI for ImageX (GImageX)
- In the capture tab select source (your OS installed partiton)
- Select destination to your external HDD and give a file name.
- You may leave other in default settings. Optionally, you have choice to select the compression level etc.
- Let it run. It’ll take some time to complete. 1 or 2 hrs depending on your CPU speed, compression level and size of your Windows installation. This will create a .wim file which contains all the required installation of your OS.
- In this step, you have created backup of your OS partition on your external HDD and now you have everything in your laptop saved. (Assuming, you had only C partition) You are safe to format the entire laptop HDD. Continue to the next stage...
Step3) Recipient HDD repartitioning: Format and repartition your HDD according to your need
- Run Partition Wizard Home Edition (Available on Hiren’s BootCD menu).
- Format your hard disk/partitions and re-partition as below. Make them as primary partitions. Or else you cant make the partition as active.
- Recovery partition: 20-25 GB depending on how much software you expect to install. Assign a letter ‘R’ for convenience. (20GB is the minimum I would suggest; You may use higher compression if you are crammed for space)
- OS partition: 60 GB seems to be sufficient for Win7. Make it bigger if you want to install a ton of heavy software and want to keep more system restore points of C: drive for Windows System recovery and restore.
- Make rest of the space to D: partition or whatever way you want. This can be logical, I guess.
- Make recovery partition as the active partition
- Apply the changes and make sure it’s all done successfully
Step4) Copy the recovery partition contents and replace the factory image
- Now copy the donor recovery partition contents from your external HDD to the newly created recovery partition in your recipient laptop.
- Go to R:\preload and replace the base.wim file with the .wim image you captured in the first step
- There is a file named 'CSP.DAT' in the same directory. Open it with notepad++ and change the ‘Disk_Size’ value to the total size of your recipient HDD in bytes. If you don’t change this, Dell Datasafe will give error saying that you don’t have sufficient space on your hard disk. “Your hard drive size is not supported for this process. Please use a hard drive at least 689 GB in size”. This size is the size of your donor HDD. I used Partition Wizard Home Edition, looked up the HDD size in GB and put that in an online GB to Bytes conversion tool to calculate the size in bytes.
- Now check whether these files are present on the proper locations in your recovery partition.
R:\Recovery\WinRE\Winre.wim
R:\Recovery\WinRE\boot.sdi
R:\Boot\BCD
R:\bootmgr
- Now put your OS image back to the C: drive using imageX GUI. From HBCD menu, open GUI for ImageX (GImageX)
- In the ‘Apply’ tab select source (either the .wim file in your recovery partition or in the external HDD)
- Select destination to C drive (Select proper partition, not based on drive letter) and run it
- This will re-image the Windows OS into C drive. Let it run. It’ll take some time to complete. 1 or 2 hrs depending on your CPU speed, compression level and size of your Windows installation.
- Now the recovery partition is ready and OS is ready, but the boot configuration data may not be proper. Fix it in the next step
Step5) Recreate the BCD for the new laptop: The BCD from your donor could be pointing to different volume. We need to fix it
- Boot the OS with any windows recovery disk.
- Select repair to fix the BCD. It’ll scan an try ti fix it. If it didn’t work the first time, try again
- Remove the recovery DVD and reboot
- If everything worked fine, you’ll boot to the old Windows installation at the exact point you left
- Now we need to fix the Dell Datasafe Recovery environment on F8. Go to next step.
Step6) F8 key setup and fix the Dell Datasafe backup recovery environment
- On your Windows 7, install a free software Visual BCD editor. (http://www.boyans.net/)
- Run the software and edit as below.
‘Windows Recovery environment’ element paths to
R:\Recovery\WinRE\Winre.wim
R:\Recovery\WinRE\boot.sdi
Ramdisk Devise options path to
R:\Recovery\WinRE\boot.sdi
(BCD editing is not simple for a novice. I had to spent a couple of days learning about BCD and how to edit them. I’ll probably put a nice tutorial for that some day)
Now when rebooting, if you press F8, you should see a ‘Repair Windows’ option. If you chose that ‘Windows is loading files..’ progress bar will be shown followed with ‘Starting Windows’ animation. Then you select the keyboard, login with the username/password and at the end you should see the Windows advanced repair options. At the bottom, you can see the Dell Datasafe Backup. Click that and you’ll enter into the software options. You can see a factory image there. It’ll be actually the image you created in the beginning, your custom Windows 7 OS image! You can test whether the recovery works by going ahead and doing a factory format again, but now using the Dell Datasafe software insted of ImageX.
You may hide the recovery partition using Disk Management Utility (Just remove the drive letter) or Partition Wizard software.
This was a fun DIY project I did it over a couple of weeks when I had some free time. It was a very good learning and also quite fun to tweak the software settings to get what I wanted. Hopefully this will help someone. Let me know your feedback.
Some Tips:
- You can open the factory image or any .wim fies with 7-zip free software. So you can extract any specific driver or files from the image.
- Recovery partition contain 'bootmgr' and BCD file. It's safe to be that way. The active partition should be the recovery partition for this to work. In the boot sequence when you power-on laptop, the BIOS looks for a bootable device, finds HDD, looks at MBR, looks for active partition and 'bootmgr' contained in it. Now bootmgr gets BCD entries, BCD points to C drive and finally the OS loads with winload.exe.
- Apparently, this method should work for any Windows PC... it need not be a Dell PC.
Disclaimer:This is an outline of my experience with a single laptop. YMMV. There may be many other ways to do it. And may be some of these steps are done in an easier way. Do your home work and know what you are doing. As always, use Google wisely to gather more information before you do anything drastic. Have all your data baked up and have plenty of time to do the exercise. I don’t guarantee that this would work in all situations. Take this post as an outline for your needs. You may get some hints from the work-flow I followed.
nice method
ReplyDeleteThanks Larry
DeleteI hope, you to upload a video tutorial.
ReplyDeletebecause I DellDataSelf broken and tried to install windows with the DVD, there is a warning windows setup colud not configure
This helped me restore a Dell laptop vostro 3550 to a factory condition after a hard drive replacement. Another source in addition to this blog which helps you understand the BCD is http://forum.notebookreview.com/dell-xps-studio-xps/623144-if-i-reinstall-windows-dell-xps-15-will-i-lose-f8-recovery-2.html
ReplyDelete