Home Operation and Maintenance Linux Operation and Maintenance Detailed introduction on how to create a windows boot disk in linux system

Detailed introduction on how to create a windows boot disk in linux system

Jun 05, 2017 am 10:32 AM

I use many linux operating commands in my daily work, so for the sake of convenience, I installed dual systems on my computer. When I usually work, I choose to enter the Linux system. But today there is something other than work that needs to be solved: creating a Windows boot disk. If I follow the usual rules, I will start Windows, and then use xxx to make a USB boot tool to create a boot disk in a fool-proof way. But today I don’t want to restart the system and enter Windows to make a USB boot disk. I am thinking about making a USB boot disk in a Linux system.

I have come across some blogs or other information about making a USB bootable disk in Linux before. They all said that it can be done with the dd command. I have tried it before and found that there was a problem with the dd command when burning the Windows iso file. The system cannot recognize the burned boot disk. I didn't delve into the cause before, so I continued this problem today and looked for solutions online. After searching for a long time, I finally found an article that can make a boot disk normally. The following is the URL of the article. If you are interested, you can check it out by yourself:

url: http://blog.csdn.net/mike8825/article/details/51138575?locationNum=9 Thanks to "Tianwai Guest" for sharing .

It is also mentioned in the blog that Linux iso comes with mbr, so there is no problem when dd burns Linux iso, and mbr will be burned into the USB disk together. However, the Windows iso file does not come with mbr, so when making a Windows startup disk in a Linux system, you first need to write the mbr information to the USB disk. Then copy the Windows iso content to the USB flash drive. In this way, bios can correctly identify mbr and installwindows system.

Following the steps in the blog above, I performed the following operations:

My operating system: ubuntu 17.04

1. First check whether ntfs-3g is installed. See I have installed it. If it is not installed, execute the command: sudo apt install ntfs-3g

1 $ apt list ntfs-3g            #检查是否安装了ntfs-3g
3 正在列表... 完成
4 ntfs-3g/zesty,now 1:2016.2.22AR.1-4 amd64 [已安装]
5 6 $sudo apt install ntfs-3g   #如果没有安装,则执行这个命令安装
Copy after login

2. Install lilo and see that the installation is completed. If it is not installed, execute the command: sudo apt install lilo. Installation of lilo.

$dpkg -l lilo

期望状态=未知(u)/安装(i)/删除(r)/清除(p)/保持(h)
| 状态=未安装(n)/已安装(i)/仅存配置(c)/仅解压缩(U)/配置失败(F)/不完全安装(H)/触发器等待(W)/触发器未决(T)
|/ 错误?=(无)/须重装(R) (状态,错误:大写=故障)
||/ 名称                            版本                 体系结构             描述
+++-===============================-====================-====================-===================================================================
ii  lilo                            1:24.2-2             amd64                LInux LOader - the classic OS boot loader

$ sudo apt install lilo #如果提示未安装,则进行安装操作
Copy after login

3. Check the drive letter of the U disk, back up the contents of the U disk, and then format the U disk. The formatting process is fat32. (You can see that my U disk format has been It’s fat32)

$ sudo fdisk -l                #查看U盘的分区

...

Disk /dev/sdb: 7.3 GiB, 7784628224 bytes, 15204352 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: 0x48156368

设备       启动   Start     末尾     扇区  Size Id 类型
/dev/sdb1  *    1347328 15204351 13857024  6.6G  c W95 FAT32 (LBA)
Copy after login

You can see that the drive letter of my U disk is /dev/sdb

1 $ sudo mkfs.vfat /dev/sdb1        #格式化U盘,前提是U盘被正确卸载
2 mkfs.fat 4.0 (2016-05-06)
Copy after login

I used the command above to format the U disk into fat32 format.

4. Create mbr in the USB disk (what does mbr mean? Search yourself). The lilo I used here

1 $ sudo lilo -M /dev/sdb mbr           #在u盘中写入mbr
2 Backup copy of /dev/sdb in /boot/boot.0810
3 The Master Boot Record of  /dev/sdb  has been updated.
Copy after login

has been prompted above that I have successfully created the mbr. .The following is to copy the contents of the windows iso to the U disk.

5.Hang the image and the U disk, and copy the contents of the windows image to the U disk.

