Bootloader Problems... again.

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
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Bootloader Problems... again.

Post 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.
Last edited by djnorthyy on Tue Jan 01, 2008 4:53 am, edited 1 time in total.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
Bobalandi
Member
Member
Posts: 107
Joined: Mon Dec 03, 2007 7:26 am
Location: Near Boston, MA
Contact:

Post by Bobalandi »

Ummm... as far as grub, did you edit the menu.cfg or menu.lst, or what ever file?
NULL
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Post by djnorthyy »

Yes, I tried editing that but it still does not work!
Umm...
What is this for?
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
Bobalandi
Member
Member
Posts: 107
Joined: Mon Dec 03, 2007 7:26 am
Location: Near Boston, MA
Contact:

Post 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?
NULL
ChristianF
Member
Member
Posts: 79
Joined: Sun Jun 10, 2007 11:36 am

Post 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.
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Thanks

Post by djnorthyy »

After some more playing around I finally managed to get it to work!

Thanks for your help!

Harry.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
packet50071
Member
Member
Posts: 43
Joined: Sat Dec 22, 2007 2:27 pm
Location: canada

Post 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 ;)
Technology is here to make things easier not harder.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post 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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Bootloader Problems... again.

Post 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.
Post Reply