Linux Ubuntu Debian Centos How To Make a Bootable Windows 7, 8, 10, 2016, 2019 Server USB from ISO

Use fdisk on your USB drive to create a bootable NTFS partition (in my case /dev/sdb):

 sudo fdisk /dev/sdb

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-30218841, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-30218841, default 30218841):

Created a new partition 1 of type 'Linux' and of size 14.4 GiB.



Command (m for help): t

Command (m for help): t
Selected partition 1
Partition type (type L to list all types): 7
Changed type of partition 'NTFS volume set' to 'HPFS/NTFS/exFAT'.

Command (m for help): a

Selected partition 1
The bootable flag on partition 1 is enabled now.


Command (m for help): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).


Disk /dev/sdb: 14.4 GiB, 15472047104 bytes, 30218842 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x45b30652

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     2048 30218841 30216794 14.4G  7 HPFS/NTFS/exFAT

Make an NTFS fs on /dev/sdb1

sudo mkfs -t ntfs /dev/sdb1
Cluster size has been automatically set to 4096 bytes.
Initializing device with zeroes: 100% - Done.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

 

Now copy the iso to your partition (in my case /dev/sdb1)

sudo mount -o loop windows.iso mountpoint

cp -a mountpoint/* /mnt/sdb1/

Now put an MBR on it:

sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdb


Tags:

linux, ubuntu, debian, centos, bootable, server, usb, isouse, fdisk, ntfs, partition, dev, sdb, sudo, util, primary, extended, container, partitions, select, default, sector, sectors, gib, selected, volume, hpfs, exfat, enabled, wq, altered, ioctl, resource, kernel, reboot, partprobe, kpartx, disk, bytes, optimal, disklabel, dos, identifier, iso, dd, eval, bs, mbr, usr, lib, syslinux, bin,

Latest Articles

  • Microsoft Teams Linux - Calendar Doesn't Work Missed Meetings!
  • Scanner not working in Linux Ubuntu Fedora Mint Debian over the network? Use sane-airscan!
  • How To Boot, Install and Run Windows 2000 on QEMU-KVM
  • bash cannot execute permission denied
  • Huion and Wacom Tablets How To Install in Linux Mint / Ubuntu and make the stylus work properly
  • ffmpeg how to cut certain parts of video out
  • ffmpeg how to concat and join two video clips
  • mencoder instead of ffmpeg to join or concatenate video files with different audio streams
  • Linux How To Stop Missing Drive from Halting Boot Process in fstab
  • How To Replace Audio Track of Video using ffmpeg
  • qemu-img convert formats vdi vmdk raw qcow2
  • Linux and Windows Dual Boot Crazy Time Issues
  • dynagen / dynamips 100% high CPU usage solution - how to set the idlepc value
  • How To Setup a Cisco CME (Cisco Manager Express) Virtual Router under Linux using dynamips and dynagen
  • Linux Mint Ubuntu Debian CentOS Dual Boot Install Issues
  • Linux Mint Ubuntu Debian Centos RHEL no sound solution
  • Linux Mint/Debian/Ubuntu/Centos Installer black grub screen and blank screen after trying to boot installer or main OS
  • Linux Mint Dual Boot Install Avoid Wiping our your Main C: drive /dev/sda MBR and EFI
  • QEMU-KVM soundhw deprecated how to enable sound in QEMU 4.x series
  • Virtualbox Error Cannot register the hard disk because a hard disk with UUID already exists solution