GRUB2 configuration with linux long mode kernel

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
jamesread
Member
Member
Posts: 49
Joined: Wed Dec 09, 2020 11:32 am

GRUB2 configuration with linux long mode kernel

Post 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.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: GRUB2 configuration with linux long mode kernel

Post 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?
jamesread
Member
Member
Posts: 49
Joined: Wed Dec 09, 2020 11:32 am

Re: GRUB2 configuration with linux long mode kernel

Post by jamesread »

I don't think so. I was aiming for a bare minimum.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: GRUB2 configuration with linux long mode kernel

Post by Octocontrabass »

How is it supposed to mount that filesystem without the code for reading that filesystem?
Post Reply