why use grub, ext4, fat12 for a custom os

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
roseori
Posts: 3
Joined: Mon Jul 06, 2026 9:36 am
Libera.chat IRC: roseori

why use grub, ext4, fat12 for a custom os

Post by roseori »

Hi eveyone

Hope everyone is well and good. I had some confusion that what benefit is of using GRUB, EXT4, FAT12 , drivers etc for one's os over making their own

FILESYSTEM: I understand that FS is genueinly complex so porting exiting FS is a wise decision here However making a custom FS from scratch for read, write, open operation is not as complex as adding journals like modern FS, so why use ext4 or fat12,
Why not make one small fs ?

BOOTLOADER: I have also seen many os dev using GRUB as the boot loader which kinda makes me doubt that is using GRUB as the boot loader a wise decision then making their own custom boot loader
. Is making a custom bootloader a bad decision ?
should i go with grub or my own boot loader for my os

Also what subsystem in an os should be ported from outside which is a wise option other thrn making their own from scratch? Because i do not know what would be foolish and what would be wise, though i trust with my own more.

Thanks all again.
User avatar
BenLunt
Member
Member
Posts: 1029
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: why use grub, ext4, fat12 for a custom os

Post by BenLunt »

roseori wrote: Mon Jul 06, 2026 11:33 am FILESYSTEM: I understand that FS is genueinly complex so porting exiting FS is a wise decision here However making a custom FS from scratch for read, write, open operation is not as complex as adding journals like modern FS, so why use ext4 or fat12,
Why not make one small fs ?
I am quite fond of file systems, so I will attempt to answer this for you.

First, ask yourself, do you want to attempt to design a file system for your project? I don't think it is the idea of "do I need to", but more of "do I want to". You can learn quite a bit about file systems by researching others while designing your own. When I first started, I was in this exact place. I designed one that I thought would work out quite well, but after using it a bit, I found out it wasn't what I was hoping it would be. It turned out to have a major flaw in it.

Sometime later, with help from another hobbyist, we created one that actually did turn out well, at least as far as a hobby file system is concerned.

Second, and this is actually a very important point, do you plan to transfer files from one system to another? If so, you will have to use a file system that is supported on both systems. For USB Thumb Drives, this is usually a FAT variant. If you plan to transfer files to a *nix platform, you will need something that it supports, probably ext2/3.

So, do you wish to create one yourself, simply for enjoyment and to learn about file systems? By all means, then do so. If you are simply needing a file system to store files and to transfer those files to other systems, then use an already available file system.

Personally, I would suggest you at least give it a try. If it doesn't work out to be what you thought it could be, abandon it and try again. If you study the two I posted before, as well as another hobbyist's work, you might be able to find things you like and things you don't like.

In my opinion, it is because we want to, not because we have to. Afterall, this is simply a hobby for a majority of us.

- Ben
https://www.fysnet.net/osdesign_book_series.htm
Octocontrabass
Member
Member
Posts: 6245
Joined: Mon Mar 25, 2013 7:01 pm

Re: why use grub, ext4, fat12 for a custom os

Post by Octocontrabass »

roseori wrote: Mon Jul 06, 2026 11:33 am. Is making a custom bootloader a bad decision ?
should i go with grub or my own boot loader for my os
You should use GRUB (or Limine) for your OS.

If you want to make your own bootloader to learn how bootloaders work, that's fine, but you shouldn't use it for your OS. There are no advantages to using a custom bootloader, but there is one huge disadvantage: you have to spend more time debugging it when it breaks.
nullplan
Member
Member
Posts: 2033
Joined: Wed Aug 30, 2017 8:24 am

Re: why use grub, ext4, fat12 for a custom os

Post by nullplan »

roseori wrote: Mon Jul 06, 2026 11:33 am BOOTLOADER: I have also seen many os dev using GRUB as the boot loader which kinda makes me doubt that is using GRUB as the boot loader a wise decision then making their own custom boot loader
. Is making a custom bootloader a bad decision ?
should i go with grub or my own boot loader for my os
The bootloader's job is to load files into memory, prepare an environment for the kernel, and then run the kernel. Most custom bootloaders do this by leveraging BIOS calls. Which is fine and all, but I kinda wanted to get to actually writing my kernel, and not get stuck on the 16-bit plumbing for months. And then redo it all when it comes time to port this all to UEFI, because that is just what the future will be. There are no new BIOS computers coming out.

So no, writing your own bootloader is not a bad decision, it's just not what I personally would consider to be fun. And as stated previously, I'm doing this as a hobby, so I'm only doing this for the fun.
Carpe diem!
dustinmacdonald
Posts: 4
Joined: Tue Jun 23, 2026 11:17 am

Re: why use grub, ext4, fat12 for a custom os

Post by dustinmacdonald »

Writing your own bootloader is a bit like wanting to design your own car, and deciding to start by handcrafting a transmission. Every car needs one, but there are off-the-shelf components that you can use instead. Yours is likely to be inferior to the ones that exist and it will be a distraction from the rest of the things you need to get a functioning car (or OS) together.

Rather than starting with a bootloader, I recommend using Limine or GRUB and then set a goal for yourself to revisit a bootloader in 6 or 12 months of work. At that time, if you still want to build a bootloader you will have a more functional OS to connect it to than a "Hello World" example, you will have sidestepped a lot of the issues that people run into (like your kernel growing beyond the size expected by your home-built bootloader and causing unexpected errors that are tricky to debug) and you will have a deeper understanding of the work involved.

I say all that as someone who did start by making a one stage and then two stage bootloader. It was unnecessary pain, and I don't feel any better off for the experience, and you'll hear a common sentiment from many people who did the same.
klange
Member
Member
Posts: 691
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: why use grub, ext4, fat12 for a custom os

Post by klange »

Writing your own bootloader is a bit like wanting to design your own car, and deciding to start by handcrafting a transmission.
Writing your own x86 BIOS bootloader is like wanting to design your own car and starting by building a petrol station.
Post Reply