BYEBYEBIOS(1)

πŸ“¦
version 1.0 Β· 2 versions
, in fedora 43

πŸ‘‘ BYEBYEBIOS β€” x86 boot sector injector ✨

okay bestie, gather round, because this is the <pink>byebyebios</pink> manual page (it lives in the <lavender>Virtualization Support</lavender> section of the manual, just so you know where to find it again πŸ’…).


🌸 NAME 🌸

byebyebios β€” the x86 boot sector injector. that's it, that's the whole name, no notes πŸŽ€


✨ SYNOPSIS ✨

byebyebios [OPTION]... RAW-DISK-IMAGE

byebyebios [OPTION]... BLOCK-DEVICE

so you hand it a disk image or a block device and it does its lil thing. two whole ways to call it. iconic. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

bestie, listen. byebyebios is the tool you reach for when you've got an operating system installation for the <cyan>x86</cyan> architecture and the whole plan is for it to boot via <purple>UEFI</purple> firmware and only UEFI firmware. no legacy BIOS invited to this party πŸ™…β€β™€οΈ

point it at either a raw disk image file, or a block device, that contains that installation, and it will inject a <hotpink>dummy x86 boot sector</hotpink>. so if some poor soul then tries to boot the thing through legacy BIOS firmware instead of UEFI? a message gets printed β€” on both the primary serial port and the VGA display β€” telling them UEFI is required. like a little bouncer at the door going "wrong entrance, hun" πŸ’€


🌈 OPTIONS 🌈

  • --boot-stub FILE-PATH β€” override the default file path that points at the precompiled boot stub binary getting injected. you wanna swap the stub? go off πŸ‘‘
  • --message FILE-PATH β€” override the default message text that gets printed when the installation boots under legacy BIOS firmware. okay so there's a size situation here bestie: the message file must fit within the remaining free space of the boot sector. the dummy MBR and boot signature take <yellow>66 bytes</yellow>, the boot stub takes <yellow>21 bytes</yellow>, and the message <NUL> terminator eats <yellow>a single byte</yellow>. that leaves you <hotpink>424 bytes</hotpink> for the text message. also β€” and this is important β€” the message file must use <CR><LF> line terminators. no cap. 🫢
  • --force β€” normally byebyebios validates that the disk image you specified contains a valid <cyan>GPT header signature</cyan> before it installs the dummy boot sector. it's a safety net, a lil seatbelt, protecting you from accidentally overwriting data in a file/device that is not a bootable OS image just because you typed the wrong path πŸ™ˆ. this option causes installation of the boot sector even if the GPT signature is not found.
⚠️ be careful with --force, fr fr. data loss will likely result if this tool gets pointed at an inappropriate file with the GPT check disabled. that's not a vibe. that's a tragedy. 😭

🧚 EXAMPLES 🧚

πŸ’« Injection post install

create a disk image with virt-install(1) and inject a boot sector once installation is complete:

$ virt-install \
    --virt-type kvm \
    --arch x86_64 \
    --boot uefi \
    --name demo \
    --disk bus=virtio,format=raw,size=4 \
    ...other args...

$ byebyebios /var/lib/libvirt/images/demo.img

look at that. clean. slay. ✨

πŸ’« Injection during install

inject a boot sector as part of the installation process, straight from an anaconda(1) kickstart file (or equivalent):

$ cat demo.ks
...snip...

ignoredisk --only-use=vda
clearpart --none --initlabel
part /boot/efi --fstype="efi" --ondisk=vda --size=1007 --fsoptions="umask=0077,shortname=winnt"
part / --fstype="ext4" --ondisk=vda --size=3087

..snip...

%post

byebyebios /dev/vda

%end

doing it mid-install? main character energy honestly πŸŽ€

πŸ’« Customized warning message

to customize the warning message, provide a custom text file with <CR><LF> line terminators:

$ echo "Bye Bye BIOS" | figlet -f bubble | unix2dos > msg.txt
$ byebyebios --message msg.txt /var/lib/libvirt/images/demo.img

figlet bubble font + unix2dos? chef's kiss. the message is giving exactly what it needed to give πŸ’…


πŸ’€ BUGS πŸ’€

please report all bugs you discover to the upstream repository:

https://gitlab.com/berrange/byebyebios

alternatively, you may report bugs to your software distributor / vendor. they got you 🫢


πŸ‘‘ AUTHORS πŸ‘‘

Daniel P. BerrangΓ©


Copyright (C) 2023 Red Hat


πŸ“ LICENSE πŸ“

byebyebios is distributed under the terms of the <rainbow>MIT No Attribution license</rainbow>. periodt. ✨


πŸ”₯ SEE ALSO πŸ”₯

virt-install(1), anaconda(1)


and that's the whole page bestie!! this was <pink>BYEBYEBIOS(1)</pink> from the <lavender>Virtualization Support</lavender> corner of the manual, and yes the footer really does just say <hotpink>BYEBYEBIOS(1)</hotpink> again because manpages love a lil echo πŸ’– go forth and boot UEFI-only, ily, bye!! πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from