Monday, December 24, 2012

Hello World Boot Loader

This sample makes you know how to write your own boot loader.

At first, visit Hello World Boot Loader to learn how to write a boot loader, so you can copy and paste the source in it to your local file.

Secondly, use the following command to compile boot.asm:

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

Thirdly, we burn the boot.bin to image or iso file, and you will use mkisofs file, for windows user, you can download it from http://fy.chalmers.se/~appro/linux/DVD+RW/tools/win32/mkisofs.exeAnd then use the following command to create a bootable iso.


mkisofs -no-emul-boot -boot-load-size 4 -V 'gos' -input-charset iso8859-1 -o gos.iso -b boot.bin ./

Finally, you can use vmplayer or virtualbox to create a virtual machine using your iso to see how it work.