OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:28 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: use GRUB to boot
PostPosted: Sun Oct 20, 2019 11:20 am 
Offline
Member
Member

Joined: Mon Mar 14, 2016 5:34 am
Posts: 40
i want to test my hobby os with Grub. to boot , i have to copy a file at a specific adress and jump to it in real mode but i dont find the right way to do it with grub. is it possible? and how can i do?
for now i use the nework booting (PXE) and it work fine


Top
 Profile  
 
 Post subject: Re: use GRUB to boot
PostPosted: Sun Oct 20, 2019 11:51 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
nlg wrote:
is it possible?

No. GRUB can only boot your OS in protected mode, not real mode.

If you would like to modify your OS so GRUB can load it, you'll need to look at the multiboot specification.


Top
 Profile  
 
 Post subject: Re: use GRUB to boot
PostPosted: Sun Oct 20, 2019 12:57 pm 
Offline
Member
Member

Joined: Mon Mar 14, 2016 5:34 am
Posts: 40
i found the command "chainloader" to load file, i dont found any information where the file is exacly loaded but it seem to be used in Dos or Windows booting so i think the file is loaded in the adress 7C00h and the command "boot" jump to it
if the command work like i this, it was perfect function for me, now i have to install grub on a usb key to test it


Top
 Profile  
 
 Post subject: Re: use GRUB to boot
PostPosted: Sun Oct 20, 2019 1:37 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
You can use chainloader to boot DOS from grub, but it chains to another boot loader. Unless you want to boot multiple operating systems, that rather defeats the purpose of using grub.

https://www.gnu.org/software/grub/manua ... 02dloading


Top
 Profile  
 
 Post subject: Re: use GRUB to boot
PostPosted: Sun Oct 20, 2019 4:26 pm 
Offline
Member
Member

Joined: Mon Mar 14, 2016 5:34 am
Posts: 40
alas for me, chainloader only loads the 512 first byte of the file (i test it)

my home bootloader loads an image from a partition and I hope to replace it with grub. at least I can multiboot with my OS even if I still have to sacrifice a MBR partition for that (or I can try to make my kernel multiboot compatible)

thank you all for your indication, it helped me a lot


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 61 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group