在Redhat中搭建linux-0.11運行環境

來源:互聯網
上載者:User

(參考了這篇文章,沒太明白大意,不過還是謝謝,個人感覺最好還是參考一下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

    將鏡像加入到磁碟片鏡像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.

    

    

    

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.