Page 1 of 1

Bootloader Problems... again.

Posted: Mon Dec 31, 2007 4:57 pm
by djnorthyy
Hey.

I am writing my own C++ kernel and intend to use GRUB as the bootloader until I can make my own. As I am running a windows machine, I have had to try a precompiled .img file to use GRUB.

Now onto the problem. I have set up my VMWare Workstation to boot of the GRUB image that I downloaded from JamesM kernel development tutorial. When it starts up all it comes up with is the usual boot screen and then just hangs on the
Starting up....
screen. I have go one to develop a screen driver using the same set of kernel development tutorials and whatever I try, nothing seemes to get it to boot my kernel!

I have tryed changing to directory structer, placeing my kernel.bin file in every different folder and place i can think of and nothing will work! When i compile my kernel all it comes up with is warning messages so i assum that this is not the cause as it compiles ok?

I have also tryed bootf bootloader and VMWare threw up an error about a kernel stack fault. If anyone has any help on how to run a kernel with either bootloader (bootf preferd) and example kernels to go with them. When compileing the example kernel that comes with bootf i get errors when jloc trys to compile the .c version. These errors are

Code: Select all

 Failed first pass open:kernel.o
Failed seconds pass open:kernel.o
Also if anyone has any one had any tutorials on developing a bootloader from scratch, then please let me know.I am very grateful for your help :) I know you guys do this out of free will, so thanks and sorry if this is a typical beginner OS dev question.

Many, many thanks.
Harry.

Posted: Mon Dec 31, 2007 10:33 pm
by Bobalandi
Ummm... as far as grub, did you edit the menu.cfg or menu.lst, or what ever file?

Posted: Tue Jan 01, 2008 4:52 am
by djnorthyy
Yes, I tried editing that but it still does not work!
Umm...
What is this for?

Posted: Tue Jan 01, 2008 6:36 am
by Bobalandi
(The umm was because I was thinking :D) and did you set the location of your Kernel to the absolute location? If you have the file, may I see It?

Posted: Wed Jan 02, 2008 5:25 am
by ChristianF
Hi
I am using the GRUB image from Bran's Kernel Developement Tutorial:
http://www.osdever.net/bkerndev/index.php

Can you post your grub config file (menu.lst), because I think that there is
something wrong, because I had this problem at the beginning too.

A very good Bootloader Tutorial is in this: http://www.brokenthorn.com/Resources/OSDevIndex.html

Cheers
Christian

PS: My English is not very good at the moment.

Thanks

Posted: Wed Jan 02, 2008 4:21 pm
by djnorthyy
After some more playing around I finally managed to get it to work!

Thanks for your help!

Harry.

Posted: Wed Jan 16, 2008 7:06 pm
by packet50071
if don't mind can u please explain what u did or - pass me a working cpy :) thx

edit: never mind - i just read in your website that ur using grub which i was using too :( -- I don't wanna use grub - i want the Os to load automatically but the grub asks for user input - how about in ur case ?
btw cool website ;)

Posted: Wed Jan 16, 2008 8:01 pm
by frank
You could add

Code: Select all

timeout 0
to your menu.lst file and GRUB will automatically load the first entry without prompting.

Re: Bootloader Problems... again.

Posted: Thu Jan 17, 2008 4:47 am
by JamesM
djnorthyy wrote:Hey.

I am writing my own C++ kernel and intend to use GRUB as the bootloader until I can make my own. As I am running a windows machine, I have had to try a precompiled .img file to use GRUB.

Now onto the problem. I have set up my VMWare Workstation to boot of the GRUB image that I downloaded from JamesM kernel development tutorial. When it starts up all it comes up with is the usual boot screen and then just hangs on the
Starting up....
screen. I have go one to develop a screen driver using the same set of kernel development tutorials and whatever I try, nothing seemes to get it to boot my kernel!

I have tryed changing to directory structer, placeing my kernel.bin file in every different folder and place i can think of and nothing will work! When i compile my kernel all it comes up with is warning messages so i assum that this is not the cause as it compiles ok?

I have also tryed bootf bootloader and VMWare threw up an error about a kernel stack fault. If anyone has any help on how to run a kernel with either bootloader (bootf preferd) and example kernels to go with them. When compileing the example kernel that comes with bootf i get errors when jloc trys to compile the .c version. These errors are

Code: Select all

 Failed first pass open:kernel.o
Failed seconds pass open:kernel.o
Also if anyone has any one had any tutorials on developing a bootloader from scratch, then please let me know.I am very grateful for your help :) I know you guys do this out of free will, so thanks and sorry if this is a typical beginner OS dev question.

Many, many thanks.
Harry.
So how did you fix it? this is possibly a known bug to do with the stack that GRUB passes, but I've never known it hit without some user fiddlage with the code.