Taha Azzaoui

Replacing my Thinkpad’s Boot Logo

2019/01/10

I recently had to update the BIOS on my machine and it turns out Lenovo makes it pretty easy to replace the stock boot image with something more based.

I did this on a 5th gen Thinkpad X1 Carbon but any modern Lenovo machine should work well.

The Image

First thing’s first, we need an image. The image should be less than 60K and its format must be either .BMP, .JPG, or .GIF. The one I used can be found here.

Downloading the BIOS update

Head over to Lenovo’s website and download the latest BIOS update for your machine. Make sure to get the Bootable CD version (ISO). The link for the Carbon can be found here.

Extract the BIOS Image

Next, we need to extract the contents of the BIOS image to add our custom boot logo. For this, we neeed geteltorito. It’s available in the AUR.

$ yay -S geteltorito

Use it to extract the image:

$ geteltorito.pl -o x1bios.img /path/to/bios/update.iso

Mount the BIOS Image

Next, to mount the image, we need to find the starting block’s offset:

$ file -sk x1bios.img | sed -r 's/.*startsector ([0-9]+).*/\1/'

In my case, the block offset is 32. Using this information, we can now mount the image.

$ mount -oloop,offset=$((32 * 512)) x1bios.img /mnt

Now that it’s mounted, move the custom logo into the Flash directory. Make sure the file name is LOGO.

$ cp LOGO.GIF /mnt/Flash

Once that’s done, we can unmount the image

$ umount /mnt

Flashing the Image

The next step is to flash the custom image onto a USB drive and boot from it. Plug it in and flash the image as follows.

$ dd if=x1bios.img of=/dev/sdX bs=512K

Once that’s done, boot from the USB drive and follow the prompts. The update should only take a few minutes and the custom logo will be automatically applied.