Sonntag, 12. Oktober 2014

Restore Lenovo Recovery F11 Functionality

OH my god! I finally made it! It took me around 3 days and 2 nights ;-) but finally i could restore the Lenovo's F11 funtion at boot startup. First the facts about my system:

  • Lenovo X240 Laptop
  • preinstalled with Windows 8 Pro
  • i had no recovery media (CD/USB) but the Laptop still had the hidden Lenovo_Recovery partition

So i got this Lenovo X240 but the F11 function already didn't work. Also after playing aroung with it i made some stupid experiments with the Windows 8 so that it couldn't boot anymore. I had to reset windows AND i also absolutely wanted the F11 funtion to work! >;-)

OK, what you will need is a standard windows installation usb stick or something like it in order to be able to boot from it and start a command prompt (but not out of your running windows).

In Short:

First i installed Windows 8 from my install.wim file. Then i was able to create a recovery usb stick in Windows 8. I deleted the file PBR.txt and renamed PBRALL.txt to PBR.txt. I booted from the recovery media, opened command prompt and cleaned my disk with diskpart. Then i did the Windows Reset.

Note: Please backup all your needed files before going on. Please be aware of what you are doing. I can not answer all questions or take over the risks that may come with utilities like diskpart or imagex etc.

In Detail:


1. Recovery Partition Contents 

As i still had the hidden Lenovo_Recovery partition on the laptops harddrive i assigned the letter Q to the partition with diskpart:
select disk 0
select volume 4 (the one with label Lenovo_Recovery)
assign letter=Q
Now i was able to look into its contents to find the needed install.wim (and also a file PBRAll.txt).
If you dont have a recovery media you will need to create one. In order to be able to create an original recovery usb stick you will first need to do a reinstall of windows from this original install.wim file.


2. Installing Windows from Lenovo_Recovery partition

You can recover the original Windows and reset it to the default factory settings with the file install.wim on the Lenovo_Recovery partition. In order to do that you need the small programm imagex.exe (download). Boot from a windows install disc/usb-stick or something like that to be able to start a command prompt (not out of your running windows). Also put imagex.exe on the usb stick or somewhere where you can access it. Navigate to the folder where imagex.exe is located and type in following line into the command prompt:

imagex /apply q:\RecoveryImage\install.wim 1 c:\

The first path points to the folder where your install.wim is located and the path in the end is the (formatted) drive letter to where the install.wim is applied to. The number 1 is the mandatory index. The process might take around 15 minutes. After restarting your PC it should start with the recovered factory Windows 8.

Now you are able to create a recovery media with the standard windows procedure. Please create one. In my case i needed an at least 16 GB USB stick, i used a 32 GB stick.

Note: If the checkbox "Copy the recovery partition from the PC to the recovery drive" is greyed out you need to start command prompt and define the path to the Lenovo_Reovery partition folder where install.wim is located via the following line:

REAGENTC /SetOSImage /Path Q:\RecoveryImage\INSTALL.WIM /Index 1 

3. Adjust the Recovery USB stick

Open the recovery usb stick and find in the folder sources the files PBR.txt and PBRALL.txt. Now it is needed to delete file PBR.txt and rename PBRAll.txt to "PBR.txt". The same i did with the files ResetConfig.xml and ResetConfigAll.xml: Delete ResetConfig.xml and rename ResetConfigAll.xml to "ResetConfig.xml".

Alternatively you may just copy the contents from the "All"-file to the other file so that they are the same.

Attention: the original PBRALL.txt leaded to one error for me, so i had to rearrange it! I changed some lines but it still creates the same partitions. Here is the content of my final PBR.txt-script wich will be loaded via diskpart by the windows setup:
sel disk 0
convert gpt 
create partition Primary size=1000 ID=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 
gpt attributes=0x8000000000000001 assign letter=W format quick LABEL=WINRE_DRV 
create partition efi size=260 assign letter=S format quick fs=fat32 LABEL=SYSTEM_DRV 
create par msr size=128 
create partition primary noerr 
assign letter=t format quick LABEL=Windows8_OS 
shrink desired=23964
create partition Primary size=14796 ID=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 
gpt attributes=0x8000000000000001 
assign letter=Q format quick LABEL=Lenovo_Recovery
create partition primary set id=D3BFE2DE-3DAF-11DF-BA40-E3A556D89593 
gpt attributes=0x8000000000000001  
You may copy it like that into your PBR.txt. For me it worked like this without errors!
The next step now is to boot from the recovery media and reset windows to Lenovo factory default.


4. Reset Windows and your Lenovo Laptop to original factory defaults

Boot from the recovery media and open a command prompt. Start diskpart, select your harddrive (disk 0) and clean it (type in "clean"). Attention, you will loose all the contents of your harddrive so you should backup all your files before, if needed! Also i recommend to backup the original Lenovo_Recovery partition (Q:).
You may then do the following step:
Recreate the partitions from file CPP2SWDD.SCP with following line:
diskpart.exe /s H:\sources\Lenovo\SWDD\CPP2SWDD.SCP
H: is the drive letter of your usb stick. This will recreate all the needed partitions as they come from factory. Maybe this step is not needed but i did it anyways. I didn't make a try without it, but it also should work without this recreation-step. I also ran the file PBRLABEL.CMD. The advantage is that the drives letters are assigned now. Maybe the windows installation recognizes it?

Next step is to exit the command prompt and click "Reset Windows to its original status" or somehow like that it's called on the recovery media. It will ask you whether it shall recreate the original partitions or keep your own ones. Select "recreate original partitions" and then click on "delete only my files" and "Reset".

The Lenovo logo will now appear on a black screen and the reset procedure starts. It may took 15 minutes or more for me until it was finished but then your Laptop finally restarts with the original Lenovo Windows 8 and also on boot up the F11 funtionality is available again!! :-)

3 Kommentare:

  1. Please help me!
    Need your guide step by step to make or create a new Q drive Lenovo Recovery.
    in case I already did delete my Q drive cause of virus.
    Not know the first thing must to do, need you help.

    Thank You for the kindness

    AntwortenLöschen
  2. Thank you for documenting this. I was succesfull in restoring the lenovo recovery on a Thinkpad Tablet 2 with this information.

    AntwortenLöschen
  3. Fantastic post.. Actually i am looking to buy Lenovo Yoga 310 in cheap price. Kindly provide any deal related to it. So that I could buy.

    AntwortenLöschen