Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6543781
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: LINUX

2012-03-14 16:48:21



    (参考了这篇文章,没太明白大意,不过还是谢谢,个人感觉最好还是参考一下OLDLINUX论坛上的指南)http://blog.chinaunix.net/u1/37292/showart_421699.html

    在Redhat中搭建linux-0.11运行环境

    在运行当中, BOCHS出现一个问题, 直接被PANIC了,

    Event type: PANIC

    Device: [MEM0 ]

    Message: ROM: System BIOS must end at 0xfffff

    A PANIC has occurred. Do you want to:

     cont - continue execution

     alwayscont - continue execution, and don't ask again.

     This affects only PANIC events from device [MEM0 ]

     die - stop execution now

     abort - dump core

    Choose one of the actions above: [die]

    GOOGLE到一个答案, 如下, 即将ROMIMAGE后的ADDRESS地址去掉即可。

    Starting with release 2.3.5 the default BIOS size has changed to 128k. You

    only have to remove the "address" parameter from the "romimage" bochsrc

    directive. This enables the autodetection of the start address.

    我用的是LINUX, OLDLINUX上运行的例程大部分都是基于WINDOWS的, 所以最好自己将配置文件彻底弄懂, 然后配置好, 再作实验。

    另外, FLOPPY。A中最好将IMG的路径名用完整路径而不要用相对路径, 否则可能会提示找不到FLOPPY。。

    参考文章内容:

    所需要的软件如下:

    

    

    bochs是模拟器,它可以虚拟一个386的PC机,由于早期的计算机都采用软盘,而现在的计算机机会都没有了软驱,所以,我们要跑linux0.11,这个虚拟机是必不可少的.

    mtools是软盘操作工具,安装后可以对软盘或软盘镜像进行操作,有点像windows下的WinImage工具,不过mtools都是一些命令而已.

    (1)安装Bochs

     进入Bochs目录

     ./configure

     make make

     install

    (2)安装mtools

     进入mtools目录

     ./configure

     make make

     install

    (3)编译内核源码

    .

    文件:

    linux.tar.gz

    大小:

    93KB

    下载:

    下载

     make clean

     make

    编译后可在linux源码根目录下找到Image文件,这个就是linux的内核镜像

    (4)下载

     grubdos.img

     hdimage-devel

     rootimage-0.11

    三个文件,这三个文件可在OldLinux的网站上找到

    (5)mcopy -i grubdos.img Image ::/boot/myimage

    将镜像加入到软盘镜像boot\myimage下

    (6)编辑menu.lst文件,没有就自己做一个,按照以下复制即可:

    

    default 0

    title Linux 0.11

    root (fd0)

    kernel /boot/myimage

    boot

    

    编辑完后保存,用mcopy -i grubdos.img menu.lst ::/boot/grub复制到软盘镜像的boot\grub目录下

    (7)编写.bxrc文件, 可按照以下复制:

    

    注意floppya,floppyb和ata0-master对应的grubdos.img, hdimage-devel和rootimage-0.11

    的路径要对, 保存为linux0.11.bxrc

    

    megs: 16

    romimage: file="/usr/local/share/bochs/BIOS-bochs-latest", address=0x00000

    vgaromimage: file="/usr/local/share/bochs/VGABIOS-lgpl-latest"

    boot: floppy

    floppya: image="images/grubdos.img", status=inserted

    floppyb: image="images/rootimage-0.11", status=inserted

    ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14

    ata0-master: type=disk, path="images/hdimage-devel", mode=flat, cylinders=410, heads=16, spt=38

    #ata0-master: type=disk, path="images/hdimage", mode=flat, cylinders=121, heads=16, spt=63

    ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15

    ata2: enabled=0

    ata3: enabled=0

    parport1: enabled=1, file=""

    parport2: enabled=0

    com1: enabled=1, mode=null, dev=""

    com2: enabled=0

    com3: enabled=0

    com4: enabled=0

    i440fxsupport: enabled=1

    usb1: enabled=0

    sb16: enabled=0

    floppy_bootsig_check: disabled=0

    vga_update_interval: 40000

    vga: extension=vbe

    keyboard_serial_delay: 250

    keyboard_paste_delay: 100000

    cpu: count=1, ips=2000000

    #text_snapshot_check: 0

    mouse: enabled=0

    private_colormap: enabled=0

    clock: sync=none, time0=local

    ne2k: enabled=0

    pnic: enabled=0

    log: -

    logprefix: %t%e%d

    debugger_log: -

    panic: action=ask

    error: action=report

    info: action=report

    debug: action=ignore

    pass: action=fatal

    keyboard_mapping: enabled=0, map=

    keyboard_type: mf

    user_shortcut: keys=none

    (8)可以开始跑linux0.11了

    输入bochs -f linux0.11.bxrc,然后输入6按回车,linux0.11就可以启动了

    .

    

    

    

    

    

    

     directive. This enables the autodetection of the start address.

    

    

    

    

    

    

    

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/48954/showart_1718187.html


阅读(1627) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~