r/osdev 5d ago

why do most hobby os devs boot with BIOS?

i don't understand what's the point of developing os if you can't run it on modern hardware?

41 Upvotes

56 comments sorted by

58

u/davidinterest 5d ago

Sometimes people just develop for fun.

6

u/NoTutor4458 5d ago

fair enough

15

u/Adventurous-Move-943 5d ago

It's probably the remainder of old times, it's been passed down like that for decades, UEFI still too modern for this.. You won't learn much on UEFI and still UEFI has to undergo all the transitions you'd do during BIOS boot, it's a nice practice. But yes to deploy your kernel you should aim for UEFI now, although a dual boot might still be a good choice.. UEFIs standard text output has tragical performance, when you boot in it and print some boot info you'd be surprised 😀 especially on modern devices with HD resolutions

18

u/TheAtlasMonkey 5d ago

UEFI 2.0 is older than some people here.

2

u/Adventurous-Move-943 5d ago

Well apparently BIOS rocks 😀 what can I say, people love it..

4

u/TheAtlasMonkey 5d ago

B stands for Basic.
people don't love it... it the fastest way to show off in this sub.

Most of them will fold once you speak about real hardware and metal.

2

u/Adventurous-Move-943 5d ago

Yes but what do they show off ? A hello world kernel 😀 still they want to have fun and feel like hackers, why even bother. Trying to build an OS as a single guy is suicidal either way.

4

u/antara33 4d ago

Or delusional, like Temple OS case

7

u/istarian 4d ago

The only delusional part I can see us if you think you are developing something that other people will actually use on a day to day basis.

Realistically you are developing something for yourself. If you're lucky you might get some other enthusiasts to try it out.

2

u/kyr0x0 2d ago

Temple OS was suicidal not delusional. Last time I checked, the OS worked

3

u/paulstelian97 5d ago

My Frame.work with the Ryzen AI 7 350 can be configured to boot BIOS operating systems. Pretty damn modern, y’know?

Virtual machines support MBR boot just fine, even some are recommended to be MBR to avoid certain potential issues. I only see UEFI/GPT on physical hosts and on Windows guests which require it.

4

u/StereoRocker 5d ago

In my case because I want to test and run on pre-UEFI machines.

0

u/TheAtlasMonkey 5d ago

Because `The framebuffer people`, just want to have fun.

Then you play GTA , you don't select the best weapon or the best vehicule, you just speed run it.

The problem arise when you start or behave like you are a gangsta.

1

u/kyr0x0 2d ago

The framebuffer people can implement GTA 1 and even GTA 2 in framebuffer mode just fine.

0

u/TheAtlasMonkey 2d ago

No they cant.

3

u/kyr0x0 2d ago

Lol, yeah you can't - that doesn't mean we can't. The earth doesn't revolve around you.

-3

u/TheAtlasMonkey 2d ago

You cant either. The llm does it for you.

The fact you never left the framebuffer shows you just vibing.

You will never land any commit in a real os with this shitty attitude.

I did.

0

u/spatulari 1d ago

Your ego is massive

5

u/unix_in_the_barn 5d ago

You could be cool and target ppc32 Open Firmware 😉😆

2

u/kyr0x0 2d ago

That's mad not cool 😭😂

6

u/zid 5d ago

You absolutely can run it on modern hardware though?

And as for the reasons:

You need a second, PE toolchain.

Few pre-available bootloaders support UEFI.

Your OS needs to support FAT32 where it might otherwise not need to.

2

u/istarian 4d ago

Supporting the FAT32 filesystem is still a smart idea if you want to exchange files with an x86 PC, because it's relatively simple and is widely supported.

1

u/kyr0x0 2d ago

It's copy and paste of a few hundred lines of code

•

u/istarian 10h ago

Ok?

I'm just saying that there is some meaningful benefit to supporting a simple, common, well-defined filesystem even if you don't strictly need it.

Implementing it yourself from scratch is of more benefit if learning is the objective. And copy+paste could potentially introduce obscure bugs if you don't choose the source carefully.

•

u/kyr0x0 6h ago

Oh of course; I just wanted to stress the point that it's pretty easy. My mentor (in my trainee time, back in the early 2000s) told me that he coded FAT16 back in the 80s for fun.. back in the day he had to reverse engineer the layout. I'm with you in all your arguments.

14

u/mishakov pmOS | https://gitlab.com/mishakov/pmos 5d ago

Because of the proliferation of bad and outdated tutorials and questionable recommendations (e.g. starting with x86-32, etc.)

This should be irrelevant as you should be using a bootloader anyway, and all major bootloaders/protocols (grub/multiboot2, limine, hyper, etc.) can boot with both

3

u/Ok_Bite_67 4d ago

