Page 2 of 2

Re:How to load the kernel from bootloader?

Posted: Sun Feb 29, 2004 11:07 pm
by Solar
beyond infinity wrote: *plonk* have you dared to smash your forehead onto the keyboard?
Traditionally, the sound it makes when a new entry is dropped into the killfile. ;-)

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 1:53 am
by bubach
I think i know what he wants, but he just wont listen to us..
In the FAT12.. thread we have a bootsector that loads a second stage loader, and in that second stage loader it loads the kernel.. FFS... All the things he need!

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 5:32 am
by distantvoices
vladaz, oh ye sinner, wilt thou forfeit some thoughts on that thing?

Nah, askin' questions is the eeeeasy way, but No, No, No, you will not get it spoon fed. I for one 've had to *learn* it by myself. It 'd have ashamed me to ask for info which can be researched.

*WHAM* (no, not early george michael thingses...)

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 6:39 am
by Pype.Clicker
just a fact:
you don't need a file system to load a kernel ... if you wrote your kernel so that it start on sector X and is N sectors-wide, you just have to read sectors X through X+N using the BIOS so that they go to the kernel's favourite location.

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 9:45 am
by Vladaz
Ok! I have the answer to my question, i think ;D .
I needed to load the kernel to memory from bootloader. One guy told me the manual about it. Thanks for help!

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 2:26 pm
by Vladaz
Hmm. Now i have another problem ??? .
I have two files: bootsec.bin and kernel.bin .
bootsec.bin load kernel.bin to memory and execute.
But when i copy bootsec.bin to my floppy disk by
partcopy bootsec.bin 0 200 -f0
and kernel.bin by
partcopy kernel.bin 200 200 -f0
, then my bootloader(bootsec.bin) doesn't boots on my emulator. But when i copy only bootsec.bin, then it writes "Booting Blablabla OS......".
So how i need to copy those two files into floppy to work my OS without any errors?

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 2:31 pm
by Vladaz
I forgot one more thing: bootsec.bin must be copied in first sector and kernel.bin in second sector of my floppy disk

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 6:14 pm
by Neo
Vladaz wrote: and kernel.bin by
partcopy kernel.bin 200 200 -f0
, then my bootloader(bootsec.bin) doesn't boots on my emulator.
i think you want partcopy kernel.bin 0 200 -f0 200 to write the kernel to the second sector. you cant write the file from source_offset 0x200 as you have.
Read the partcopy documentation you have for further details.

Re:How to load the kernel from bootloader?

Posted: Mon Mar 01, 2004 11:23 pm
by Solar
That's the problem - he obviously doesn't like to do much reading himself. ::)

Re:How to load the kernel from bootloader?

Posted: Tue Mar 02, 2004 7:46 am
by Pype.Clicker
alternatively, you can collate files together so that you'll do a single partcopy command:

Code: Select all

   copy /b bootsect.bin +kernel.bin allinone.bin
   partcopy whatever_relevant_options allinone.bin