GRUB error 28

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
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

GRUB error 28

Post 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. #-o
This is too long to repost in my sig- but just look: How OS's would run the airlines
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: GRUB error 28

Post 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
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

Re: GRUB error 28

Post 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.
This is too long to repost in my sig- but just look: How OS's would run the airlines
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: GRUB error 28

Post by Combuster »

I suggest you actually read what I said instead of making a fool of yourself.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

Re: GRUB error 28

Post 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.
This is too long to repost in my sig- but just look: How OS's would run the airlines
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: GRUB error 28

Post by Combuster »

And you spent like, only two minutes on it?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

Re: GRUB error 28

Post 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.
This is too long to repost in my sig- but just look: How OS's would run the airlines
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: GRUB error 28

Post by Combuster »

Whatever you want, Mr. Reagan.

Please do your homework if you don't want to get caught riding the Fail Express.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

Re: GRUB error 28

Post by JayMay »

I still have not figured it out. HELP. Someone.
This is too long to repost in my sig- but just look: How OS's would run the airlines
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GRUB error 28

Post by gerryg400 »

Did you do this?
Use/Fix your linker script. ld links to a default address, which is not 1MB but rather 128MB.
If a trainstation is where trains stop, what is a workstation ?
JayMay
Posts: 8
Joined: Sun May 30, 2010 8:49 am

Re: GRUB error 28

Post 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?
This is too long to repost in my sig- but just look: How OS's would run the airlines
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: GRUB error 28

Post by gerryg400 »

Post it so someone can look for the problem
If a trainstation is where trains stop, what is a workstation ?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: GRUB error 28

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: GRUB error 28

Post by Tosi »

http://sourceware.org/binutils/docs/ld/Scripts.html
The manual. Read it. Learn it. Love it.
Post Reply