2

所以几天前,我冒险进入了操作系统开发的未知领域。作为一种“Hello, World”程序,我在汇编中创建了这个引导加载程序:

;*********************************************
;   Boot1.asm
;       - A Simple Bootloader
;
;   Operating Systems Development Tutorial
;*********************************************

org     0x7c00              ; We are loaded by BIOS at 0x7C00

bits    16                  ; We are still in 16 bit Real Mode

Start:

    cli                 ; Clear all Interrupts
    hlt                 ; halt the system

times 510 - ($-$$) db 0             

dw 0xAA55

然后,我使用 NASM 将程序集文件编译成 .bin 文件。接下来,我使用 PowerISO 将这个二进制文件转换为 ISO 文件。最后,我将 ISO 文件附加到 Microsoft Virtual PC 2007 中。当它最初不起作用时,我检查了 BIOS 并确保 CD/DVD 在启动优先级列表中排在首位。之后我尝试启动系统时,它给了我以下错误:

“重新启动,并选择适当的引导设备 ”

在互联网上搜索后,我发现这意味着 ISO 无法启动。当我对如何解决这个问题进行更多研究时,除了必须正确配置 ISO 才能启动之外,我找不到太多东西。我将如何去做,如果不可能,我还有什么其他选择?

我正在运行 64 位 Windows 7 家庭高级版。

4

2 回答 2

2

Your program represents a master boot record, not a bootable ISO image. It works fine when booted as a harddisk with for instance QEMU. Not all virtual machines will accept a harddisk image that small though. In that case you would first create a harddisk image, and then overwrite the first sector with your program.

Making a bootable ISO image is a bit more complex. Read this wiki for more information.

于 2012-11-03T12:30:58.933 回答
0

我知道您使用的是 Microsoft Virtual PC(顺便说一下,我认为它只能启动 Windows),但我建议您使用其他东西。这里有几个选项(全部免费):

  • Virtualbox:这款免费的虚拟化软件可能会让您更轻松地启动操作系统。
  • QEMU:我和操作系统开发人员的最爱,它使调试和尝试自定义操作系统变得非常容易。另一方面,我认为它仅在基于 UNIX 的系统上可用,因此请准备好使用 Linux Vm 或 Mac,或者安装 Linux。
于 2012-11-03T01:33:35.360 回答