如何在VMWare中运行我的引导加载程序? [英] How to run my Boot Loader in VMWare?

查看:135
本文介绍了如何在VMWare中运行我的引导加载程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在VMWare中使用Ubuntu作为虚拟机。

我用这段代码编写了一个可以在屏幕上编写Hello world的启动加载程序。



[BITS 16]

[ORG 0x7C00]



MOV SI,HelloString

CALL PrintString

JMP $





PrintCharacter:



MOV AH,0x0E

MOV BH,0x00

MOV BL,0x07



INT 0x10

RET



打印字符串:



next_character:

MOV AL,[SI]

INC SI

或者AL,AL

JZ exit_function

CALL PrintCharacter

JMP next_character

exit_function:

RET



HelloString db''Hello World'',0



TIMES 510 - ($ - $$)db 0

DW 0xAA55



我在Ubuntu的文本编辑器中编写了这段代码并将文件保存为Boot.asm

然后我使用此命令将Boot.asm编译为boot.bin文件



nasm -f bin -o boot.bin Boot。 asm



并没有给我任何错误。之后我将boot.bin文件复制到我的usb并将其带到我的Windows操作系统。在此之后我将boot.bin文件刻录到boot.img和boot.iso文件。

然后我创建了一个新的虚拟机器并将其命名为booter,当它要求操作系统的.iso文件时我想运行我给它boot.iso文件,关于我上面说的,然后我打开那个虚拟机,但它给了我这个错误



PXE- M0F:没有收到启动文件名

PXE-M0F:退出Intel PXE ROM

找不到操作系统



请告诉我主要问题是什么,我怎么能解决这个问题

Hi,
I am using Ubuntu as a virtual machine in VMWare.
I have used this code to write a boot loader which would write Hello world on the screen.

[BITS 16]
[ORG 0x7C00]

MOV SI, HelloString
CALL PrintString
JMP $


PrintCharacter:

MOV AH, 0x0E
MOV BH, 0x00
MOV BL, 0x07

INT 0x10
RET

PrintString:

next_character:
MOV AL, [SI]
INC SI
OR AL, AL
JZ exit_function
CALL PrintCharacter
JMP next_character
exit_function:
RET

HelloString db ''Hello World'', 0

TIMES 510 - ($ - $$) db 0
DW 0xAA55

I wrote this code in the text editor in Ubuntu and saved the file as Boot.asm
Then i complied the Boot.asm to boot.bin file by using this command

nasm -f bin -o boot.bin Boot.asm

and it didn''t gave me any errors. After that i copied the boot.bin file to my usb and took it to my Windows OS. After this i burned the boot.bin file to boot.img and boot.iso files.
Then i created a new virtual machhine and named it booter, when it asked for the .iso file of the OS i want to run i gave it the boot.iso file, about which i told above, then i powered on that virtual machine but it gave me this error

PXE-M0F: No boot filename received
PXE-M0F: Exiting Intel PXE ROM
Operating System not found

Please tell me what is the main problem and how can i over come that problem

推荐答案







PrintCharacter:



MOV AH,0x0E

MOV BH,0x00

MOV BL,0x07



INT 0x10

RET



PrintString:



next_character:

MOV AL,[SI]

INC SI

OR AL ,AL

JZ exit_function

CALL PrintCharacter

JMP next_character

exit_function:

RET



HelloString db''Hello World'',0



TIMES 510 - (



PrintCharacter:

MOV AH, 0x0E
MOV BH, 0x00
MOV BL, 0x07

INT 0x10
RET

PrintString:

next_character:
MOV AL, [SI]
INC SI
OR AL, AL
JZ exit_function
CALL PrintCharacter
JMP next_character
exit_function:
RET

HelloString db ''Hello World'', 0

TIMES 510 - (


-


)db 0

DW 0xAA55



我在Ubuntu的文本编辑器中编写了这段代码并将文件保存为Boot.asm

然后我编译了Boot。 asm到boot.bin文件使用这个命令



nasm -f bin -o boot.bin Boot.asm



并没有给我任何错误。之后我将boot.bin文件复制到我的usb并将其带到我的Windows操作系统。在此之后我将boot.bin文件刻录到boot.img和boot.iso文件。

然后我创建了一个新的虚拟机器并将其命名为booter,当它要求操作系统的.iso文件时我想运行我给它boot.iso文件,关于我上面说的,然后我打开那个虚拟机,但它给了我这个错误



PXE- M0F:没有收到启动文件名

PXE-M0F:退出Intel PXE ROM

找不到操作系统



请告诉我主要问题是什么,我怎么能解决这个问题
) db 0
DW 0xAA55

I wrote this code in the text editor in Ubuntu and saved the file as Boot.asm
Then i complied the Boot.asm to boot.bin file by using this command

nasm -f bin -o boot.bin Boot.asm

and it didn''t gave me any errors. After that i copied the boot.bin file to my usb and took it to my Windows OS. After this i burned the boot.bin file to boot.img and boot.iso files.
Then i created a new virtual machhine and named it booter, when it asked for the .iso file of the OS i want to run i gave it the boot.iso file, about which i told above, then i powered on that virtual machine but it gave me this error

PXE-M0F: No boot filename received
PXE-M0F: Exiting Intel PXE ROM
Operating System not found

Please tell me what is the main problem and how can i over come that problem


这篇关于如何在VMWare中运行我的引导加载程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