Page 1 of 1
OS without GRUB
Posted: Mon Dec 08, 2014 11:32 am
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?
Re: OS without GRUB
Posted: Mon Dec 08, 2014 11:56 am
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.)
Re: OS without GRUB
Posted: Mon Dec 08, 2014 4:06 pm
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.
Re: OS without GRUB
Posted: Mon Dec 08, 2014 4:56 pm
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
Re: OS without GRUB
Posted: Mon Dec 08, 2014 7:23 pm
by sortie
Indeed. It depends on what you want to do. Skip directly to it.
Re: OS without GRUB
Posted: Tue Dec 09, 2014 3:17 pm
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