Linux win10 u盘启动盘,ubuntu中创建windows10的u盘启动盘

Create a Bootable Windows 10 USB in Linux With Ubuntu/Debian GUI

Iam a Linux user and sysadmin. However, I need to install a couple of Windows 10 enterprise or MS-Windows 10 LTSB on a desktop system for developers. How do I create a bootable Windows 10 USB in Linux with GUI tools on an Ubuntu Linux 18.04 or Debian Linux 9.x?

Introduction: There are two methods to install Microsoft Windows 10 enterprise, pro or LTSB ( long-term servicing branch) on a USB pen drive. The first method includes installing an app called woeusbgui and writing an ISO image using that app to the USB pen drive. The second method use a bash shell script. The third method involves typing the various command at the Linux shell prompt and recommended for advanced users. Let us see how to create a bootable Windows 10 enterprise or LTSB USB in Linux with the CLI and GUI methods. You need the following:

Linux distro such as Debian or Ubuntu or Linux mint

Windows 10 enterprise/ltsb client ISO (download link). The following instuctions should work with Windows 7/8/10 pro or home edition too.

woeusb and releated commands from source code

GNU compiler collection

A USB pen drive (usb hard disk or usb stick) with at 4 Gb or more free disk space

Warning: Writing or selecting the wrong kind of boot record to a device (USB/hard disk) might destroy partition information or file system or data forever. Be careful with partition and disk names.

Method 1. Create a Bootable Windows 10 USB in Linux with woeusbgui GUI app

This method is recommended for all new Linux users as it requires less typing at the CLI and easy to use. WoeUSB is a simple Linux program to create a Windows 10 USB stick installer from a real Windows DVD or ISO image. From the Github page:

WoeUSB is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD. It is a fork of Congelli501’s WinUSB. This package contains two programs:

woeusb: A command-line utility that enables you to create your own bootable Windows installation USB storage device from an existing Windows Installation disc or disk image

woeusbgui: A GUI wrapper of woeusb based on WxWidgets

It supports Windows Vista, Windows 7, Window 8.x, Windows 10. All languages and any version (home, pro, ltsb, …) and Windows PE.

Clone WoeUSB

Type the following git command

git clone https://github.com/slacka/WoeUSB.git

Set the application version string:

cd WoeUSB/

./setup-development-environment.bash

Install WoeUSB’s build dependencies on a Debian or Ubuntu Linux using the apt-get command or apt command

sudo apt-get install devscripts equivs gdebi-core

mk-build-deps

sudo gdebi woeusb-build-deps_*.deb

dpkg-buildpackage -uc -b

sudo gdebi ../woeusb*.deb

Install WoeUSB to create usb stick windows 10 installer from an iso image on Linux

Make a Bootable Windows 10 USB from Linux

Simply type the following command to completely WIPE the entire USB storage device (called /dev/sdc), then build a bootable Windows USB device from scratch:

sudo woeusb --device win_10.iso /dev/sdc

Not a fan of the CLI? Try gui version:

woeusbgui

f2bfae094336468945771c4de7205139.png

The progress:

78ef00f5c7a4bf334378b6a55f9def5a.png

Wait for some time. You should get a confirmation box as follows:

db9fce43f1b10e7fcd0dcbd8ebdd4f05.png

Remove USB pen from Linux. Go to your desktop/laptop. Insert USB pen. Boot up the system and make sure bios set to boot from USB. You should see Windows blue logo soon on the screen when installer boots from USB pen drive.

Now just follow on screen instructions to install Windows 10 Entperise client or LTSB edition on your desktop/laptop.

Method 2. Bash shell script to create a bootable Windows 10 USB device from one ISO file

Install it as follows from the Github:

sudo apt install extlinux

mkdir ~/bin/

cd ~/bin/

curl -L https://git.io/bootiso -O

chmod +x bootiso

To list your usb pen drive run:

~/bin/bootiso -l

To write create a bootable Windows 10 USB from an ISO image named ~/Downloads/win-10-ltsb.iso, run:

