I made my kernel for my operating system. I want to boot the kernel with the GRUB boot loader. How do I link my .bin
file created by the i686-elf-gcc
using the -T
parameter with GRUB? Any suggestions on how to do this?
Asked
Active
Viewed 392 times
2

Razor
- 1,778
- 4
- 19
- 36
-
I'm not convinced that this question is on-topic here. It feels more like something that will better fly on [Unix & Linux](http://unix.stackexchange.com/help/on-topic) but check their help center first. – rene Jan 09 '16 at 14:38
-
2If your kernel/BIN needs to be in real mode to begin with you'd need to use the `chainloader`option in GRUB. The easiest way of doing that is creating a bootable ISO image. There is an example of that in this answer http://stackoverflow.com/a/32920643/3857942 – Michael Petch Jan 09 '16 at 17:02
-
1An example of creating a multiboot compliant kernel that runs in protected mode and can be loaded directly with GRUB can be found in Ciro Santilli's bare metal github repository https://github.com/cirosantilli/x86-bare-metal-examples/tree/d1f11492c2d2828c9c713d75b6f173da955aafc3/multiboot/hello-world – Michael Petch Jan 09 '16 at 17:16
1 Answers
1
To create the GRUB file, you can visit this link. It contains info about how to link your assembly and c kernel file and how to create a GRUB configuration file to create a bootable ISO file with the GRUB bootloader on it. The only thing about that tutorial is it expects you to have the gcc cross-compiler setup or the commands will not all work.

Razor
- 1,778
- 4
- 19
- 36