How do I make a bootable U-disk for Windows under Linux?

Source: Internet
Author: User

How do I make a bootable U-disk for Windows under Linux?

The scenario is that there is a WINDOWS10 ISO that now wants to be installed with a USB flash drive, which is required to support UEFI (boot bootloader) and legacy (boot bootloader), because there are some older machines that do not support UEFI.

Now analyze the situation:

1 Windows10 ISO is a UEFI-enabled, you just copy the contents of the ISO to the disk's partition, at boot-up by pressing a function key (a lot of machines are F12) will appear to select the startup mode and Startup Disk page. You just have to choose Uefi to boot your USB drive.
2 to support legacy, it will be a boot program, now popular is grub2. All that is done is to generate the Grub configuration file grub.cfg, which writes grub to the MBR. Writing grub to the MBR is implemented by the command Grub-install, and the grub configuration file is written by hand.

Now say the technical specifications:

1 The disk label of the recommended U-disk is msdos, because GPT-tagged disks require a dedicated boot partition to work with GRUB2. This has not been tested, not recommended to everyone.
2 partition format, it is recommended to use NTFS partitioning. The size of the partition is as large as your ISO.
3 The beginning of the partition, it is recommended to empty the disk starting 2M space, starting from 2M after partitioning.

Now say the implementation:

The following assumes that the ISO file name is Win10.iso,u disk device for/DEV/SDB
You can view the disk labels using the Fdisk and parted commands. The formatting of NTFS under Linux may require a different tool for itself. Don't make suggestions here.

1 mount the ISO and copy all the files in the ISO to the U-disk partition.
mkdir ISO
Mount Win10.iso ISO
Cp-r iso/*/DEV/SDB1

2 Executive Grub-install
Grub-install--target=i386-pc--boot-directory=iso/boot/dev/sdb

3 handwriting grub.cfg put the following grub.cfg file into the iso/boot/grub/

# grub.cfg
Menuentry "Install Windows 10" {
Set root= HD (0,1)
Chainloader +1
}

How do I make a bootable U-disk for Windows under Linux?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.