~/bin/bootiso -p ~/Downloads/win-10-ltsb.iso

~/bin/bootiso ~/Downloads/win-10-ltsb.iso

Create a Windows 10 USB bootable device from an ISO image using a bash shell script

Once created a bootable Windows 10 USB. Unplug it from the Linux computer. Turn on computer. Boot from USB and install Windows 10 enterprise client.

Method 3. Create a Bootable Windows 10 USB in Linux with CLI apps only

First you need to install a tool called ms-sys. It is a Linux cli app for writing Microsoft compatible boot records. This program does the same as Microsoft “fdisk /mbr” to a hard disk except that it does not copy any system files, only the boot record written.

Download and install ms-sys

Grab the latest version from this page. Use the wget command or curl command to grab the file:

cd /tmp/

wget https://nchc.dl.sourceforge.net/project/ms-sys/ms-sys%20development/2.5.2/ms-sys-2.5.2.tar.gz

Untar the tar ball named ms-sys-2.5.2.tar.gz using the tar command:

tar -zxvf ms-sys-2.5.2.tar.gz

If you do not have gnu gcc c/c++ compiler installed on a Debian or Ubuntu Linux, install it using the apt command or apt-get command:

sudo apt install build-essential

See the following links for more info:

Debian Linux Install GNU GCC Compiler and Development Environment

Ubuntu Linux Install GNU GCC Compiler and Development Environment

Build and install it:

cd ms-sys-2.5.2

make

sudo make install

Create a ntfs partition

First, find out the usb device name using the lsblk command or lsusb command or dmesg command:

lsblk

lsusb

dmesg | more

## or use the grep command as follows ##

dmesg | sort| uniq | grep -A 6 usb-storage

30f03ca4036bc9f5799060bd7579ba53.png

I am going to use the /dev/sdc. Create a partition using the fdisk command:

sudo fdisk /dev/sdc

Create a partition as follows:

f1e3e100698122d3de8a7356adffd7bc.png

Format /dev/sdc1 to ntfs:

sudo mkfs.ntfs -f /dev/sdc1

62cf94ca1601fb510f074111f0e0d3ec.png

Linux create windows 10 Bootable USB by coping installer files

You need copy files from Windows 10 ISO image to usb disk. Create a folder on Linux using the mkdir command

sudo mkdir /mnt/win10/

Mount Windows 10 ISO image in Linux using the mount command:

sudo mount -t udf -o loop,ro,unhide {/path/to/win-10.iso} /mnt/win10/

## I got a win10 ltsb iso file in ~/Downloads/ ##

sudo mount -t udf -o loop,ro,unhide ~/Downloads/14393.0.160715-

1616.RS1_RELEASE_CLIENTENTERPRISE_S_EVAL_X64FRE_EN-US.ISO /mnt/win10/

Mount usb pen drive too:

sudo mkdir /mnt/usb/

sudo mount /dev/sdc1 /mnt/usb/

df -h | grep '/mnt'

0da0de6aa705931c11751513a0e58076.png

Ready to burn the Windows 10 ISO to a USB on Linux

Copy files in Linux using the cp command or rsync command:

sudo cp -avr /mnt/win10/* /mnt/usb/

### OR use rsync ##

sudo rsync -avrP /mnt/win10/* /mnt/usb/

Use ms-sys command to write mbr to create a bootable Windows 10 pro usb in Linux

In order to burn the Windows 10 ISO to a USB and boot it, run:

sudo ms-sys -7 /dev/sdc

Sample outputs:

Windows 7 master boot record successfully written to /dev/sdc

Unmount /dev/sdc:

sudo sync

sudo umount /mnt/usb/

Now boot from USB pen and you should see Windows 10 installer as follows:

52d6d761846f6f63578c9140ee8c119e.png

Conclusion

And there you have it. You just created a Windows 10 bootable USB stick on Linux using two different methods. Creating a Microsoft bootable Windows 10 USB stick from Linux is very simple, and I hope it helps you manage your enterprise workload without leaving Linux desktop.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值