Page 1 of 1
GRUB error 28
Posted: Fri Jun 18, 2010 1:53 am
by JayMay
When booting my kernel in GRUB I receive:
Code: Select all
[Multiboot-elf, <0x8048000:0xb7:0x0>]
Error 28: Selected item cannot fit into memory.
The kernel is 2 blocks long, and I am feeding GRUB 'kernel 200+2'.
I am at a loss to correct this problem. The kernel was just compiled by my new cross-compiler. I removed error 13 with the cross compiler but now I have this. I think the problem is related to the .text section in my assembly loader, but I am unsure. This kernel and all other code is EXACTLY as the bare bones tutorial describes, including this .text section.
Basically, I need help.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:18 am
by Combuster
Use/Fix your linker script. ld links to a default address, which is not 1MB but rather 128MB. I don't think the emulator provides that much RAM for you
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:19 am
by JayMay
OP Here. I am NOT hosting and building on a x64 arch to target a x32 arch. there is another GRUB error 28 post in the forums relating to that. That is not my problem, in so far as I know.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:27 am
by Combuster
I suggest you actually read what I said instead of making a fool of yourself.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:29 am
by JayMay
I am too noob. How do I do that? I looked at the bnutils docs on linker scripts aka
http://sourceware.org/binutils/docs-2.19/ld/ and was unable to figure this out.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:30 am
by Combuster
And you spent like, only two minutes on it?
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:33 am
by JayMay
I was in the process of posting that above without reading your post. My post above had nothing to do wit your suggestion. I was not making a fool of myself.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 3:40 am
by Combuster
Whatever you want, Mr. Reagan.
Please do your homework if you don't want to get caught riding the Fail Express.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 6:02 pm
by JayMay
I still have not figured it out. HELP. Someone.
Re: GRUB error 28
Posted: Fri Jun 18, 2010 6:37 pm
by gerryg400
Did you do this?
Use/Fix your linker script. ld links to a default address, which is not 1MB but rather 128MB.
Re: GRUB error 28
Posted: Sun Jun 20, 2010 7:24 am
by JayMay
I have tried. But I do not know how. I am admitting defeat, as I am an experienced usermode application programmer, but my skills with linker scripts are failing me. Standard win32 programming almost never requires manual modification of a linker script. In OS development I obviously need to know, so any help would be appreciated, specifically, how do I force the linker script to not link by defaulting to 128mb?
Re: GRUB error 28
Posted: Sun Jun 20, 2010 7:43 am
by gerryg400
Post it so someone can look for the problem
Re: GRUB error 28
Posted: Sun Jun 20, 2010 7:45 am
by Combuster
This kernel and all other code is EXACTLY as the bare bones tutorial describes
Somehow, I find it strange that you did find the relevant tutorial but neglected the linker script contained in there. As well as
again not doing your homework.
Re: GRUB error 28
Posted: Sun Jun 20, 2010 11:41 am
by Tosi