SeaBIOS is an open-source implementation of a 16-bit x86 BIOS. The name is a pun: it is a BIOS written in C (instead of the traditional assembly). It is the firmware that QEMU and KVM run by default, and it is the payload coreboot uses when the next piece of software still expects a classic PC BIOS rather than UEFI.

This post covers where SeaBIOS came from, what job it actually does, where it is a good fit and where it is not, who ships it, and how to download and build the 1.17.0 source.

Key highlights:

  • A legacy BIOS, but not silicon init. SeaBIOS implements the PC/AT BIOS calling interface. It does not initialize DRAM, replace the Intel FSP, nor does it replace coreboot, Slim Bootloader, or EDK II.
  • Written in C, built with gcc. The 16-bit entry points are real, but most of the program is compiled as 32-bit code and run with the assembler's .code16gcc prefixes.
  • Small. A default 1.17.0 build emits a 256 KB ROM, and the image is about 70 percent full
  • The default BIOS guest firmware in QEMU and KVM. It is not the firmware a modern Windows 11 computer would boot.
  • License: GNU LGPLv3, per the source headers and the download page. Kevin O'Connor is the author of the gcc port.

History

Before SeaBIOS, the most popular open-source BIOS was the one that shipped with the Bochs emulator. That code was a faithful representation of a PC/AT BIOS, but was difficult to modify due to an outdated toolchain and its being written in assembly.

In 2008 Kevin O'Connor started a port onto the GNU tools. The goals he described at the time were: use gcc, gas, and ld; rewrite the assembly into C where the BIOS interface allowed it; run as much of the firmware as possible in 32-bit flat mode; and make the result work on real hardware, not only inside an emulator.

The first numbered release is SeaBIOS 0.2.0, dated 30 March 2008, and the release notes still call it legacybios. The release notes say "completion of initial port of Bochs BIOS code to gcc." The copyright headers in the tree still show the ancestry: src/boot.c carries both O'Connor's copyright and a 2002 copyright from MandrakeSoft, which is the Bochs BIOS lineage.

Release 0.2.3, 2 July 2008, introduced initial support for running on real machines as a coreboot payload. By late 2009 the project had replaced Bochs BIOS inside QEMU. QEMU 0.12, December 2009, lists "Update to SeaBIOS 0.5.0" in its changelog, and SeaBIOS 0.5.0 itself is dated 18 December 2009. Later releases tracked with the hardware QEMU developed: for example, AHCI, NVMe, USB mass storage, and TPM support were all eventually added to SeaBIOS as they were added to QEMU.

The current stable release is 1.17.0, dated 10 June 2025. The previous release, 1.16.0, was 1 March 2022. SeaBIOS gets a release when there is something to ship; there is not a pre-set cadence of future releases.

What it actually does

SeaBIOS searches for a boot target, and also stays resident to service the traditional PC/AT API: i.e., INT 13h to read a disk, INT 10h to write to the screen, INT 16h to read the keyboard, etc. Beyond those interfaces, SeaBIOS implements other legacy BIOS standards: El Torito CD-ROM boot, the BIOS Boot Specification, the POST Memory Manager, e820, SMBIOS, a PCI BIOS, and enough ACPI and MP-table plumbing for the platforms it supports. It will not, by itself, bring a machine up. On real hardware, coreboot (or something in that role) must already configure the chipset, train memory, and assign PCI resources.

There is a sibling project in the same tree, SeaVGABIOS, which supplies a VGA BIOS for the emulated display devices (Bochs DISPI, ramfb, the coreboot framebuffer, and others). A default SeaBIOS build does not build it. QEMU ships prebuilt VGA ROMs alongside its prebuilt SeaBIOS image.

What it is good for

SeaBIOS is the right tool when the problem is "provide a PC BIOS," not "initialize this CPU.":

  • Legacy guests in QEMU and KVM. If the virtual machine does not need UEFI variables or Secure Boot, SeaBIOS is the smaller and simpler firmware. It boots the things a BIOS is supposed to boot: GRUB, SYSLINUX, and LILO in BIOS mode; FreeDOS; Linux; Windows when the guest is installed for legacy boot.
  • A coreboot payload for a legacy OS or real option ROM. coreboot initializes hardware and hands off. SeaBIOS executes option ROMs more completely than coreboot does, and it implements the PC/AT BIOS interface those ROMs and operating systems call: a VGA ROM, PXE ROM, or a RAID ROM, for example.
  • Educational—reading a BIOS end-to-end. SeaBIOS is one ROM consisting of a few hundred kilobytes, the control flow is documented, and the language is C. This makes SeaBIOS an excellent case study for learning about the workings of bootstrap firmware in general, and legacy BIOS in particular.

What it is not good for

