Monday, December 31, 2007

Preparation to write a boot loader

How does one go about writing a boot loader ? Well, for starters, one needs the right kind of setup, given the fact that writing boot loader's can easily screw things up. So it is better to work with them in a sandbox.

Here's my setup

1. Microsoft Virtual PC (or any such emulator)

2. FreeDOS (Download the iso image. I used the base image.)

3. NASM DOS 32 bit binaries

4. ISO Recorder by Alex Feinman

and of course, instructions on how to go about building a boot loader from Hello World Boot Loader.

Here's what I did:

1. Extract NASM to a folder, and build an ISO of the extracted folder using ISORecorder.

2. Using VPC 2007, build a virtual machine for OS "Other."

3. Build a Virtual Floppy in VPC 2007 as the instructions in the guide assume a floppy.

4. Boot the virtual machine using the freedos iso and install freedos.

5. Now, mount the NASM iso in the machine and copy NASM to a folder, say C:\NASM, and add C:\NASM\ to the PATH.

Now, you are ready to follow the guide.

bootldr programming using virtual pc

I will continue my adventures with boot-loaders in the next few posts.


No comments:

Post a Comment