flat assembler
Message board for the users of flat assembler.

Index > OS Construction > wanna make a boot loader compatible to GRUB

Author
Thread Post new topic Reply to topic
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
hi all,
i am not sure if post it here or in Linux section.
basically i want to write a simple OS, and want it's boot loader to be loaded from file system using grub (from grub command line?)

does anybody have any help?

_________________
Attitude!
Post 25 Jan 2009, 08:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Do you mean you want to "boot" your OS from a Linux command line?

If so, then just give ring0 access to your boot loader, come out of protected mode (this part can be tricky to make sure the memory is mapped correctly), and execute your OS with a jmp.
Post 25 Jan 2009, 08:53
View user's profile Send private message Visit poster's website Reply with quote
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
thanks revolution,
but what i was thinking is:
suppose i need to make a hello world OS, and a hello world boot loader Smile
i either need a floppy for boot loader or need to risk my hard disk partition (if i write BL there)
what if my boot loader is not in the 1st sector of floppy or HD?
can i just follow some grub conventions (so that grub can load my BL), and create arbitrary no. of BL in my, say, home directory, so that i can choose whichever of my BLs from GRUB command line?

makes sense?
Post 25 Jan 2009, 09:02
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
There are also USB and CD booting available. Perhaps also a VM for your testing?
Post 25 Jan 2009, 09:09
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
revolution wrote:
..come out of protected mode (this part can be tricky to make sure the memory is mapped correctly) ..
another disadvantage and hassle caused by paged memory!
Sorry, couldn't help myself Laughing

_________________
FAMOS - the first memory operating system
Post 25 Jan 2009, 09:21
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
neville wrote:
revolution wrote:
..come out of protected mode (this part can be tricky to make sure the memory is mapped correctly) ..
another disadvantage and hassle caused by paged memory!
Sorry, couldn't help myself Laughing
Ah, neville the incorrigible. Wink
Post 25 Jan 2009, 09:54
View user's profile Send private message Visit poster's website Reply with quote
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
Quote:
There are also USB and CD booting available. Perhaps also a VM for your testing?

revolution can you point me to any such site/tutorial for learning this?
Post 25 Jan 2009, 11:15
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
Post 25 Jan 2009, 11:20
View user's profile Send private message Visit poster's website Reply with quote
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
thanks Smile
Post 25 Jan 2009, 11:34
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.