vmlinux loading process

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
osdevxp
Posts: 2
Joined: Wed Jan 25, 2017 2:32 am

vmlinux loading process

Post by osdevxp »

i had been developing my own operating system using wiki.osdev.org and due to some reasons i had to abort my os development. But now i have come back to begin it again. I have successfully booted into protected mode and now i am in the kernel land. Everything is going great.
I was just making an iso image for my beginner os when a question came to my mind.
Can anyone tell me from an operating system developer point of view that how does grub load and run vmlinux [which is the linux kernel file].
What are the different steps which are included in the process.



Thanks in Advance !!
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: vmlinux loading process

Post by onlyonemac »

You're looking for multiboot.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
osdevxp
Posts: 2
Joined: Wed Jan 25, 2017 2:32 am

Re: vmlinux loading process

Post by osdevxp »

i am not exactly finding that. I am finding the steps that include in the process of grub loading the kernel. The possibilities could be that it uses the required filesystem to read and load the kernel file from the specified disk and partition.
Please do correct me if i am wrong.
And if those are steps then how to does it do that. I mean how does it load the kernel in the RAM.
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: vmlinux loading process

Post by iansjack »

The source code for GRUB is freely available for study.
onlyonemac
Member
Member
Posts: 1146
Joined: Sat Mar 01, 2014 2:59 pm

Re: vmlinux loading process

Post by onlyonemac »

osdevxp wrote:And if those are steps then how to does it do that. I mean how does it load the kernel in the RAM.
That's an implementation detail. In simple cases you could use the BIOS. In more complex cases you might need to implement basic FDC, IDE, and SATA support.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Post Reply