好吧話不多說,開始安裝 WIndowsXP
1、下載安裝bochs……(這步不會的下面可以不用看了……)
2、在Bochs安裝目錄中建立一個WinXP檔案夾(同上面的括弧)
3、建立虛擬硬碟用於存放WinXP鏡像
具體步驟:
進入命令提示字元,使用bximage工具
產生image需要回答幾個問題
一:產生硬碟還是磁碟片
二:鏡像類型 flat sparse or growing
三:鏡像大小:WinXP一般5GB足夠了
四:鏡像名稱:這個按照您個人的喜好吧
請注意!最後會要求你複製下面一行虛擬硬碟的參數,一定要複製下來,
否則一旦cmd退出,這些參數很難找回來
下面給出我用Bximage建立虛擬硬碟的範例
C:\Program Files\Bochs-2.4.5>bximage
========================================================================
bximage
Disk Image Creation Tool for Bochs
$Id: bximage.c,v 1.34 2009/04/14 09:45:22 sshwarts Exp $
========================================================================
Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd] hd
What kind of image should I create?
Please type flat, sparse or growing. [flat] flat
Enter the hard disk size in megabytes, between 1 and 129023
[10] 5000
I will create a 'flat' hard disk image with
cyl=10158
heads=16
sectors per track=63
total sectors=10239264
total size=4999.64 megabytes
What should I name the image?
[c.img] winxp.img
Writing: [] Done.
I wrote 5242503168 bytes to winxp.img.
The following line should appear in your bochsrc:
ata0-master: type=disk, path="winxp.img", mode=flat, cylinders=10158, heads=16
, spt=63
(The line is stored in your windows clipboard, use CTRL-V to paste)
Press any key to continue
(粗體為需要輸入的資料)
過程很簡單
之後將安裝目錄下產生的img檔案移動到你建立的檔案夾中
4、下面就是配置WinXP虛擬機器參數,
具體步驟
從bochs安裝目錄的dlxlinux複製出bochsrc.bxrc
用記事本開啟編輯
############IMPORTANT##############
cpu: count=1, ips=10000000, reset_on_triple_fault=1, ignore_bad_msrs=1
################上面這句話非常重要,如果不加上,安裝Windows XP的時候會藍屏###############
# how much memory the emulated machine will have
megs: 256
##############此處改為256(記憶體大小,你可以根據你自己的需要修改,不過建議最好不要低於256M)
# filename of ROM images
romimage: file=BIOS-bochs-latest
vgaromimage: file=VGABIOS-lgpl-latest
###########我將BIOS-bochs-latest 和VGABIOS-lgpl-latest 複製到了我建立的檔案夾中,於是去掉了"../"
# what disk images will be used
##刪去此處無用的內容
# hard disk
#此處複製剛才那段要複製下來的參數
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="winxp.img", mode=flat, cylinders=10158, heads=16, spt=63
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata1-master: type=cdrom, path=f:, status=inserted, biosdetect=auto, model="Generic 1234"
#我存放WinXP安裝盤在f:(物理光碟機) 你也可以使用ISO檔案來安裝WInXP
# choose the boot disk.
boot: cdrom,disk
#此處像我這樣修改
#後面不動
# default config interface is textconfig.
#config_interface: textconfig
#config_interface: wx
#display_library: x
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
# where do we send log messages?
log: bochsout.txt
# disable the mouse, since DLX is text only
mouse: enabled=0
# enable key mapping, using US layout as default.
#
# NOTE: In Bochs 1.4, keyboard mapping is only 100% implemented on X windows.
# However, the key mapping tables are used in the paste function, so
# in the DLX Linux example I'm enabling keyboard_mapping so that paste
# will work. Cut&Paste is currently implemented on win32 and X windows only.
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-fr.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-de.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-es.map
按照上面的提示修改即可,你也可以像注釋一樣複製BIOS-bochs-latest 和VGABIOS-lgpl-latest 到你建立的檔案夾中……
還有再囉嗦一句,上面說了有一句話非常重要,如果不加上裝系統會藍
參見http://bochs.sourceforge.net/doc/docbook/user/guest-winxp.html
5、開啟bochs,Load你剛剛修改完的bochsrc.bxrc
開始你的WinXP安裝吧!(
可能會比較慢,還有如果你說你不會安裝Windows XP,
那麼恭喜你,顯然上面的內容您都白看了……
)