VMware-centOS 7的错误

在安装bochs时,本机移动到Vm的无法提取

直接在Vm上用命令安装

wget https://sourceforge.net/projects/bochs/files/bochs/2.6.11/bochs-2.6.11.tar.gz

这个可以提取

在bochs里编译时显示识别不了 gtk/gtk.h

本机缺少gtk,我把gtk2和gtk3都装了

yum install gtk2-devel
yum install gtk3-devel

在bochs里编译时显示 pthread_create 未定义

pthread 库不是 Linux 默认的库
在编译时加入 -lpthread 参数:

IBS 省略 -lpthread
vim Makefile

编辑 92 行,在行末加上 -lpthread

无法运行bin/bochs

不是在该目录下运行
去其他位置而不是主文件夹找正确的路径

运行bin/bochs 可能错误1:romimage directive malformed.

检查 romimage 格式是否写对;其中的 = 如果直接从 windows 复制过去会发生问题,要在 linux 里手动敲
我最后写的样子:

romimage: file="/usr/ba/bochs/share/bochs/BIOS-bochs-latest"
vgaromimage: file="/usr/ba/bochs/share/bochs/VGABIOS-lgpl-latest"

运行bin/bochs 可能错误2:a bochsrc option needs at least one parameter

我将 keyboard 这行改成这样就没事了

keyboard_mapping: enabled=1, map="/usr/ba/bochs/share/bochs/keymaps/x11-pc-us.map"

运行bin/bochs 可能错误3:Bochs is not compiled with gdbstub support

直接把 gdbsub 这行删掉

在写好mbr后运行 bin/bochs -f bochsrc.disk 出现错误:could not open hard drive image file 'hd60M.img'

权限不够,使用sudo bin/bochs -f bochsrc.disk 命令即可

posted @ 2025-03-07 18:46  Grice  阅读(41)  评论(0)    收藏  举报