Click here to Skip to main content
13,590,119 members
Rate this:
Please Sign up or sign in to vote.
See more:
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


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

INT 0x10


JZ exit_function
CALL PrintCharacter
JMP next_character

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
Posted 6-Dec-12 3:47am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The assembler does not produce executable code, let alone bootable. The .bin file will need to be linked into an executable and then possibly post-processed into a bootable image. You also need to understand that you cannot make system calls (such as int 0x10) in a bootloader as there is no operating system to service them.

You need to get hold of some documentation about creating a boot loader and bootable images. There is a series of articles here on CodeProject which explains some of the techniques to do this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180618.1 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100