Examples of SeaBIOS being asked to do a job that belongs to a different technology:

  • It will not bring up a modern platform. There is no memory reference code, no Firmware Support Package, no Cache-as-RAM, and no GPIO tables. If the machine needs silicon init, that program is coreboot, or Slim Bootloader, or a vendor EDK II tree. SeaBIOS runs after that work is finished.
  • It is not UEFI. There are no EFI boot services, no GOP, no variable store, no capsule updates, and no UEFI Secure Boot. Windows 11 will not boot from it. A current Linux distribution can, provided the installer is willing to use a BIOS boot path, which many still are.
  • It is not a Compatibility Support Module you can drop into today's OVMF. The SeaBIOS build still has a CSM target, and the build overview still describes copying out/Csm16.bin into OvmfPkg/Csm/Csm16/ and building OVMF with -D CSM_ENABLE. That describes an EDK II tree from years ago. Upstream EDK II removed that integration, and client platforms removed the legacy BIOS path underneath it. Building Csm16.bin still works. Having a firmware that will load it is the part that no longer exists in current trees.
  • It does not own the security processor. Intel CSME and AMD PSP are out of scope, as are Boot Guard and the rest of the measured-boot root.
  • It is x86 only. An AArch64 or RISC-V guest has no use for it. QEMU's other supported architectures use other firmware.

Who uses it today

Almost every BIOS-mode virtual machine on QEMU, and a slice of coreboot machines. Not the firmware in a typical Dell/HP/Lenovo laptop or server.

  • QEMU and KVM. SeaBIOS is the default BIOS, and QEMU ships prebuilt images. If you do not point QEMU at an OVMF pflash image, you are running SeaBIOS.
  • Xen HVM. Xen's hvmloader still has a SeaBIOS path for BIOS guests, and an OVMF path for UEFI guests. Kconfig in the SeaBIOS tree has an explicit "Support Xen HVM" option, on by default in the QEMU build.
  • coreboot. The current coreboot payload documentation lists SeaBIOS next to edk2, GRUB, and depthcharge. You pick SeaBIOS when the operating system, or a device ROM, wants the legacy interface. You pick edk2 when you want UEFI. coreboot can also chainload SeaBIOS from GRUB; the payload page shows how to do multiboot.
  • Bochs. Bochs can take out/bios.bin as its ROM image. Bochs' own BIOS is the ancestor SeaBIOS was ported from, and it is a different binary.

Conversely, VMware, Hyper-V, and VirtualBox ship their own firmware. A Dell, HP(E), or Lenovo computer boots its own proprietary UEFI BIOS. Firecracker and the other minimal VMMs that skip a BIOS entirely are not SeaBIOS users either. SeaBIOS is ubiquitous in one specific use case, the QEMU BIOS use case, and optional everywhere else.

Download and build

The source is small and the dependencies are ordinary GNU tools. I built release 1.17.0 from the official tarball in Ubuntu 22.04.

To get the source and kick-off the build:
sudo apt install build-essential python3 python-is-python3
wget https://www.seabios.org/downloads/seabios-1.17.0.tar.gz
tar xf seabios-1.17.0.tar.gz
cd seabios-1.17.0
make

The default Kconfig target is "Build for QEMU/Xen/KVM/Bochs." make writes out/bios.bin. On 1.17.0 that file is a 256 KB ROM. The tail of the build looks like this:


Those four sizes are the memory model, printed. The 16-bit image is the .code16gcc compile, and it is where the legacy entry points live. The segmented 32-bit piece is tiny. The flat 32-bit piece splits into a runtime part, which is larger than the 16-bit code, and a larger init part that POST can relocate out of the way. Current binutils also warns that the ROM has an executable stack and an RWX load segment. That is the 16-bit layout, not a failed build. out/bios.bin is still produced.

You can find the SeaBIOS source code at: git clone https://git.seabios.org/seabios.git. There is a read-only mirror at github.com/coreboot/seabios. The project does not take pull requests there; patches go to the mailing list.

With no disk attached, SeaBIOS prints its version line and reports that it has nothing to boot. Esc during that window opens the boot menu. I launched QEMU with my custom-built SeaBIOS like this:


I got the following result:


Exciting!

The other two build targets are Kconfig choices under General Features, Build Target. make menuconfig, change the target, then make.

TargetKconfig choiceOutputUsed as
QEMU, KVM, Xen, BochsBuild for QEMU/Xen/KVM/Bochs (default)out/bios.binROM image. Pass it to QEMU with -bios.
corebootBuild for corebootout/bios.bin.elfELF payload. coreboot's build can also fetch and compile SeaBIOS when the SeaBIOS payload is selected.
CSMBuild as a Compatibility Support Module for EFI BIOSout/Csm16.binLegacy services for an old UEFI firmware. See the caveat above before spending time here.

Where to go next

SeaBIOS is the BIOS behind a default QEMU guest, and it is the legacy personality coreboot loads when UEFI is not needed. It is a poor choice for silicon init, a poor choice for Windows 11, and a poor choice if what you wanted was EDK II.

Pages worth reading:

Next
This is the most recent post.
Previous
Older Post

Post a Comment

Be sure to select an account profile (e.g. Google, OpenID, etc.) before typing your comment!