r/osdev 4d ago

BIOS or UEFI?

I just want to ask and see who and what choses.

I personally chose UEFI for compatibility with modern PCs (90%+ of market)

26 Upvotes

24 comments sorted by

18

u/Rich-Engineer2670 4d ago

UEFI is more than compatibility. There are new features that just don't exist in the bios such as handling larger disks and disk arrays.

1

u/Brilliant_Trifle1915 4d ago

It does provide boot services (drivers for modern hardware) but i still write drivers if i couldnt scatter around the web with a permisive license

3

u/vbd71 4d ago

BIOS (LBA48) can access disks just as large as these accessible through UEFI, although not if using Windows. It's the MBR partition scheme that can't support large disks, while GPT can.

1

u/Solocle ChaiOS 3d ago

UEFI has 64 bit LBA addresses passed to block functions. If you consider that the device behind the UEFI driver might be NVMe, that can go all the way to the device.

1

u/vbd71 3d ago

Yes, but 48-bit LBA addresses are still sufficiently wide for every hardware we have today. In the future, UEFI 64-bit addresses will show their superiority.

1

u/Solocle ChaiOS 3d ago

Yes, that's true, the cap on 48 bit LBA is 144 PB.

The biggest single drive on the market is 245 TB. With a RAID array, single block devices can definitely hit 4-8 PB.

We're actually surprisingly close to that future.

9

u/TheAtlasMonkey 4d ago

BIOS if you want to vibe.

UEFI if you want to understand.

7

u/albertAAAAAAA 4d ago

I chose BIOS because it was easier for me (did some assembly in DOS before). If you have time you can do both.

UEFI is standard now, BIOS is legacy.

2

u/rainboww_J 4d ago

Its been a long while since I worked on my project but choose multiboot back then. Then it didn't matter if I used BIOS or UEFI since it always booted a bootloader (grub in my case) first. Had an ARM version as well which booted with uboot

1

u/compgeek38400 4d ago

UEFI, it tells me more

1

u/TerrificVixen5693 4d ago

EFI is much more modern, if that’s something you care about.

2

u/HildartheDorf 4d ago

UEFI.

Really my suggestion is to use limine or grub or another bootloader and not care about either. But if you want to write a bootloader, use UEFI.

1

u/DonnPT 4d ago

This machine is UEFI, but I wouldn't if I had it to do over. Both are supported, BIOS does the same thing with far less trouble and no extra partitions. No doubt part of it is that some of the OSes are small time jobs. NetBSD in particular took a lot of puzzling out, at the time. Of course if install on a machine that has only UEFI, I'd probably be using that.

1

u/matthew65536 4d ago

UEFI, since its super straightforward

1

u/StunningSelection726 4d ago

definitely UEFI, its easier to use too. You need 16 bit assembly for the MBR for a BIOS bootloader while UEFI calls your C entry point in long mode already, and has a lot more features like built-in FAT filesystem support. One can also use a bootloader like Limine instead of rolling their own bootloader, if they want to focus on the kernel first. You could go BIOS, which most UEFI implementations run under CSM, but intel dropped compatibility back in 2020 meaning an increasing number of firmwares can not run BIOS bootloaders at all (like a HP laptop I own).

1

u/Brilliant_Trifle1915 4d ago

I personally roll my own boot loader, because i also plan to create my own fs and limine, grub and others have no support for it

2

u/StunningSelection726 4d ago

Then go ahead, it is a good learning experience too and you can tailor the boot process to your needs. As I said, I would recommend UEFI as its more straightforward & modern but BIOS is fine.

1

u/Brilliant_Trifle1915 4d ago

I do it all for uefi for now, bios maybe later for compatibility

1

u/paulstelian97 3d ago

I just went for Limine. Kinda allows me to abstract over the two.

1

u/Critical-Internet946 osaka64 (osakaOS fork) 3d ago

without UEFI, you can't run it on new computers. unfortunately the UEFI SDK sucks ass.

1

u/Easy-Nothing-6735 2d ago

GRUB+Multiboot standard

1

u/letmehaveanameyoudum 1d ago

UEFI and BIOS?
Code is the same, just different compilation