[分享] linux下作出WIN7安裝用usb

看板Linux作者 ( )時間14年前 (2009/11/30 22:04), 編輯推噓1(104)
留言5則, 4人參與, 最新討論串1/1
看windows下的說明多了 來寫一個linux的 (0) 一個3~4G的usb packages:ntfsprogs, grub, fdisk 如果沒有ntfsprogs的 sudo aptitude install --without-recommends ntfsprogs 以下會清空usb 有還要的東西要先移走 " "中是你要直接打的內容 ' '中是看你的東西長怎樣再打的內容 "enter"就是enter (1) "sudo fdisk '/dev/sdz'" 你的usb的divice file (如sdz) Command (m for help):"o" Command (m for help):"n" Command action e extended p primary partition (1-4) "p" Partition number (1-4):"1""enter" First cylinder (1-****, default 1):"1""enter" Last cylinder, +cylinders or +size{K,M,G} (1-1013, default ****):'****-1'"enter" Command (m for help):"n" Command action e extended p primary partition (1-4) "p""enter" Partition number (1-4):"2" First cylinder (1-****, default 1):"enter" Last cylinder, +cylinders or +size{K,M,G} (1-1013, default ****):"enter" Command (m for help):"t""enter" Partition number (1-4):"1" Hex code (type L to list codes):"7" Command (m for help):"w""enter" (2) 'sudo partprobe" 或重開機,如果沒有partprobe的話 (3-1) "sudo mkntfs '/dev/sdz1'" 你的usb partition 1 的divice file (如sdz1) (3-2) "sudo mke2fs '/dev/sdz2'" 你的usb partition 2 的divice file (如sdz2) (4) "sudo partprobe" 或重開機,如果沒有partprobe的話 (5) 把w7光碟中的東東全copy到usb中 (6) "sudo umount '/dev/sdz2'" 你的usb partition 2 的divice file (如sdz2) "sudo mount '/dev/sdz2' /mnt" 你的usb partition 2 的divice file (如sdz2) /mnt (7) 這一步我沒想到在linux上怎麼作(不用VM的話) 去一台windows vista or 7上 "X:/boot/bootsect.exe /nt60 X:" X:是usb上的槽(對,只看的到一個,ext2讀不到) (6) "echo /dev/sda (hd0)>/mnt/boot/grub/device.map" "sudo grub-install --root-directory=/mnt /dev/'usb的device file'" "echo title w7 install>/mnt/boot/grub/menu.lst" "echo rootnoverify (hd0,0)>>/mnt/boot/grub/menu.lst" "echo makeactive>>/mnt/boot/grub/menu.lst" "echo chainloader +1>>/mnt/boot/grub/menu.lst" (3-1)在linux下沒試過 不知道有沒有用(winXP)下就不行 好多..... 如果有錯就拜托各位大大幫忙訂正了 謝謝 千萬不要打錯字 真的很可怕.... 有沒有人想把這寫成shell script的?我累了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.240.166 ※ 編輯: kdjf 來自: 140.112.240.166 (11/30 22:12)

11/30 22:08, , 1F
不知道grub4dos可不可以直接引導?
11/30 22:08, 1F

11/30 22:14, , 2F
如果在windows下set acitve partition就好了 也不用grub
11/30 22:14, 2F

11/30 22:15, , 3F
這麼強大的工具
11/30 22:15, 3F
※ 編輯: kdjf 來自: 140.112.240.166 (11/30 23:18)

12/01 16:46, , 4F
辛苦~ 好文一定要推一下
12/01 16:46, 4F

12/01 17:12, , 5F
感謝~~馬上把他學起來~~~^^b
12/01 17:12, 5F
文章代碼(AID): #1B4z3xZT (Linux)