Page 1 of 1

How can I make a bootdisk?

Posted: Thu Mar 15, 2001 12:00 am
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

RE:How can I make a bootdisk?

Posted: Thu Mar 15, 2001 12:00 am
by ATG
IF YOU HAVE SOMETHING WORTH BOOTING;
I'LL WRITE THE BOOT SECTOR FOR YOU!

THAT'S A PROMISE!!!

RE:How can I make a bootdisk?

Posted: Thu Mar 15, 2001 12:00 am
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

RE:How can I make a bootdisk?

Posted: Fri Mar 16, 2001 12:00 am
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).