How can I make a bootdisk?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Mindless

How can I make a bootdisk?

Post by Mindless »

Hi
I am writing a program that should make
a bootdisk but I have still a little
problem :
I don't know what the values from
the registers CH and DH have to be.
( CH = track/cylinder number (0-1023)
DH = headnumber (0-15) )
thanks
ATG

RE:How can I make a bootdisk?

Post by ATG »

IF YOU HAVE SOMETHING WORTH BOOTING;
I'LL WRITE THE BOOT SECTOR FOR YOU!

THAT'S A PROMISE!!!
J. Weeks

RE:How can I make a bootdisk?

Post by J. Weeks »

>On 2001-03-15 19:55:49, ATG wrote:
>IF YOU HAVE SOMETHING WORTH BOOTING;
>I'LL WRITE THE BOOT SECTOR FOR YOU!
>
>THAT'S A PROMISE!!!

Can you write it so it loads a variable number of
sectors, from a run-length encoded filesystem, to
a variable location in memory, setup an idt and gdt,
enable the a20 line, enter pmode, setup the registers,
and then jump to the kernel?
In just 512 bytes?

I'm sure that'd help him out...
More helpful than that response, anyway.

We all started somewhere...

J. Weeks
Guest

RE:How can I make a bootdisk?

Post by Guest »

>Can you write it so it loads a variable number of
>sectors, from a run-length encoded filesystem, to
>a variable location in memory, setup an idt and
>gdt, enable the a20 line, enter pmode, setup the
> registers, and then jump to the kernel?

Not with a boot sector...
Problems:
- Funky hard drive geometry due to old BIOS standards.
(I havn't worked on disk functions yet.)

- The memory location specified in the kernel image
may not exist.

- Runtime configurable kernels may require BIOS
based disk access to load and process the exact-mactch
drivers for their chipset. (Not all OSes are as bad as linux).

>In just 512 bytes?

The right way? No, not a chance.

>I'm sure that'd help him out...
>More helpful than that response, anyway.

Why do you think he needs THAT boot loader?
I would never dream of writing a loader that put
the processor in p-mode. (though some
specifications require it).
Post Reply