Saturday, April 9, 2016

Forcing a factory reset on a Dell computer - Performing the factory reset

If you still have the recovery partition intact on your disk, this will allow you (if it works), to force restore it to your had drive. You do not need this hack if you have a working Windows with a factory reset option that shows up, or if when you hit F8, either upon first or second reboot, you get the option to do a factory reset.

I am going to assume that you are reading this because all the easy ways to do the factory reset have failed.

To be safe, first back up your recovery partition, and anything else you want to keep. Doing a factory reset will delete your files on the hard drive.

You will need a Windows PE bootable flash drive. Instructions on how to make one here.

Once you have a bootable flash drive, it's pretty easy, if things work correctly.

Plug your Windows PE flash drive into a USB port and restart the computer. When the Dell logo appears, press F12 repeatedly until a boot menu appears. If you do not have a LEGACY BOOT menu, try to enable legacy boot options (see "Boot from recovery USB - take 3" on this post). If your USB Storage Device is not listed on the LEGACY BOOT menu, it means there is a problem with your Windows PE bootable flash drive (it is not bootable).


Use the arrow keys to select USB storage Device then hit [Enter].

Windows PE will start. At first it looks just like a Windows 7 installation (with the Windows is loading files bar, then the Windows is starting screen), but eventually, it opens to a grey background and a big command prompt window. Wait until the initialization command finishes and you have a blinking cursor at the prompt.

We are going to use a single imagex command to start the factory reset. Dell made what is called an image of the system. The original OS, all the settings, drivers, programs etc... that came with the computer are all packaged into a file called factory.wim. For newer systems, the image is so large that it gets split up. You may have a factory.wim, factory2.wim, factory3.wim. The first file, factory.wim is the one we need to launch. That file resides in the recovery partition, in the folder \dell\image. The rest of the recovery partition contains supporting scripts and files. The picture below is just to show you what is in the \dell\image folder (if you really want to know).


You need to know two things: 1) where you want to restore the OS and 2) where the factory.wim file is.

In a previous post, I covered how to backup the partition to an external storage device. If you have destroyed all the data on your hard drive and no longer have the recovery partition (but do have the backup), then you will need to transfer these files back to the hard drive first. This will be covered in subsequent posts.

To check whether you have a recovery partition on your drive and to assign a letter to it (if needed), see this post.

Now I am assuming your hard drive is properly formatted and has a partition ready to receive the OS. If it does not, you will have to prepare your hard drive first (again to be covered in subsequent posts).

You can use DiskPart (see this post) to find out what letter was assigned to the partition where the OS goes. If you have not messed with your hard drive too much yet, the partition labeled "OS" and with "boot" under Info is the one you want to restore the image to. Usually, that will be the C partition. But do make sure before proceeding.

I am going to assume you have your recovery files in the volume labeled as R. Exit DiskPart before proceeding.

To summarize: recovery files in R, OS goes on C. Insert your own letters and edit the imaging command below accordingly.

You may have read elsewhere that imagex is in the tools folder and that it needs to be ran from there. With the flash drive we created, that is not true and not necessary.

Give it a shot. type:
imagex

That will bring up a list of instructions on how to use imagex (but won't actually perform any task).


Ready? run the command (Remember to substitute the proper letters):
imagex /apply r:\dell\image\factory.wim 1 c:\

The process should start. I have a bunch of crap on the screenshot below because I ran the command wrong at first. If you get a bunch of output telling you how to use imagex instead of an "Applying progress" status, it means you typed the command wrong. Double check it. In my case, I forgot to type the "1". After I fixed that mistake, the process ran. A tip from Linux: if you do type the command wrong at first, hit the up arrow. It will bring back the command you typed originally and you can edit it, instead of retyping the whole thing.


Aaaand in my case it failed. I hope you have better luck, or that this at least got you closer to where you needed to be.

Hmm and it failed with Office15, which I don't even want. Bummer.

No comments:

Post a Comment