当前位置: 技术问答>linux和unix
linux下 bochs 启动操作系统的问题
来源: 互联网 发布时间:2016-06-06
本文导语: 我用bochs 模拟系统 系统img文件放在Lenos tinix.img 第一个问题 启动的bochs -q -f bochsrc.bxrc时候 提示报错:ata0-0 disk size doesn't match specified geometry 之前我启动bochs自带的那个 dlx系统时候一切正常 第二个问...
我用bochs 模拟系统
系统img文件放在Lenos tinix.img
第一个问题
启动的bochs -q -f bochsrc.bxrc时候 提示报错:ata0-0 disk size doesn't match specified geometry
之前我启动bochs自带的那个 dlx系统时候一切正常
第二个问题:
boot:disk 这里 如果 我改成 boot:floppy 或者 boot:a 时候 启动提示 no bootable device 就算是dlx那个系统也不能启动了
一直不知道为什么。
谢谢 解答
配置文件如下:
###############################################################
# bochsrc.txt file for DLX Linux disk image.
###############################################################
# how much memory the emulated machine will have
megs: 32
# filename of ROM images
romimage: file=../BIOS-bochs-latest
#, address=0xf0000
vgaromimage: file=../VGABIOS-lgpl-latest
# what disk images will be used
floppya: 1_44=tinix.img, status=inserted
floppyb: 1_44=floppyb.img, status=inserted
# hard disk
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat,path="/usr/share/bochs/Lenos/tinix.img", cylinders=306, heads=4, spt=17
# choose the boot disk.
boot: 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=../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
系统img文件放在Lenos tinix.img
第一个问题
启动的bochs -q -f bochsrc.bxrc时候 提示报错:ata0-0 disk size doesn't match specified geometry
之前我启动bochs自带的那个 dlx系统时候一切正常
第二个问题:
boot:disk 这里 如果 我改成 boot:floppy 或者 boot:a 时候 启动提示 no bootable device 就算是dlx那个系统也不能启动了
一直不知道为什么。
谢谢 解答
配置文件如下:
###############################################################
# bochsrc.txt file for DLX Linux disk image.
###############################################################
# how much memory the emulated machine will have
megs: 32
# filename of ROM images
romimage: file=../BIOS-bochs-latest
#, address=0xf0000
vgaromimage: file=../VGABIOS-lgpl-latest
# what disk images will be used
floppya: 1_44=tinix.img, status=inserted
floppyb: 1_44=floppyb.img, status=inserted
# hard disk
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat,path="/usr/share/bochs/Lenos/tinix.img", cylinders=306, heads=4, spt=17
# choose the boot disk.
boot: 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=../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
|
1保证路径
2保证启动的汇编代码后有dw 0xaa55 当然也可以在bochs配置中去掉这个标识
3汇编生成的文件大小要==512byte
然后再写入到img中
楼主好运
2保证启动的汇编代码后有dw 0xaa55 当然也可以在bochs配置中去掉这个标识
3汇编生成的文件大小要==512byte
然后再写入到img中
楼主好运