Page 1 of 1

GRUB2 configuration with linux long mode kernel

Posted: Sun Dec 27, 2020 10:49 am
by jamesread
I made a linux compatible long mode kernel by copying a number of files from the linux source code and was able to compile it and run it in qemu. Here is a screen shot from qemu in legacy mode:
Screenshot from 2020-12-27 16-43-37.png
I am bit confused by the output. Here is my grub.cfg file:

Code: Select all

set timeout=15
set default=0 # Set the default menu entry

menuentry "MYOS" {
   linux /boot/kernel-file root=sr0
}
I set root=sr0 as the ouput suggests but still getting the same kernel panic.

Re: GRUB2 configuration with linux long mode kernel

Posted: Sun Dec 27, 2020 2:39 pm
by Octocontrabass
jamesread wrote:I made a linux compatible long mode kernel by copying a number of files from the linux source code
Did you copy the parts that handle the partition table and filesystem on your disk?

Re: GRUB2 configuration with linux long mode kernel

Posted: Sun Dec 27, 2020 3:08 pm
by jamesread
I don't think so. I was aiming for a bare minimum.

Re: GRUB2 configuration with linux long mode kernel

Posted: Sun Dec 27, 2020 3:31 pm
by Octocontrabass
How is it supposed to mount that filesystem without the code for reading that filesystem?