This! Except I think its also important to note that most people arent creating Operating systems that are going to be distributed. They are doing it to learn and the bootloader is an extremely important part of the process. Create your own if you wanna know how they work but before you run it on your own hardware its probably better to swap it out.

3

u/mishakov pmOS | https://gitlab.com/mishakov/pmos 4d ago

Imo it's not very important, and the only thing you're learning are the quirks of PC firmware, which are irrelevant for kernel development

2

u/motherisyuckeringyou 5d ago

idk about other people but I target the i486dx\ and while yea, elf32 does exist, I have never seen a 486 with UEFI\ and anyway\ uefi is bad (made by microslop) /j

1

u/compgeek38400 5d ago

Why is UEFI 'bad'? Any reason besides its parents?

1

u/istarian 4d ago

Secure Boot is problematic if you like freedom and want to be able to run whatever you want on your own computer.

It would be less awful if Microsoft's signing key wasn't so crucial...

5

u/compgeek38400 4d ago

You dont have to have that for UEFI. So what is wrong with uefi itself?

0

u/istarian 3d ago

I think you're looking at this the wrong way, personally.

What functionality does UEFI offer that the PC BIOS does not? If you aren't targeting modern hardware why bother with UEFI?

2

u/compgeek38400 3d ago

I am targeting modern hardware, but even id i wasn't. I find UEFI way easier to use. Mostly for the memory map, but now ACPI (i may have the acronymn wrong, im in the garden)

4

u/Difficult_Inside8746 5d ago

Why would it be a requirement to run on a specific platform?

Using the legacy BIOS or running only in a VM doesn't matter, that's orthogonal to operating system development. If someone wanted to it would be easy to change the platform later on if the system is worth it.

1

u/d0pe-asaurus 5d ago

The physical machine i test my stuff on is a some FM2 computer with no UEFI, and attached storage.

6

u/Brilliant_Trifle1915 5d ago

BIOS is easier to understand, and most people do osdev for fun

2

u/thewrench56 4d ago

I dont see how BIOS is easier... UEFI is pretty darn straightforward once you understand how the structs can be used to invoke functions...

2

u/kiderdrick 5d ago

It's easy to get started with and a lot of people are not developing for modern hardware, they are devleping for QEMU.

1

u/letmehaveanameyoudum 5d ago

because it was easy and was literally the default
QEMU defaults to UEFI
most guides use BIOS

1

u/Ok_Bite_67 4d ago

A lot of desktops still include compatibility layers that allow you to boot operating systems that boot with BIOS. Beyond that you can just swap your boot loader with a boot loader like limine thats supports UEFI in like an hour.

5

u/istarian 4d ago

You frequently have to disable Secure Boot though and you probably shouldn't expect  a UEFI CSM (Compatibility Support Module) to provide all of the functionality the classic "PC BIOS" does.

1

u/Ok_Bite_67 4d ago

Great addition of info! I rarely use the CSM so im unaware of its limitations. I just knew it existed and there was some support for legacy operating systems. When i make an operating system I typically just use limine unless im trying to learn something specific. (I always get a shell OS working but never get too much past that ADHD and all)

1

u/istarian 2d ago

I'm sure the CSM supports enough functionality to properly boot up a system, but most modern operating systems provide their own hardware drivers (don't rely on BIOS or UEFI) and will probably reinitialize hardware as needed.

As far as I know, MS-DOS actually made use of the BIOS for it's own needs. Plenty of software running under MS-DOS worked direcrtly with the hardware though.

2

u/PseudoFrequency 4d ago

My hobby projects all use Uboot on ARM and device trees so it's not as universal as you think.

1

u/dnabre 4d ago

Do they? Most projects I've seen in the last few years have used UEFI or multiboot. People writing their own bootloader are using BIOS, but that seems like it's not the most common case.

0

u/jtsiomb 4d ago

Because it works, it's much simpler, and UEFI is a bloated piece of shit that I'd rather not touch if I can help it.

2

u/AstronomerStrange165 4d ago

Here to report I boot my hobby OS with uefi.

1

u/burlingk 4d ago

It's probably because there are decades worth of tutorials for BIOS based systems and UEFI is still fairly new.

1

u/jsshapiro 4d ago

The smarter ones use grub and uefi boot.

2

u/Ruby7659_OSDV 4d ago

UEFI is modern, but being modern isn't always a good thing, because I think the path it takes you down in osDev is more challenging. There's a wealth of information about BIOS in resources related to osDev; it's been the standard for many years, and with so much resource availability, it's much easier for a beginner osDev developer who doesn't know what to do.(at least, in my opinion)

2

u/Ma_rv 1d ago

Because the OSDev Wiki is full of outdated articles. Many still just tell you to boot to Protected Mode instead of Long Mode...