$mkdir /tmp/win7
$mkdir /tmp/usb

$sudo mount -o loop cn_windows_7_professional_with_sp1_vl_build_x64_dvd_u_677816.iso /tmp/win7

$sudo mount /dev/sdb1 /tmp/usb

$ df -h                  #查看挂载点
文件系统        容量  已用  可用 已用% 挂载点
.....
.....
/dev/loop4      3.1G  3.1G     0  100% /tmp/win7
/dev/sdb1       6.6G  4.0K  6.6G    1% /tmp/usb
Copy after login

Seeing that I have mounted the system, the only thing left is to copy the contents of /tmp/win7 to /tmp/usb

6. Copy the contents of the iso file to USB.

$ cp -rf /tmp/win7/* /tmp/usb           #拷贝到U盘中

$sync           #将内存中数据flush到磁盘中

$sudo umount /dev/sdb1           #卸载U盘

$sudo umount /tmp/win7            #卸载镜像
Copy after login
Now it’s done. Restart the computer and verify the results of your work

The above is the detailed content of Detailed introduction on how to create a windows boot disk in linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Does the internet run on Linux? Does the internet run on Linux? Apr 14, 2025 am 12:03 AM

The Internet does not rely on a single operating system, but Linux plays an important role in it. Linux is widely used in servers and network devices and is popular for its stability, security and scalability.

How to start nginx in Linux How to start nginx in Linux Apr 14, 2025 pm 12:51 PM

Steps to start Nginx in Linux: Check whether Nginx is installed. Use systemctl start nginx to start the Nginx service. Use systemctl enable nginx to enable automatic startup of Nginx at system startup. Use systemctl status nginx to verify that the startup is successful. Visit http://localhost in a web browser to view the default welcome page.

How to start nginx server How to start nginx server Apr 14, 2025 pm 12:27 PM

Starting an Nginx server requires different steps according to different operating systems: Linux/Unix system: Install the Nginx package (for example, using apt-get or yum). Use systemctl to start an Nginx service (for example, sudo systemctl start nginx). Windows system: Download and install Windows binary files. Start Nginx using the nginx.exe executable (for example, nginx.exe -c conf\nginx.conf). No matter which operating system you use, you can access the server IP

How to solve nginx403 error How to solve nginx403 error Apr 14, 2025 pm 12:54 PM

The server does not have permission to access the requested resource, resulting in a nginx 403 error. Solutions include: Check file permissions. Check the .htaccess configuration. Check nginx configuration. Configure SELinux permissions. Check the firewall rules. Troubleshoot other causes such as browser problems, server failures, or other possible errors.

How to check whether nginx is started How to check whether nginx is started Apr 14, 2025 pm 01:03 PM

How to confirm whether Nginx is started: 1. Use the command line: systemctl status nginx (Linux/Unix), netstat -ano | findstr 80 (Windows); 2. Check whether port 80 is open; 3. Check the Nginx startup message in the system log; 4. Use third-party tools, such as Nagios, Zabbix, and Icinga.

How to check whether nginx is started? How to check whether nginx is started? Apr 14, 2025 pm 12:48 PM

In Linux, use the following command to check whether Nginx is started: systemctl status nginx judges based on the command output: If "Active: active (running)" is displayed, Nginx is started. If "Active: inactive (dead)" is displayed, Nginx is stopped.

Nginx Server Installation and Quick Configuration Guide Nginx Server Installation and Quick Configuration Guide Apr 13, 2025 pm 10:18 PM

This article introduces the construction and configuration methods of Nginx. 1. Install Nginx: Use sudoyumininstallnginx on CentOS, use sudoapt-getinstallnginx on Ubuntu, and start with sudosystemctlstartnginx after installation. 2. Basic configuration: Modify the /etc/nginx/nginx.conf file, mainly modify the listen (port) and root (site root directory) instructions in the server block, and after modification, use sudosystemctlrestartnginx to restart and take effect. 3. Virtual host configuration: in nginx.co

How to solve nginx403 How to solve nginx403 Apr 14, 2025 am 10:33 AM

How to fix Nginx 403 Forbidden error? Check file or directory permissions; 2. Check .htaccess file; 3. Check Nginx configuration file; 4. Restart Nginx. Other possible causes include firewall rules, SELinux settings, or application issues.

See all articles