The first thing to do when you build a bootable Pendrive is to prepare the USB flash drive using DiskPart (Command Prompt / Command-line utility). It is very easy to create bootable Pendrive using cmd (command prompt) utility. Just follows the simple steps.
What is bootable USB flash drive?
Bootable USB flash drive is an operating system’s installation disk, for booting the device.
Steps to create a bootable USB Flash Drive:-
1: Insert a USB flash drive to a computer.
Step 2: Open Command Prompt windows to run as an administrator.
Step 3: Type diskpart
Step 4: After opening a command-line window, to determine the USB flash drive number or drive letter, on the command prompt window type list disk, and then press the Enter button. The list disk command displays all the disk drives on the computer. Now, note the drive number or drive letter of the USB flash drive.
Step 5: On the command prompt window type select disk 1 (where disk 1 is the drive number or drive letter of the USB flash drive, select carefully here in my case USB flash drive is 16GB(14GB usable) ), and then press the Enter button.
Step 6: Type clean, and then press the Enter button. (Note: this command deletes all data from the USB flash drive)
Step 7: To create a new primary partition on the USB flash drive, type create partition primary and then press the Enter button.
Step 8: Select the partition that you just created, type select partition 1, and then press the Enter button.
Step 9: To format the partition, type format fs=ntfs quick, and then press the Enter button(Now, wait for a moment it will take a few seconds to format). (Note: For UEFI Platform, format the USB flash drive as FAT32 rather than as NTFS. To format the partition as FAT32, type format fs=fat32 quick, and then press the Enter button.
Step 10: Type active, and then press the Enter button.
Step 11: Type exit, and then press the Enter button.
Step 12: When creating your custom image, save it to the root of the USB flash drive (Just extract the ISO file and copy all files to a USB flash drive).
You can use the following software tools to extract ISO files.