安装:
sudo apt-get install bochs bochs-x bochsbios vgabios bochs-term
调用命令:
bochs -f bochsrc
bochsrc文件要点:
1.指定BIOS镜像
romimage: file=/usr/share/bochs/BIOS-bochs-latest
2.指定显卡镜像
vgaromimage: file=/usr/share/bochs/VGABIOS-lgpl-latest
3.指定内存大小
megs: 16
4.指定软盘镜像
floppya: 1_44="Image", status=inserted
5.指定启动盘
boot: a
6.指定远程调试
gdbstub: enabled=1, port = 1234, text_base=0, data_base=0, bss_base=0
7.其它(略)
常见问题小结
1.Message: ROM: System BIOS must end at 0xfffff
问题原因:
在2.3.5以前的bochs使用的BIOS-bochs-latest是64k的,那个时候需要加上
romimage: file=BIOS-bochs-latest,address=0xf0000
在2.3.5中的BIOS-bochs-latest更新了,变成了128k的,这个时候配置需要改为
romimage: file=$BXSHARE/BIOS-bochs-latest
解决方法:
去掉配置文件中的address那个
2. directive 'floppy_command_delay' not understood
解决方法:
注掉floppy_command_delay: 50000
本文详细介绍Bochs虚拟机的安装步骤及配置方法,包括使用sudo apt-get install命令安装必要组件,通过bochs-f bochsrc调用配置文件。文中还列举了bochsrc文件中的关键设置项,如BIOS和显卡镜像指定、内存大小设定等,并总结了常见问题及其解决方案。
768

被折叠的 条评论
为什么被折叠?



