Create Bootable Windows Server USB Thumb Drive for Installing OS

Argomenti vari di carattere sistemistico
Post Reply
daniele
Posts: 327
Joined: 04 Mar 2009, 13:59

Create Bootable Windows Server USB Thumb Drive for Installing OS

Post by daniele »

The UEFI "problem"

It is quite standard nowadays for a new server to have a very big startup drive, unless you're using SSD server drivers, which will probably be smaller than 2TB.
BUT, if you're using a disk bigger than 2TB you must use UEFI instead than legacy BIOS for booting your operating systems.

SO, there is one fundamental prerequisite in order to have a bootable usb key in a UEFI environment: the usb key must be formatted in FAT32 (NOT NTFS, which is not compatible with UEFI.

The following guidelines are from this original article: https://itproguru.com/expert/2016/05/cr ... alling-os/
ALL RIGHTS RESERVED TO THE ORIGINAL AUTHOR(S) OF THE ARTICLE(S)



1) Double-click the ISO file to mount it (or mount the ISO) and make note of the drive letter. In my case it is drive I:
2) Put in the USB Thumb Drive Key in the computer and make note of the drive letter and the size of the disk. In my case it is D: and 16gb You will likely need at least an 8gb drive as the bits will require 4.9gb.

3) You need to run an elevated command prompt. Start | type cmd | Right-click cmd (top of menu) | Run as Administrator (accept the elevation request)

URGENT NOTE: The following commands will completely wipe out your disk without warning so make sure you select the proper disk. I strongly recommend you have a good backup before running. I also recommend you disconnect all external drives to limit possible mistakes.



4) Next you will run Diskpart to prepare the disk for the OS {question mark “?” below should be replaced with the disk number of the drive you are using}


diskpart

list disk

select disk ?

list disk

— Note: after you run list disk again, the drive should be prefaced with an asterisks “*”

— CAUTION: the next line is the one that wipes the drive

clean

create partition primary

select partition 1

active

format fs=fat32 quick label=”2016TP5”

exit


Leaving DiskPart…


5) Now we need to copy the boot sector. You should still be in the command prompt window

{Note: replace the I: below with your mounted ISO drive letter}

I: (replace I: with the letter of the mounted Windows Server ISO installation disk mounted)

cd boot

— Note: Run “bootsect /help” for detailed usage instructions.

bootsect /nt60 e:



Target volumes will be updated with BOOTMGR compatible bootcode.

Bootcode was successfully updated on all targeted volumes.



If you get an error message similar to below… you may need to close any open windows with that drive and try again. You could also use the /force switch if you prefer.

Updated NTFS filesystem bootcode. The update may be unreliable since the
volume could not be locked during the update:
Access is denied.

(This usually happens when the drive is open when trying to transfer boot sector)


6) Now we just need to copy files… (You should still be in the DOS window)

Run the xCopy command to copy all files… replace drive letters below with your drive letters

xcopy I:\*.* D:\ /E /H /F

— NOTE: when it copies the install.wim file it will take a very long time. This file is very large (4gb) so it takes forever, let it go, it will eventually finish.



7) Once the copy finishes, you can boot to the USB drive and it will be treated like an attached DVD. Remember, you may have to tell your computer to boot to the USB device which is often done from <F12> or boot options in your BIOS / UEFI settings.
Post Reply