Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Grub2 Can't find Multiboot header #140

Closed
RossComputerGuy opened this issue Jan 3, 2017 · 21 comments
Closed

Grub2 Can't find Multiboot header #140

RossComputerGuy opened this issue Jan 3, 2017 · 21 comments

Comments

@RossComputerGuy
Copy link

Hey, I'm using grub2 to boot runtime but Grub2 says that it can't find the multiboot header.

@piranna
Copy link

piranna commented Jan 3, 2017

Do you know if runtime.js is a multiboot compliant kernel? Have you searched for the multiboot magic number? If not, it would be a good and somewhat easy addition :-)

@piranna
Copy link

piranna commented Jan 3, 2017

Ok, it's multiboot compliant. So, when does your error shows up?

@RossComputerGuy
Copy link
Author

when multiboot /boot/runtime is executed

@piranna
Copy link

piranna commented Jan 3, 2017

Is that a command? How are you executing it?

@RossComputerGuy
Copy link
Author

it is, Grub2 boot config source code:

set timeout=10
set color_highlight=black/white
set color_normal=green/black

function graphics() {
	loadfont /boot/unicode.pf2
	set gfxmode=1024x768
	set gfxpayload=keep
	terminal_output gfxterm
}

graphics()

menuentry "ModernOS" {
	loadfont /boot/unicode.pf2
	set gfxmode=1024x768
	set gfxpayload=keep
	terminal_output gfxterm
	multiboot /boot/runtime
	boot
}

@piranna
Copy link

piranna commented Jan 3, 2017

How are you trying to exec it, on real hardware? Have you tried to run it on QEmu? It will be easier, you can be able to give it directly a multiboot kernel (I have done it myself in the past, also from scratch). Also, currently runtime.js only have drivers for virtio (virtual) devices...

@RossComputerGuy
Copy link
Author

it works on qemu using the rom/kernel option

@piranna
Copy link

piranna commented Jan 3, 2017

Ok, so seems it's an issue with Grub2. Have you tried syslinux? It's fairly easier to work with and install, in fact it's what I'm using in NodeOS.

@RossComputerGuy
Copy link
Author

not yet

@piranna
Copy link

piranna commented Jan 3, 2017

I would stick by the moment with the QEmu -kernel option, but if you are willing to use a bootloader, give syslinux a try ;-)

@RossComputerGuy
Copy link
Author

I need help running syslinux to create a disk image from my disk directory

@piranna
Copy link

piranna commented Jan 3, 2017

to create the disk image use genfatfs

@RossComputerGuy
Copy link
Author

How do I get that command, I dont have it

@facekapow
Copy link
Contributor

You could also use runtime-cli's mkimg to generate a disk:

runtime mkimg --size <how big you want it (e.g. 10G for 10 gigabytes)> --label "MODERNOS" disk.img

@RossComputerGuy
Copy link
Author

I found out that Grub2 doesn't have x64 support for non-linux kernels.

@RossComputerGuy
Copy link
Author

I can design a bootloader and call it Runtime.js Boot Manager

@piranna
Copy link

piranna commented Jun 23, 2017 via email

@RossComputerGuy
Copy link
Author

running readelf on the kernel outputs: readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

@piranna
Copy link

piranna commented Jun 23, 2017 via email

@RossComputerGuy
Copy link
Author

I got it to work now

@piranna
Copy link

piranna commented Jun 23, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants