OS without GRUB

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
osdev1995
Posts: 1
Joined: Mon Dec 08, 2014 11:23 am

OS without GRUB

Post by osdev1995 »

I wanted to create my own bootloader instead of using GRUB. I have completed the meaty skelton tutorial, is there any way to replace GRUB with my own bootloader or I have to create it again from scratch?
Can anyone provide good tutorial for creating a boot loader?
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: OS without GRUB

Post by Schol-R-LEA »

In essence, what you're proposing to do is write your own version of a multiboot-compliant loader, which is not a small project. Unless you are chain-loading from GRUB already (and not using its facilities for setting up protected mode etc.), you will find that the effort is considerable. Now, I won't discourage you - perhaps that is precisely the challenge you are looking for - but I won't recommend it either, unless you have requirements for your OS that preclude using GRUB. Since you already are using GRUB, I would suggest you are better off focusing on the OS itself, not the loader, which after all represents only a tiny fraction of the running time of a working system.

(OK, so I am open to accusations of hypocrisy here, as I do intend to implement my own MB 2.0 loader for UEFI. However, I have good reasons for writing the Bereishith boot loader, some related to dissatisfaction with GRUB and some to do with the requirements of my OS. And I really am just that masochistic.)
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: OS without GRUB

Post by sortie »

There's already bootloader instructions on the wiki, see baby steps for instance, or lots of bootloader information can easily be found with an online search.

Ask yourself whether you actually want to write a bootloader, or whether you want to make an operating system. If you want to make an OS, writing a bootloader is a waste of time that you can delay until you actually need it. There's lots of fun in kernel land.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: OS without GRUB

Post by Brendan »

Hi,
sortie wrote:Ask yourself whether you actually want to write a bootloader, or whether you want to make an operating system. If you want to make an OS, writing a bootloader is a waste of time that you can delay until you actually need it. There's lots of fun in kernel land.
Then ask yourself whether you actually want to write a kernel, or whether you want to make an operating system. If you want to make an OS, writing a kernel is a waste of time that you can delay until you actually need it. There's lots of fun in writing a new GUI for Linux or FreeBSD.

Then ask yourself whether you actually want to write a new GUI, or whether you want to make an operating system. If you want to make an OS, writing a GUI is a waste of time that you can delay until you actually need it. There's lots of fun in writing a new applications/utilities for KDE/Gnome.

Then ask yourself whether you actually want to write new applications/utilities, or whether you want to make an operating system. If you want to make an OS, writing a new applications/utilities is a waste of time that you can delay until you actually need it. There's lots of fun in writing a new boot loader.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: OS without GRUB

Post by sortie »

Indeed. It depends on what you want to do. Skip directly to it.
User avatar
Espanish
Posts: 24
Joined: Fri Nov 21, 2014 6:30 am

Re: OS without GRUB

Post by Espanish »

osdev1995 wrote:Can anyone provide good tutorial for creating a boot loader?
Just in case you missed these:
http://wiki.osdev.org/Bootloader
http://wiki.osdev.org/Rolling_Your_Own_Bootloader
Post Reply