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

  • How To Install OpenProject on Centos 7 Step-by-Step Guide
  • Ubuntu Debian Linux Cannot Install Wine Solution - wine1.6 : Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu14.2) but it is not installable wine1.4 : Depends: wine1.6 but it is not going to be installed
  • How To Install python 3.4 3.5 and up on Linux with wine - Working Solution
  • using Xvfb on virtual remote ssh server to have X graphical programs work
  • ssh Received disconnect from port 22:2: Too many authentication failures
  • named bind errors - DNSKEY: unable to find a DNSKEY which verifies the DNSKEY RRset and also matches a trusted key for '.'
  • OpenVZ vs LXC DIR mode poor security in LXC
  • httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load modules/libphp5.so into server: /lib64/libresolv.so.2: symbol __h_errno, version GLIBC_PRIVATE not defined in file libc.s
  • Radeon R3 GPU on Debian Crashing
  • MySQL 5.7 on Debian and Ubuntu - How To Reset Root Password
  • SSH and sshfs timeout settings keepalive
  • Linux How To Add User To Additional Group
  • Howto Set Static IP on boot in initramfs for dropbear or other purposes NFS, Linux, Debian, Ubuntu, CentOS
  • Convert and install to LUKS Encrypted Drive Ubuntu 18.04 19.10 Linux Mint and Debian Based Linux
  • Debian and Netplan
  • CentOS 8 how to restart the network!
  • CentOS 8 how to convert to a bootable mdadm RAID software array
  • ADATA USB Thumb Drive Issues
  • KMODE EXCEPTION NOT HANDLED - QEMU/KVM Won't Boot Windows 2016 or 10 Image or Physical Machine
  • Linux Mint / Ubuntu / Debian Mate Disable Guest Session and Hide Usernames on Lightdm Login screen GUI