Page 1 of 2

Bootloading: What method and Why?

Posted: Fri May 23, 2008 11:05 pm
by jinksys
To all the members who have an actual running OS:

Which bootloading method do you use and why?

For example, do you use a custom bootloader because your OS loads onto special hardware (eg: router) and doesn't need all of grub's features?

Posted: Fri May 23, 2008 11:25 pm
by neon
Custom. Primarily because grub does not do what I need, security, and portability purposes.

Posted: Fri May 23, 2008 11:28 pm
by Stevo14
I use grub because it does exactly everything that I need it to. A20 line, pmode, memory map, modules etc.

Posted: Fri May 23, 2008 11:29 pm
by piranha
I use GRUB, because it's simple to setup, available, has multiboot and can deal with itself.

I don't want to deal with writing my own, because I prefer kernel development, plus my OS (currently) requires multiboot to run.

I know that there are other BL's with multiboot, but I'm familiar with GRUB, so there you are.

-JL

Posted: Fri May 23, 2008 11:35 pm
by Ready4Dis
Custom, does everything I need it to do, and nothing I don't :). Small and compact, sets up pmode for my OS and jumps to it.

Posted: Sat May 24, 2008 1:52 am
by tsp
What is a bootloader? :wink:

Actually I do not have any kind of bootloader because I use ARM platform (SAM7-EX256) and that platform has XIP flash to where the kernel image is flashed and because of that there is no need for bootloader.

Posted: Sat May 24, 2008 2:12 am
by AJ
Originally, GRUB but I'm working on a custom version now.

The idea with my current boot loader is to get all the run-once stuff out of the kernel and in to the boot loader. This includes video mode switching, setting up a physical memory stack/bitmap (customisable via menu option), setting up paging to allow the kernel to start directly in the upper half (works for both 32 and 64 bit kernels automatically) and the option of having an 'alternative kernel' - if the CPU does not support 64 bit mode, the 32 bit kernel will be loaded instead.

The original version of CBoot was a second stage boot loader, loaded by GRUB (with the kernel as a module). I am currently focussing all my efforts on creating a stand-alone product (starting with support for a FAT12 disk and extending support from there).

Cheers,
Adam

Oh - I plan to put device detection code in there too and present it to the kernel in a nice uniform format.

Posted: Sat May 24, 2008 3:13 am
by Jabus
I use a custom bootloader that I made. It basically loads a configuration file which tells it the number of bootable operating systems on the disk, the name of the file to load and the address to move it to. The reason I decided to do this was so that if I had a bug and wasn't sure how to fix it I could make multiple builds of the kernel and use my bootloader to load them. The reason why I don't use GRUB is that I wanted to learn and experience the challenge of writing a bootloader.

Posted: Sat May 24, 2008 4:33 am
by svdmeer
Custum.

For userfriendlyness. My OS uses an own partitiontable, with partitions. One partition is a bootstrap, universal for each versions. A bootstrappartition is not always needed. Bootstrap can be loaded from floppy but also from network boot (PXE). It doesn't matter where the bootstrap is loaded from to boot the system.
Other partitions can be filesystems with just data. Copy some OS-files is enough to make a partition bootable. It's like the Apple partition system and the BSD partition system, best of both.
That system resides in a normal MBR-partition (like BSD does), but the partition can also span the whole harddisk. The bootsector becomes the MBR, for the bootloader nothing changes. But in that case there is no compatibility for other OS-es.

The bootloader is graphical, like Apple with graphical symbols showing errors and simple keys to boot from a non-default disk, like pressing 'c' for the CD-ROM. It has a console, but that's normal users won't see that until they press some key combinations. It's under development right now.

I don't like Grub. I think an os is not complete without bootloader.

Maybe it's too much for a bootloader for an OS where the kernel is in a very early stage of development. You can discuss the priority. What's important? It isn't hard to understand some people like to begin directly with kernel development. That's the most important part. Without kernel, no OS. Without bootloader, you can also make a great OS (loaded with stuff like Grub). But I have a vision about bootloaders, inspired by older Apples and a little bit the Alpha-platform, and I like to work that out.

Posted: Sat May 24, 2008 5:01 am
by kmtdk
Custome
because you know everything whats happen, and I mean it is a part of os programmering. And because i dont know GRUB.

Posted: Sat May 24, 2008 5:44 am
by edfed
custom

because if i want to have a strange boot process, it is up to me to write my own bootloader.

the run ones parts of an os doesn't exist at all.

everything can be called many times.
like video mode switching, kernel reload, warm reboot, etc...

Posted: Sat May 24, 2008 6:28 am
by Hendore
I'm working on my custom bootloader because I dont need features GRUB provides such as entering protected mode.

Posted: Sat May 24, 2008 6:28 am
by bewing
custom

1) I have a custom filesystem, and I don't want to bother teaching somebody else's bootloader to understand it.
2) Grub is too big. My filesystem loads a 256K table during boot, and grub is in the way. My bootloader is 3K, and does just about everything that grub does -- but a LOT faster.
3) Grub's boot process is not automated the way I want, AFAIK. If there is only one bootable partition, it should boot instantly. If there are multiple choices, it should ask.
4) Grub does not give the user options for passing kernel specific info to the booted kernel, or to select an alternate kernel prior to load. My bootloader allows an alternate INIT program to run, a "test" kernel to be selected, and a "singlestep mode" flag to be set.
5) Grub has errors, and part of the whole reason I'm doing this in the first place is that I don't want to be dealing with *other people's* bugs!
6) Grub does not pass me any BIOS PCI information.
7) Grub does not pass me a sufficient amount of VBE information, AFAIK.
8) Grub does not guarantee the location, in memory, of modules. The last thing I want to deal with from my bootloader is uncertainties.
9) My kernel demands LBA mode support, E820 support. Grub does not test for this -- or error out for me.
10) I want to be certain where the temporary GDT is, in memory.
11) I want my complete MBR to remain in memory, at a known location. I use it for locating the boot disk.
12) My bootloader contains my volume name for the partition, plus extra info that my kernel needs. So I want it to be small enough to remain in memory at a known location.
13) My bootloader not only loads my kernel, it also loads a flat copy of my root directory for me -- at a known location in memory.
14) There is some BIOS floppy info that grub does not pass on.
15) The Multiboot spec is not sufficiently pretty for my tastes.

Posted: Sat May 24, 2008 7:20 am
by 01000101
GRUB is a nice bootloader, but it is also GPL'd, thus rendering it useless for me.

I designed me own to get around having to use other people's code, and I also redesigned it for size and speed.

Posted: Sat May 24, 2008 7:39 am
by codemastersnake
I use GRUB. It's good. May shift to custom bootloader later on.