Basic bootsector / kernel

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.
Ozguxxx

Re:Basic bootsector / kernel

Post by Ozguxxx »

Hey, I really do not mean to argue about this grub or another bootloader subject, since I am not in one of the sides now, I mean in the future I might use grub so it really is not appropriate if I just try to defense _self_booting_people. :) But I think I now have right to answer since a lot of (major) people referenced me. I completely agree with HOS. That's a personal preference, but I think it is not a good idea that gurus are giving new people impression that booting is an irrelevant subject in os development and telling them to get grub in first place. I agree with it in the sense that when you are trying to write you are in some way putting constraints around your kernel because of lacks of loader, but firstly this is also a problem with grub and secondly as time goes by, you progress your loader design and put constraints away. One day I might decide to use grub but I hope I wont. By the way HOS has my motivation OR _spirit_of_self_booting ;D in using self written bootloader:
and now i have a bootloader that i wrote and understand every line of
xxchrisxx

Re:Basic bootsector / kernel

Post by xxchrisxx »

Hmm... I hope I didn't cause another "holy war" :o

Anyway... now that I'm past the bootsector bit (for now) I need to focus on my OS design. Is there any perticular book or tutorials that I should get ? I know the names of a few of the popular book titles, but which would be best for me at the stage that i'm at?
nullify

Re:Basic bootsector / kernel

Post by nullify »

Ozgunh82 wrote:I agree with it in the sense that when you are trying to write you are in some way putting constraints around your kernel because of lacks of loader, but firstly this is also a problem with grub
GRUB doesn't really place any problematic restraints on osdev AFAIK. Unless you're trying to do something really unusual, you shouldn't have to wrestle with GRUB.
Ozgunh82 wrote:secondly as time goes by, you progress your loader design and put constraints away.
Although you can advance your custom bootloader to completion as time rolls by, you are overlooking the whole point of the decision to use GRUB in the first place. People use GRUB to save time; in the time you are utilizing to enhance your own bootloader, GRUB users will be free to concentrate on enhancing the kernel.
nullify

Re:Basic bootsector / kernel

Post by nullify »

xxchrisxx wrote:Is there any perticular book or tutorials that I should get ?
Glance through the sticky thread at the top of this message board titled "Book Recommendations". Bona Fide OS Development has a lot of decent beginner tutorials (http://www.osdever.net/).
xxchrisxx wrote:I know the names of a few of the popular book titles, but which would be best for me at the stage that i'm at?
For the most part, my osdev knowledge comes straight off the Internet - documents, tutorials, example code, and forums like this one. For a good overview of concepts, I can recommend "Modern Operating Systems" by Andrew S. Tanenbaum. (Unfortunately, I don't have very many OS books, so I don't really have anything to compare with.)
Ozguxxx

Re:Basic bootsector / kernel

Post by Ozguxxx »

you are overlooking the whole point of the decision to use GRUB in the first place. People use GRUB to save time; in the time you are utilizing to enhance your own bootloader, GRUB users will be free to concentrate on enhancing the kernel.
Well firstly, why are people trying to save time? Is there a deadline to finish their os? Will they sell the programs that suffer to run computer as an "Operating System"? Secondly, I really do not care about people finishing their kernel as I deal with loader stuff, why should I?
nullify

Re:Basic bootsector / kernel

Post by nullify »

Ozgunh82 wrote: Well firstly, why are people trying to save time? Is there a deadline to finish their os? Will they sell the programs that suffer to run computer as an "Operating System"? Secondly, I really do not care about people finishing their kernel as I deal with loader stuff, why should I?
This is about efficient time/resource management. If you don't immedately comprehend how this will be advantageous the long run, I won't bother trying to persuade you.
Tim

Re:Basic bootsector / kernel

Post by Tim »

It depends what you want to do. If your goal is to write a loader, do it. But I don't believe coding boot loaders is a necessary part of OS development, so any time I spend doing that I consider to be wasted.

My goal is to write a great OS. Part of that goal is having a great boot loader. If GRUB didn't exist, I would have to write my own in order to fulfil my goal. But it does, so I can ignore that and concentrate on writing a great kernel.

Even if you don't have a deadline to finish your OS (in fact, I don't believe any OS can be finished), there is still a finite number of hours in the day.
Ozguxxx

Re:Basic bootsector / kernel

Post by Ozguxxx »

If you don't immedately comprehend how this will be advantageous the long run, I won't bother trying to persuade you.
Hey, I am sorry I did not immediately comprehend what time/resource management means but I think your problem is not persuading me about anything but it is persuading yourself about unnecessity of writing a bootloader, so I will not talk about it here any more, as I said this is a personal choice, everbody does in whichever way they want.
nullify

Re:Basic bootsector / kernel

Post by nullify »

Ozgunh82 wrote:I think your problem is not persuading me about anything but it is persuading yourself about unnecessity of writing a bootloader
I need no persuasion; it is clear to me what advantages and implications are involved in skipping the bootloader. I think you'll find that many others who use GRUB do so for the same reasons. I've shown you the reasoning - that's the best I can do. Ultimately, its your decision.
xxchrisxx

Re:Basic bootsector / kernel

Post by xxchrisxx »

i'm having trouble with the kernel I first posted. It seems to compile and link fine now but it doesn't boot properly (just reboots). I'm using the bootf0 bootsector now.
Therx

Re:Basic bootsector / kernel

Post by Therx »

i really wouldn't use that boot sector. The problem is that it sets up paging but only maps 4mb. (can't remember where to). So as soon as you try to access above that you'll get a page fault which could confuse you for days (did for me). I;'d either use GRUB or find the paging bit of bootf02 and remove it.

Pete
Post Reply