Booting FreeBSD on the Lenovo X260 (and similar ThinkPads): Legacy Pitfalls and the EFI Fix

25 Aug 2025 - tsp
Last update 25 Aug 2025
Reading time 5 mins

As someone who often works with older hardware, I regularly set up FreeBSD on laptops that others might consider obsolete. One such device is the Lenovo ThinkPad X260 (Note: This link is an Amazon affiliate link, this pages author profits from qualified purchases), a solid, durable machine - but one that presents a few surprises when trying to boot FreeBSD using the traditional legacy BIOS boot method.

This short article documents my debugging process, the pitfalls of using GPT + GELI-encrypted ZFS root, and the ultimate working solution: adding an EFI partition and switching to UEFI boot. It may save you hours if you’re doing something similar.

The Setup

The SSD booted perfectly in the HP 2530p (a permissive BIOS) - but after moving it into the X260, the BIOS showed the disk as ATA HDD0 but would not boot from it, even with CSM enabled and boot order correct.

First Attempt: The “lenovofix” MBR Hack

I suspected the X260 firmware was being picky about booting from a GPT disk in legacy mode.

So I tried the so-called Lenovo fix: adding an MBR partition entry (outside of GPT) pointing to the freebsd-boot partition and marking it active (bootable), hoping to trick the BIOS into jumping into pmbr. This has been implemented in sysinstall for a long while now but of course only gets suggested when you install on such a machine.

gpart set -a lenovofix -i 1 /dev/ada0
# Added MBR partition of type 0xa5 starting at the same sector as freebsd-boot
# Marked it active (boot flag 0x80)

While this often works on other ThinkPad models, it did not help on the X260. Even with a clean pmbr, active flag, and correctly installed gptzfsboot, the firmware silently refused to boot.

Final Fix: Booting via UEFI - Add an EFI Partition

Realizing that Lenovo’s UEFI firmware simply ignores GPT-based legacy boots due to unknown (and in my opinion very unnecessary) checks (that in my opinion indicate broken firmware) that fail, I switched to UEFI boot, which is actually more modern and depending on the view robust. Note that UEFI boot relies on a FAT32 partition on most implementations - also the one on the ThinkPad series - which again is an rather unstable filesystem at the core though.

Fortunately, I had space where the old swap partition was located, so I could add an EFI partition without modifying the encrypted ZFS partition.

Here’s what I did:

1. Delete old swap to free up space

swapoff /dev/ada0p2
gpart delete -i 2 ada0

2. Add 260 MB EFI System Partition

gpart add -t efi -a 4k -s 260m -b 2048 -l efiboot0 ada0

3. Recreate the swap partition

gpart add -t freebsd-swap -l swap0 ada0

4. Format the EFI partition

newfs_msdos -F 32 /dev/gpt/efiboot0

5. Install FreeBSD UEFI bootloader

mount_msdosfs /dev/gpt/efiboot0 /mnt
mkdir -p /mnt/efi/boot
cp /boot/loader.efi /mnt/efi/boot/BOOTX64.EFI
umount /mnt

6. BIOS Settings

After this, the system booted perfectly on the X260.

7. Update fstab for the swap partition

In /etc/fstab I’ve updated the path to the swap partition:

/dev/ada0p4		none	swap	sw		0	0

Afterwards swap was re-enabled again:

swapon -a

Minor caveat: Wi-Fi Device Renaming

One small post-boot issue: the wireless interface name changed. On the older laptop, it showed up as iwn0. On the X260 (with Intel 7265 AC wireless), it came up as iwm0 instead.

So I updated my /etc/rc.conf:

ifconfig_iwm0="WPA DHCP"

Conclusion

Some BIOSes - especially on mid-generation ThinkPads like the X260 - are extremely picky about legacy booting from GPT disks and one has nearly no control over them. While older systems like the HP 2530p will happily boot a GPT+pmbr+gptzfsboot setup as soon as any legacy boot signature is present in bytes 510 and 511 of sector 0, the X260 refuses unless a proper EFI boot path is provided or the legacy partition schemes fulfill some obscure conditions.

If you’re running FreeBSD with GELI-encrypted ZFS, UEFI boot via loader.efi works beautifully and is worth the transition.

Hopefully these notes help you get your system running - and save you a few frustrating hours in the BIOS boot menu!

Useful Utilities

Note: All of the following links are Amazon affiliate links, this pages author profits from qualified purchases

This article is tagged:


Data protection policy

Dipl.-Ing. Thomas Spielauer, Wien (webcomplains389t48957@tspi.at)

This webpage is also available via TOR at http://rh6v563nt2dnxd5h2vhhqkudmyvjaevgiv77c62xflas52d5omtkxuid.onion/

Valid HTML 4.01 Strict Powered by FreeBSD IPv6 support