1、使用apt-get安装WoeUSB依赖的软件包
sudo apt-get install devscripts equivs gdebi-core
其中,
devscripts包含了一堆方便维护与管理Debian软件包的脚本。
equivs用于创建最小Debian软件包,即只包含软件包依赖关系信息而没有实际的软件。
gdebi-core用于对本地deb软件包解决依赖性问题并自动安装相关的包。
2、使用git下载WoeUSB
https://github.com/WoeUSB
# 可以直下载.bash文件
# 也可以下载源码包
进入下载的WoeUSB文件夹并执行setup-development-environment.bash
cd WoeUSB
./setup-development-environment.bash
3、使用mk-build-deps命令创建描述依赖关系的deb包
mk-build-deps
执行后,会在当前目录下生成woeusb-build-deps_3.2.12_all.deb。
使用dpkg命令安装woeusb-build-deps_3.2.12_all.deb
sudo dpkg -i woeusb-build-deps_3.2.12_all.deb
安装的过程中会自动下载依赖的软件包libwxbase3.0-dev、libwxgtk3.0-dev、wx-common、wx3.0-headers。
4、开始制作windows 10 u盘启动盘。
进入iso下载目录
./woeusb-5.1.2.bash --device Windows_10_x64.iso /dev/sdb --target-filesystem NTFS
制作过程如下:
WoeUSB v3.3.1-3-gf3be27c
==============================
Mounting source filesystem...
Wiping all existing partition table and filesystem signatures in /dev/sdb...
/dev/sdb:2 个字节已擦除,位置偏移为 0x000001fe (dos): 55 aa
/dev/sdb:将调用 ioctl 来重新读分区表:成功
Ensure that /dev/sdb is really wiped...
Creating new partition table on /dev/sdb...
Creating target partition...
Making system realize that partition table has changed...
Wait 3 seconds for block device nodes to populate...
Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.
--2020-10-11 20:18:10-- https://github.com/pbatard/rufus/raw/master/res/uefi/uefi-ntfs.img
正在解析主机 github.com (github.com)... 192.30.255.113
正在连接 github.com (github.com)|192.30.255.113|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img [跟随至新的 URL]
--2020-10-11 20:18:12-- https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img
正在解析主机 raw.githubusercontent.com (raw.githubusercontent.com)... 0.0.0.0, ::
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|0.0.0.0|:443... 失败:拒绝连接。
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|::|:443... 失败:拒绝连接。
install_uefi_ntfs_support_partition: Warning: Unable to download UEFI:NTFS partition image from GitHub, installation skipped. Target device might not be bootable if the UEFI firmware doesn't support NTFS filesystem.
Mounting target filesystem...
Applying workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
Copying files from source media...
grep: /media/woeusb_source_1602418671_1583085/sources/cversion.ini: 没有那个文件或目录
Installing GRUB bootloader for legacy PC booting support...
正在为 i386-pc 平台进行安装。
安装完成。没有报告错误。
Installing custom GRUB config for legacy PC booting...
Resetting workaround to prevent 64-bit systems with big primary memory from being unresponsive during copying files.
/home/george/deb/WoeUSB/src/woeusb: 第 1683 行: echo: 写错误: 无效的参数
Warning!: command "echo 0 > /proc/sys/vm/dirty_background_bytes" - returned code $?
/home/george/deb/WoeUSB/src/woeusb: 第 1684 行: echo: 写错误: 无效的参数
Warning: command "echo 0 > /proc/sys/vm/dirty_bytes" - returned code $?
Unmounting and removing "/media/woeusb_source_1602418671_1583085"...
Unmounting and removing "/media/woeusb_target_1602418671_1583085"...
You may now safely detach the target device
Done :)
The target device should be bootable now
5、遇到的问题
新买的u盘插入后,需要先格式化为NTFS,umount /dev/sdb1。
(完成)
作者:小桥流水啦啦啦