+ -
当前位置:首页 → 问答吧 → 请问我该怎么建立USBFS

请问我该怎么建立USBFS

时间:2010-11-01

来源:互联网

才开始读 Linux 内核,书的作者推荐用 bochs 虚拟机学操作系统很不错,于是装了一个,2.4.5 版本的,之后去 boshs 官网山下了一个linux镜像,自己对着网上说的配置方法加之自己的想像和不断的尝试,写出下面的配置文件:

megs: 32
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
vga: extension=vbe
floppya: 1_44=minibootable.img, status=inserted
boot: floppy
log: bochsout.txt
mouse: enabled=0
keyboard_mapping: enabled=1, map=/usr/local/share/bochs/keymaps/x11-pc-us.map

可是运行之后出错,出错提示如下:
Device: [BIOS]
Message:No bootable device

然后又去网上找了下,又写了一个(我很菜,刚开始接触,不知道原理)
megs: 32
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
floppya: 1_44=minibootable.img, status=inserted
floppyb: 1_44=floppyb.img, status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, path="/home/sky/Study/bochs/linux-img/minibootable.img", cylinders=306, heads=4, spt=17
boot: disk
log: bochsout.txt
mouse: enabled=0
keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map

悲剧的是还有错误提示:
Device: [HD]
Message:ata-0 disk size doesn't match specified geometry

看了一下随镜像一起的 README 文件,文件里说这是一个硬盘镜像,所以感觉第一个配置文件肯定是不对的,下面是 README 文件:
Tiny Linux 2.2.14 hard disk image
Sat Apr 2 14:14:10 CEST 2005
Volker Ruppert <[email protected]>

This directory contains a bootable 4-meg hard disk image and a .bochsrc file.
To start up Linux, you should be able to simply cd into this directory and
run bochs.

The bootable disk image was created using the following method:
1. make 4-meg empty file using dd if=/dev/zero...
2. run mke2fs to create a filesystem
3. mount the filesystem using loopback
4. copy contents of a redhat rescue disk into empty filesystem, and
copy a kernel into /boot. unmount.
5. boot bochs once using a LILO floppy, root=/dev/hda.
6. within bochs, set up lilo.conf to make /dev/hda bootable, run lilo to
make the hard disk image bootable
7. now boot hard disk image, floppy no longer needed.

If it is working, you will see "LILO boot:" followed by boot messages.
At the end, you see:

This is the Red Hat rescue disk. Most of the basic system commands are
in /bin.

Type exit to halt the system.

# _

Poke around a bit to test it. I'll include more diagnostics some day.
When you're done, type "exit" and then turn off the power.

求高手们解答,给一个能正常运行的配置文件,如果能屈尊讲讲 bochs 镜像配置文件方面的知识在下更是感激不尽!

作者: 忘尘晚风   发布时间: 2010-11-01