日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux制作win7启动u盘

發布時間:2023/12/20 linux 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux制作win7启动u盘 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

http://blog.chinaunix.net/uid-10328574-id-3526642.html

https://chliny.me/?p=32

下面這個最有用,上面那個只能當中文參考(我懷疑中文版的也是看英文的學來的)
https://gist.github.com/kuznero/9eb62f6f0612a32d9c4446a4f1f4cf74
上面這個鏈接實際上來自這個鏈接
https://serverfault.com/questions/6714/how-to-make-windows-7-usb-flash-install-media-from-linux

2010年的,早吧
我拷貝到這里吧
Here is the complete rundown again:

Install ms-sys - if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)

Check what device your USB media is assigned - here we will assume it is /dev/sdb. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:

cfdisk /dev/sdb or fdisk /dev/sdb (partition type 7, and bootable flag)

Create an NTFS filesystem:

mkfs.ntfs -f /dev/sdb1

Write Windows 7 MBR on the USB stick (also works for windows 8), multiple options here:

ms-sys -7 /dev/sdb

or (e.g. on newer Ubuntu installs) sudo lilo -M /dev/sdb mbr (info)
or (if syslinux is installed), you can run sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdb
Mount ISO and USB media:

mount -o loop win7.iso /mnt/iso

mount /dev/sdb1 /mnt/usb

Copy over all files:

cp -r /mnt/iso/* /mnt/usb/ …or use the standard GUI file-browser of your system

Call sync to make sure all files are written.

Open gparted, select the USB drive, right-click on the file system, then click on “Manage Flags”. Check the boot checkbox, then close.

…and you’re done.

After all that, you probably want to back up your USB media for further installations and get rid of the ISO file… Just use dd: # dd if=/dev/sdb of=win7.img

Note, this copies the whole device! — which is usually (much) bigger than the files copied to it. So instead I propose

dd count=[(size of the ISO file in MB plus some extra MB for boot block) divided by default dd blocksize] if=/dev/sdb of=win7.img

Thus for example with 8 M extra bytes:

dd count=$(((stat -c '%s' win7.iso + 8*1024*1024) / 512)) if=/dev/sdb of=win7.img status=progress

As always, double check the device names very carefully when working with dd.

The method creating a bootable USB presented above works also with Win10 installer iso. I tried it running Ubuntu 16.04 copying Win10_1703_SingleLang_English_x64.iso (size 4,241,291,264 bytes) onto an 8 GB USB-stick — in non-UEFI [non-secure] boot only. After execution dd reports: 8300156+0 records in 8300156+0 records out 4249679872 bytes (4.2 GB, 4.0 GiB) copied, 412.807 s, 10.3 MB/s

Reverse if/of next time you want to put the Windows 7 installer onto USB.

fdisk用法要看這個
How to Use Fdisk to Manage Partitions on Linux
https://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/

關鍵就是如何改boot(a命令)以及該type(t命令),最后還要保存修改(w命令)

我之前不僅沒改boot和type,最關鍵的是一直沒輸入w命令執行修改。。。

如果出現錯誤,重新按照步驟執行一遍,慢慢來,別急

注意sdb和sdb1,絕對不能混淆,讓寫sdb1就輸入sdb1,讓寫sdb就輸入sdb

然而,我雖然做好了,運行時卻出現
this is not a bootable disk
的問題;把U盤中的內容按文中所說dd拷貝到某img文件中,用file觀察,發現此img種有錯誤,不知何故

后來,我還是在win7上,用ultraISO拷到U盤中,才成功的,這么說對于制作win7安裝盤來說,還是UltraISO靠譜,盡管不知道為啥

總結

以上是生活随笔為你收集整理的linux制作win7启动u盘的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。