Support in other languages: 
Showing results for 
Search instead for 
Do you mean 
Reply
802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania

Prepare an usb thumb drive, to boot windows 7 or 8 in UEFI mode

[ Edited ]

Purpose of this post:
Prepare an usb thumb drive, to boot windows 7 in UEFI mode and install the system in pure UEFI mode.

 

Why am I writing this:

I had a hard time finding out how to make a custom installation of windows 7 in pure UEFI mode, and avoid using the factory restore disks. After hours of research, experiments etc I finally got the point and found a solution. And I'm happy to share my research with you. I hope this will be of help. If something is not clear, or more information is needed, I will be glad to explain things further.

 

History:
As most of you already know, BIOS was developed for PC in early eighties and has remained unchanged in recent years. But, since 2000, Intel started working on a new firmware interface, called Extensible Firmware Interface, abbreviated EFI. And since 2005 United EFI Forum has been handling the responsibility for development, management and promotion of UEFI specifications. Bigger companies like Intel, AMD, Microsoft and Dell have already started to bring out their products in accordance to UEFI standards which has more stable, secure and easier to use interface.

How does UEFI works (in a nutshell):
Once you power on the UEFI based PC, the Pre-EFI is executed which initializes only the CPU, memory and the chipset. This followed by Driver Execution Environment (DEX) where other hardware is initialized.

Advantages of UEFI:
    It can integrate various drivers this will not require to load during booting so saves time.
    PC can connect to network without OS.
    Also integrated drivers allow rendering GUI based control panel which out dates the old school bluish BIOS screen.
    Not all the installed hard drives are scanned as boot drive is set during the installation of OS in UFFI.
    Applications like anti-virus and diagnostic tools can be stored on virtually any non-volatile storage devices attached to a PC.

For a system to boot and install in UEFI the partition table of the HDD should be GPT (GUID Partition Table), not the old school MBR (master boot record). GPT has many advantages, can have virtually an unlimited number of partitions (windows will allow only 128) and impressively big partitions.

Since UEFI has a lot of advantages why not having a system install and boot in UEFI mode? AFAIK new Lenovo notebooks/netbooks are UEFI capable and OS’s are already installed in pure UEFI mode.

So, let’s go now to the point. Do you want to have more control over your HDD? Let say, you have a 320GB HDD and you have divided it in two partitions, one of 50GB, for your Windows 7, and the remaining for your data. If something goes wrong and you need to restore your system to factory default, with the recovery disks, it will wipe your partition scheme, set the system to default and this way your data will be lost.

You may want to make a “vanilla” installation of windows from a USB thumb drive and avoid using factory recovery disks. Now here things get complicated. A standard preparation of the USB with Microsoft’s software (Windows 7 USB/DVD Download Tool), or other tools, will give you a bios installation, not a UEFI one. So for the system to boot, you will need to change some settings in bios, and changing it from UEFI to legacy bios. The installation will prepare the HDD in MBR partition table, and you will lose all the advantages of UEFI, described above.

Now this can be avoided, by properly preparing an USB to boot and install in UEFI mode. Here are the steps:

 

Step by step tutorial:


1.    In a windows computer, download a legal copy (although trial) of the windows 7 os. You can do this from here: http://www.mydigitallife.info/official-windows-7-sp1-iso-from-digital-river/
Be sure to download the same version that came preinstalled in your computer. For example, if you have a Lenovo x120e, with a Windows 7 professional, 64bit, download an iso image of the Windows 7 professional 64bit.


2.    Once downloaded burn the iso to a USB thumb (at least 4GB) using Windows 7 USB/DVD Download Tool.


3.    After preparing this, create a folder on your computer, name it whatever (i.e. W7pro64bit). Go to the root of your USB

and select all the files and folders there (9 in total) copy, and paste to your folder you created, W7pro64bit.


