GRUB crashing

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
mich
Posts: 18
Joined: Sun Nov 11, 2012 5:36 pm

GRUB crashing

Post by mich »

Hi,

I have one old computer, which I thought I could use as a development box. However, I found that GRUB (both 0.97 and 1.98) crashes on it.

GRUB's boot prompt and console come up fine but when loading any OS, even a simple "L0; cli; hlt; jmp L0;" causes a reset (presumably even before the OS is reached). It doesn't even matter what GRUB is trying to load. Same boot device, however, works on other hardware (and software emulators).

Other bootup code and bootloaders work fine on the offending machine. But these are not as powerful and comfortable as GRUB or any other Multiboot bootloader for that matter.

Has anyone else had similar experience? Is there a workaround? Any other good free open source Multiboot compliant bootloaders?

Thank you for your attention.

EDIT: It is a Fujitsu Siemens Scenic D i845g system with an yet to be identified P4 CPU.
Last edited by mich on Mon Nov 12, 2012 2:18 am, edited 1 time in total.
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: GRUB crashing

Post by linguofreak »

Exactly how old is the machine?
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GRUB crashing

Post by gerryg400 »

I have a 3 yr old machine on which Grub 0.96 doesn't work.
If a trainstation is where trains stop, what is a workstation ?
mich
Posts: 18
Joined: Sun Nov 11, 2012 5:36 pm

Re: GRUB crashing

Post by mich »

linguofreak wrote:Exactly how old is the machine?
I forgot to mention that it is a Fujitsu Siemens Scenic D i845g system with an yet to be identified P4 CPU. So its from 2002 ... 2004.
mich
Posts: 18
Joined: Sun Nov 11, 2012 5:36 pm

Re: GRUB crashing

Post by mich »

pitfall wrote:I guess your hardware has a watchdog timer. This produces a hardware reset when entering halt state with IF cleared. I got the same problem with an old dell.
No. I don't think so, because (and correct me if I'm wrong)

Code: Select all

boot:
	cli ; works with out cli as well
	hlt ; also without hlt
	jmp boot ; also with only this jmp

	times 510-($-$$) db 0
	db 0x55
	db 0xaa
works fine.
Or does the watchdog timer only manifest when in Protected Mode or some other setup has been performed?

The problem really seems to be that GRUB has not even come to the point where it hands over control to my system when the PC resets.

Anyway I will try to build the latest version of GRUB and test with that.

This is really frustrating. All I want to do is OS development and not constantly mess with unrelated hardware/software problems ... Is this the point where I should roll my own boot loader? :P
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: GRUB crashing

Post by bluemoon »

mich wrote:Is this the point where I should roll my own boot loader? :P
If that sound interesting for you, go ahead; just define the boot sequence and interface properly so that you can always go back for GRUB or other "complete boot loader"
User avatar
BMW
Member
Member
Posts: 286
Joined: Mon Nov 05, 2012 8:31 pm
Location: New Zealand

Re: GRUB crashing

Post by BMW »

mich wrote:Is this the point where I should roll my own boot loader? :P
I say go for it. It's not hard.
Currently developing Lithium OS (LiOS).

Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: GRUB crashing

Post by neon »

Hello,
BMW wrote:
mich wrote:Is this the point where I should roll my own boot loader? :P
I say go for it. It's not hard.
Not entirely true. Boot loaders can get complicated and large depending on the design goals. GrUB is one such example. Of course, its relatively easy to write a simple VBR to parse and execute a file, but that's hardly a boot loader.

Unfortunately I don't use GrUB so cannot address the original posters questions. If you do decide to write your own boot loader, I encourage following Bluemoon's advice above.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Post Reply