I've searched the threads and Google and couldn't find anyone who had this same problem. However, there are a lot of threads,
so I apologize if this is an answered topic and would appreciate a link to such a thread. I've been using the boot.s
and linker.ld from the Bare Bones tutorial on the wiki. It's been working fabulously on qemu, but none of that
mattered when I attempted to boot onto my actual PC with GRUB2.
When I entered the GRUB2 command line and typed: multiboot (hd0,gpt6)<path>/myos.bin,I get the following
message: "Warning: no console will be available to OS"
I typed boot and hit enter anyway and the GRUB2 command line just stayed there with the commands I had typed
still on the screen, but nothing else happened. Just as GRUB2 had said, there was no console available.
The Multiboot specs didn't mention this warning, or else my Ctrl F didn't work.
My multiboot header is as follows:
Code: Select all
# Declare constants used for creating a multiboot header.
.set ALIGN, 1<<0
.set MEMINFO, 1<<1
.set FLAGS, ALIGN | MEMINFO
.set MAGIC, 0x1BADB002
.set CHECKSUM, -(MAGIC + FLAGS)
#the multiboot header
.section .multiboot
.align 4
.long MAGIC
.long FLAGS
.long CHECKSUM
Code: Select all
/* The bootloader will look at this image and start execution at the symbol
designated as the entry point. */
ENTRY(_start)
/* Tell where the various sections of the object files will be put in the final
kernel image. */
SECTIONS
{
/* Begin putting sections at 1 MiB, a conventional place for kernels to be
loaded at by the bootloader. */
. = 1M;
/* First put the multiboot header, as it is required to be put very early
early in the image or the bootloader won't recognize the file format.
Next we'll put the .text section. */
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot)
*(.text)
}
/* Read-only data. */
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
/* Read-write data (initialized) */
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
/* Read-write data (uninitialized) and stack */
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
*(.bootstrap_stack)
}
/* The compiler may produce other sections, by default it will put them in
a segment with the same name. Simply add stuff here as needed. */
}
I got "error: unsupported graphical mode type -2125244841"
If anyone else had this issue I would love to know how you solved it. Again, sorry if it's something silly, like needing
to change the flags to tell GRUB2 I'm booting a binary or something like that.