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


    http://www.itokit.com/2011/0321/38276.html

        (参考了这篇文章,没太明白大意,不过还是谢谢,个人感觉最好还是参考一下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。。

        参考文章内容:

        所需要的软件如下:

        http://jaist.dl.sourceforge.net/sourceforge/bochs/bochs-2.3.5.tar.gz

        http://mtools.linux.lu/mtools-3.9.11.tar.bz2

        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

        将镜像加入到软盘镜像bootmyimage下

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

        

        default 0

        title Linux 0.11

        root (fd0)

        kernel /boot/myimage

        boot

        

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

        (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


    <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
    阅读(473) | 评论(0) | 转发(1) |
    给主人留下些什么吧!~~
    评论热议
  • 相关阅读:
    27-Perl 进程管理
    26-Perl 包和模块
    25-Perl CGI编程
    YUM极速安装mariadb
    yum极速安装mysql5.7
    切换阿里yum镜像源
    mysql生成随机字符串函数
    Unable to locate value meta plugin of type (id)
    centos 挂载NTFS移动硬盘
    总有你要的编程书单(GitHub )
  • 原文地址:https://www.cnblogs.com/ztguang/p/12647268.html
Copyright © 2020-2023  润新知