- 论坛徽章:
- 0
|
首先非常感谢赵炯老师给我们提供了丰富的资源,包括他写的《Linux内核完全注释》和他维护的网站www.oldlinux.org
一、准备工作
软件:bochs-20060202.tar.gz
软盘映像:http://www.oldlinux.org/Linux.old/images/bootimage-0.11-20040305
http://www.oldlinux.org/Linux.old/images/rootimage-0.11-20040305
二、.bochsrc文件(注释已删掉)
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata2: enabled=0, ioaddr1=0x1e8, ioaddr2=0x3e0, irq=11
ata3: enabled=0, ioaddr1=0x168, ioaddr2=0x360, irq=9
ata0-master: type=disk, path=minix203.img, cylinders=940, heads=6, spt=17, translation=none
boot: a
floppy_bootsig_check: disabled=0
log: bochsout.txt
panic: action=ask
error: action=report
info: action=report
debug: action=ignore
debugger_log: -
parport1: enabled=1, file="parport.out"
vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
mouse: enabled=1
private_colormap: enabled=0
ne2k: ioaddr=0x240, irq=9, mac=b0:c4:20:00:00:00, ethmod=linux, ethdev=eth0
keyboard_mapping: enabled=0, map=
三、制作软盘映像
mshost:/usr/local/bochs # ./bximage
========================================================================
bximage
Disk Image Creation Tool for Bochs
$Id: bximage.c,v 1.31 2005/11/20 20:26:35 vruppert Exp $
========================================================================
Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd]
What kind of image should I create?
Please type flat, sparse or growing. [flat]
Enter the hard disk size in megabytes, between 1 and 129023
[10]
mshost:/usr/local/bochs # ./bximage
========================================================================
bximage
Disk Image Creation Tool for Bochs
$Id: bximage.c,v 1.31 2005/11/20 20:26:35 vruppert Exp $
========================================================================
Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd] fd
Choose the size of floppy disk image to create, in megabytes.
Please type 0.16, 0.18, 0.32, 0.36, 0.72, 1.2, 1.44, 1.68, 1.72, or 2.88.
[1.44]
I will create a floppy image with
cyl=80
heads=2
sectors per track=18
total sectors=2880
total bytes=1474560
What should I name the image?
[a.img] a.img
Writing: [] Done.
I wrote 1474560 bytes to a.img.
The following line should appear in your bochsrc:
floppya: image="a.img", status=inserted
四、制作启动盘和根文件系统盘
首先按照步骤三再作一张b.img,然后运行下列命令:
dd if=bootimage-0.11-20040305 of=a.img
dd if=rootimage-0.11-20040305 of=b.img
五、启动
mshost:/usr/local/bochs # ./bochs
启动后会出现
Insert root floppy and press ENTER
之后cp b.img a.img(注意备份a.img),最后回车,linux-0.11就启动起来了! |
|