GRUB Error 28: Selected item cannot fit in memory

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
ClemensU42
Posts: 1
Joined: Tue Oct 12, 2021 12:29 pm

GRUB Error 28: Selected item cannot fit in memory

Post by ClemensU42 »

Hi everyone.

I've just started my first serious attempt at os development and I already set up a cmake system for the os. But now when I try adding C scripts, I get this error:

Code: Select all

kernel /boot/kernel.elf
   [Multiboot-elf, <0xff000:0x154:0x0>

Error 28: Selected item cannot fit into memory
I already looked for possible solutions but none of them worked for me. The kernel itself looks fine though and the multiboot header is also working so I don't really have any idea why this error does occur.

The repo with all the code is here: https://github.com/ClemensU42/ShadowOS
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: GRUB Error 28: Selected item cannot fit in memory

Post by Octocontrabass »

It's probably because you're not using a cross-compiler.

You really should be using a cross-compiler.
User avatar
deadmutex
Member
Member
Posts: 85
Joined: Wed Sep 28, 2005 11:00 pm

Re: GRUB Error 28: Selected item cannot fit in memory

Post by deadmutex »

Are you sure your linker flags are set properly? You'd need to pass your linker script to ld.
Post Reply