4.    Using windows format the usb again in FAT32. Windows 7 USB/DVD Download tool, formats it in NTFS. We need a FAT32 formatted disk to achieve our goal. Formating again the USB in FAT32 will not touch the MBR of the USB thumbdrive. And after copying back the files (see step 6) the USB will still be bootable. (nice, and simple, isn't it?)


5.    Now go to the folder W7pro64bit and do the following:

 

a.    Browse to W7pro64bit\sources\ and open install.wim file. It’s a big file, and can be opened as an archive with 7zip (free software). Do not extract it, do not modify it, just browse the file with 7zip. Just to be sure you do not mess with that file, you can copy it somewhere else in your computer, and than procede.

 

b.    Browse this file (install.wim) to \1\Windows\Boot\EFI\ and locate the file bootmgfw.efi. Do not move, delete it, but just drag that file to the desktop. (if you have copied the file install.wim to another place in your computer, than you are safely do whatever you want with that file :smileyhappy: ) Close the 7zip program to release the install.wim file.

 

c.    Rename the file you just copied to the desktop from bootmgfw.efi to bootx64.efi.


d.    Now go back to w7pro64bit folder and browse \efi\Microsoft. Form there copy the folder boot and paste it one level up, on the folder: \efi. It will look like this: \efi\boot.


e.    Now copy the file you saved on your desktop and renamed (bootx64.efi) to \efi\boot (inside the boot folder you copied on step 5d

6.    Now go to the root of the folder W7pro64bit and select all folders and files (9 in total) copy, and paste all those files back to your USB thumb drive. (see step 4 for more info)


7.    Go to the computer that you are going to reinstall, and before restarting it, use the program ABR (activation backup and restore) to backup the license of your windows os. (use google to find ABR). Advanced Tokens Manager (ATM :smileyhappy: ) is great too. This link may be of help: Backup and restore W7 activation. After the program finishes its magic, it will create a few files inside the folder where the program itself reside. Copy these files to a new folder in your usb.  Rename it to ABR so you will quickly find it later. (if you decide to use ATM, the procedure may be a little different. But you are smart enough to figure out how to use it)


8.    Backup to an external storage all your data before continuing.(reminder: are you sure you saved the license as explained in step 7, to a safe place? To a external drive, to another computer? If you are sure, than go on with step 9) :smileyhappy:


9.    Now restart your laptop, and enter your bios settings. Go to the boot settings, and set the computer to boot in UEFI only. Not both, not UEFI first, or legacy, BUT UEFI only. Save and restart.


10.    Press f12 (or the corresponding key for your machine) to choose the boot device and chose to start from the USB thumb drive with your windows 7 pro 64 bit.


11.    If everything is done correctly, your computer will boot from the USB.


12.    Follow the wizard and choose a custom install, not upgrade. At the disk partition window delete all the partition you see there until you have only one unallocated space.


13.    Select it, and click next to install windows, without making partition in this point. The installer will create a GPT partition table not a MBR since the USB booted in UEFI mode.


14.    Immediately after the first restart remove your USB thumb, and the installation will continue from the HDD. Wait until installation finishes.


15.    When you will be finally on your desktop, on the installed OS plug your USB go to the ABR folder and click on restore.exe. It will restore your license and your copy of windows will be activated.


16.    Now you can go in computer management/disk management and shrink the HDD to create your partitioning scheme. Make sure to leave enough space to your windows os. (30gb or more for extra programs you will install at your choice)

 

17.      Download from lenovo.com thinkvantage system update and update your system. Windows update too can install all the necessary drivers, if you need only  basic drivers support.

 

Note: if tvsu will fail to work, see this:

http://forums.lenovo.com/t5/ThinkVantage-Technologies/ThinkVantage-System-Update-Servers-down-the-wh...

 

It may look a looong tutorial, but once you do this for the first time, it will look a piece of cake.

 

Final words:

From now on, you can install windows 7 in UEFI mode with your special USB without changing your partition scheme anymore. If you have a data partition beside your os partition (see the example above), when you reinstall the system using your USB thumb drive, at the disk partition window chose the partition where windows is installed, delete it, and reinstall windows to the unformatted area. Your partition with your data will be intact and the installation will automatically mount your data partition to the system. And, all the scope of this procedure, you will always have a pure UEFI installation of the system, with all its benefits.

Have fun!

abvasili

 

Moderator note: changed subject to match new content.  Was: Prepare an usb thumb drive, to boot windows 7 in UEFI mode

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
Paper Tape
seanare
Posts: 3
Registered: ‎11-23-2012
Location: Perth
0

Re: Prepare an usb thumb drive, to boot windows 8 in UEFI mode

Thank you, as I noted here, your post was the key to my getting a Windows 8 SecureBooting setup on a W530.

 

In the case of Windows 8, I needed to copy the files away, reformat my USB key as FAT32 and copy the files back, and viola I was able to boot from my USB install media with the BIOS set to only boot UEFI.  From there, there rest was easy (for Windows 8, the copying and renaming is not necessary, the key is having a FAT32 partition on the USB media, rather than an NTFS one; the EFI files are already in the right location).

 

Thank you again good sir.

Paper Tape
uhmellison
Posts: 1
Registered: ‎01-12-2013
Location: honolulu
0

Re: Prepare an usb thumb drive, to boot windows 7 in UEFI mode

I have followed all these steps but is not working. I took a usable usb boot copied it to my desktop. Copied the bootmgfw file. Changed its name. Moved the boot folder. Pasted the file. Formatted the usb for fat32. But when I try to launch in uefi only i just get a black screen.

802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania
0

Re: Prepare an usb thumb drive, to boot windows 7 in UEFI mode

Hi, I just saw your question. Did you find any solution?

 

If not, I'm not understanding what precisely you did... But can you try following the tutorial to letter and than report back again?

 

BR

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania
0

Re: Prepare an usb thumb drive, to boot windows 8 in UEFI mode


seanare wrote:

Thank you, as I noted here, your post was the key to my getting a Windows 8 SecureBooting setup on a W530.

 

In the case of Windows 8, I needed to copy the files away, reformat my USB key as FAT32 and copy the files back, and viola I was able to boot from my USB install media with the BIOS set to only boot UEFI.  From there, there rest was easy (for Windows 8, the copying and renaming is not necessary, the key is having a FAT32 partition on the USB media, rather than an NTFS one; the EFI files are already in the right location).

 

Thank you again good sir.


You are welcome... and I'm happy that the change of the file system helps with windows 8 too. Thanks for confirming that.

 

abvasili

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania
0

Re: Prepare an usb thumb drive, to boot windows 8 in UEFI mode

I kindly aks any admin here to help me updating the thread name and adding a phrase like: supporting windows 8 too... or something like that

 

thanks to everyone that could help me with this.

 

 

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania
0

Re: Prepare an usb thumb drive, to boot windows 8 in UEFI mode

Thank you Zoltan :smileyhappy:

 

 

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
What's DOS?
pLoubert
Posts: 1
Registered: ‎02-04-2013
Location: Montreal
0

Re: Prepare an usb thumb drive, to boot windows 7 or 8 in UEFI mode

How did you copy a 4.3GB file to a fat32 usb? The file size limit for fat32 is 2GB! Is there a missing step in your instructions? Because my install.wim file is 4.3GB!

802.11n
abvasili
Posts: 182
Registered: ‎11-10-2011
Location: Albania
0

Re: Prepare an usb thumb drive, to boot windows 7 or 8 in UEFI mode

Did you try actually copying the file? Or you are just asking? I never had a problem with that.

 

Try and please let me know.

 

:smileyhappy:

I'm just a volunteer. I like to help others where I can. Do my ideas work? I hope so. o_O
Who helped you today? Do not forget to thank him.
My hardware: TP x120e 0596-2ru. Windows 7, sp1, 64Bit, English, installed in UEFI mode.
Fanfold Paper
Cavaleiro
Posts: 8
Registered: ‎02-11-2013
Location: Portugal
0

Re: Prepare an usb thumb drive, to boot windows 7 or 8 in UEFI mode

You are just awesome!