This article will show you how to turn a USB drive into a bootable device using the MS-DOS utility tool, diskpart.
This is ideal if you don’t want to be carrying disks around with you, instead you can put just carry usb pendrives on your key chain instead.
Put the USB thumbdrive you wish to use into a computer and go to “My Computer”. Make note of the drive letter and its storage.
Run a elevated command prompt, this can be done by click on the start menu, typing in “cmd” and right-clicking and selecting “Run as Administrator”.
Now type in:
select disk ?
create partition primary
select partition 1
format fs=ntfs quick label="Bootable-USB-Drive"
With ? being the drive letter of the USB Drive.
Transferring windows files to the USB drive.
Now that you have a USB drive you can use, you will want to put Windows or a Linux Distribution on it. In this example, I will be showing how it’s done on Windows but the same can apply for creating a Linux distro bootable USB drive.
For this, you can simply copy the files over.
This can be done using the MS-DOS utility tool xcopy with the following command:
xcopy g:\Windows7\*.* e:\ /E /H /F
G:\Windows7 \ being the path and drive letter of where the files are located.
The two asterisks are means it will copy all the files with any file extension from the path G:\ and the E:\ being the location of where you want to copy the files, in this case it would be the USB drive, so whatever letter you have it assigned to.
The /E parameter means it will copy all directories and subdirectories, including empty ones.
The /H parameter means it will copy all hidden files.
The /F parameter means it will display the full source and destination file names while it is copying.