I am assuming you have your
Linux live USB flash drive and your
Windows PE bootable thumb drive. You will also need a thumb drive large enough to accommodate your Dell Recovery Partition (see
this post to check its size). You will need a thumb drive with twice that size. My 12 GB somehow turned into 20 GB on my thumb drive. I am not sure if that is by design and part of the problem I encountered when trying to hack my factory reset (remember that I was not successful and that you are only trying this because you yourself have reached the bitter bottom of despair).
The idea is to backup the recovery partition to the external drive, format the hard drive, put the files back on it, and use Windows PE to restore the Dell Recovery image.
The instructions, for expert Linux users are all
here. They are for expert Linux users, so I will fill in the details.
We are going to do a lot of boot-up from usb drives and some from hard drive, so review
how to do that (scroll down to Boot from recovery USB - take 2)
First, boot into the Linux environment. To do that, insert the Linux Live USB into a USB port, and
only that one (otherwise, things can get complicated) and boot from USB.
You should see a friendly, green desktop appear, kind of Windowsy.
The first program you want to find and launch is the file explorer (called Nemo, if you must know).
You can launch the file explorer by clicking on its icon. It is the right-most green icon in the picture above, taken of the bottom left corner of the screen (the icon to the right of the black square icon). There is a way to make these icons bigger, but we are not going to use Mint for long so we'll live with it.
If you want more windows of the file explorer, just click on that icon again. Use the file explorer to navigate to your hard drive if you still have files on it that you want to save. Linux defines file systems a little differently, so it may take a bit of poking around before you see familiar files and folders.
Open a window for your back up media and drag anything you want to save over before proceeding. That takes place of step 00 in the
instructions for experts.
Since you are in file explorer, navigate to the external storage device that is big enough to put the contents of the recovery partition and create a folder called "dellrecovery". Next navigate to the root of the hard drive and create a folder there called "recoverypartition".
The next step is to backup the contents of the recovery partition on your hard drive to the folder you just created. We have to be careful with this step and it involves some hacking. The reason you can't just drag files from the recovery partition to your dellrecovery folder using the file manager is because 1) the recovery partition, being unnamed (unless you mucked around with it) does not show up and 2) we want to ensure that we copy
everything and preserve their nature. That includes hidden files. There are Linux copy command flags that will catch all the hidden files and that will ensure that files permissions are preserved.
You need to open a command prompt, called "terminal" in Linux. Because it is used a lot by Linux users, there is a clickable icon for it. It is the black square right to the left of the file explorer. You get a new window every time you click on it.
For now open one terminal window. First, we need to mount the recovery partition. In order to be able to copy the files over, Linux is going to kind of copy the files that are in the recovery partition ot the recoverypartition folder you just created. Linux does not really copy anything over, but it will look like that to you. The contents of the recovery partition will show up in the recoverypartition folder once you type the command we are going to put together next.
Before you can put together the command, you need some info. We are going to get it from the Linux equivalent of Disk Management. In Linux, we use the program called "GParted". Click on the menu button and search for gparted. That part of the OS works a lot like Windows 7. GParted will show up among the programs. Click to open it and let it do its scanning.
GParted looks like this
What we are particularly interested in is the left most column that has items that read like "/dev/sda1". "dev" stands for device. "sda" refers to a hard drive. "sdb" (if present) often refers to an external storage device (or it may be a second hard drive). If you have lots of stuff plugged in, you could also see an "sdc".
Compare this output to the outputs you had from Disk Manager in Windows. If you do not have that, the size of each drive is a clue. Your goal is to find the device number for the partition on your hard drive where you created the recoverypartiton folder (i.e. "sda1").
Next, you need to determine the path to the folder on your external storage where you created your dellrecovery folder. You can read off that path from the file manager. Using the file manager, navigate to the recoverypartition folder. Go as far as to open that folder. Here is an example:
Find the button on the right I have highlighted and click on it. An address bar magically appears with something like:
/media/axk55/52987BC4987BA55F/Recovery
in it (yours will be different and will end with /recoverypartition if you faithfully followed the instructions up 'till now).
This is what you will need for the next step.
Now go to your terminal window and type
sudo mount /dev/sda1 /media/axk55/52987BC4987BA55F/Recovery
Except you need to customize it. Instead of "sda1", put the device number you noted earlier. And instead of the /media/axk55/.... path, use the one from the file manager. You can copy and paste, using the right button of the mouse (ctrl V does not work in the terminal window).
Hit enter. It may prompt you for a password, if you set one up (sudo gives you administrator rights on the command). Look on your desktop, a new drive should appear, called "recoverypartition" (I named mine Recovery instead). You can click on it to view the contents (empty at the moment).
Now we are ready to copy the files from the recovery partition into the Dellrecovery folder on the external storage device. My preferred method is to navigate to the destination folder (Dellrecovery) and then copy things over.
Open a new file manager window and use it to navigate to your Dellrecovery folder. Again, click on the magic button to get the patch to that folder. For instance, say it is:
/media/axk55/myflashdrive/Dellrecovery
In the terminal window, type:
cd /media/axk55/myflashdrive/Dellrecovery
Now you are in the Dellrecovery folder. You can check that by typing
pwd
The output should be the path to your current folder (/media/axk55/myflashdrive/Dellrecovery).
Now we do the copying. You should still have that path to the recoverypartition folder, the one we used in the mounting process. Type the command
sudo cp -Rfpv /media/axk55/52987BC4987BA55F/Recovery/ .
Notice I added a / at the end of the path. It's safer to do that, though in most cases, not absolutely necessary. Make sure to type the "." at the end of the command (with a space between the / and the .). The dot tells Linux to copy the contents of /media/axk55/52987BC4987BA55F/Recovery to your current location (in other words, "." stands for "here").
If you must know: sudo puts you again in administrator mode, cp means "copy", and -Rfpv are flags that tell Linux to copy absolutely everything without messing with any file settings and also to let you know what is going on. Then you have the path to what you want to copy and with ".", you are telling where to put that (in your current folder).
There will be output to the terminal so you know that stuff is getting copied over. Large files will take longer so at times, it will appear to pause. Give it a few minutes to finish. When it is done, the command prompt will reappear with a blinking cursor. And we have backed up the recovery partition.