sudo apt-get install bochs
sudo apt-get install bochs-x
安装好之后,将/etc/bochs-init/bochsrc 拷贝到主目录下,然后修改其中的内容
############################################################### # Configuration file for Bochs ############################################################### # how much memory the emulated machine will have megs: 32 # filename of ROM images romimage: file=/你bochs-2.4.6的路径/bios/BIOS-bochs-latest vgaromimage: file=你bochs-2.4.6的路径/bios/VGABIOS-lgpl-latest # what disk images will be used floppya: 1_44=pm.img, status=inserted # choose the boot disk. boot: floppy # where do we send log messages? log: bochsout.txt # disable the mouse mouse: enabled=0 # enable key mapping, using US layout as default. # keyboard_mapping: enabled=1, map=你bochs-2.4.6的路径/gui/keymaps/x11-pc-us.map其中,pm.img是你自己制作的影像文件。
在命令行运行bochs 即可启动。
常见错误如下:
一. undefined symbol: XpmCreatePixmapFromData
解决方法:
sudo apt-get install bochs-sdl 安装好后在bochs的配置文件里面加一句 display_library: sdl
二. 'x' module not found
解决方法:sudo apt-get install bochs-x
三 unknown host key name 'XK_0' (wrong keymap ?)
解决方法:将配置文件中这句话 注释掉 keyboard_mapping: enabled=1, map=/usr/share/bochs/keymaps/x11-pc-us.map
四:ROM: System BIOS must end at 0xfffff
解决方法:将配置文件中的 romimage: file=$BXSHARE/BIOS-bochs-latest, address=0xf0000 后面的address去掉,即改为 romimage: file=$BXSHARE/BIOS-bochs-latest