Nic's posts

home | Opinionated posts on random tech stuff

Librebooting my laptop

November 09, 2025 — Nic Gaffney

Librebooting my laptop

The inspiration

I recently made the decision to libreboot my Thinkpad w540. This was mostly out of curiosity, but it also aligns with my views on software overall. For those who are unaware, libreboot is a FOSS BIOS/UEFI software meant to replace the existing proprietary BIOS on a computer. (There are only a few laptops and computers that are libreboot compatible, so keep that in mind if you are ever purchasing a laptop to libreboot.)

Initial problems

Going into it, I knew there would be some problems with librebooting a w540. This is mostly due to the inconvenient location of the flash chips that I needed to access. In the w540 and w541 Thinkpads, you have to almost completely disassemble the laptop to reach the flash chips. Luckily, I had a couple friends with me while working on this, so we worked together to disassemble my laptop and sort the screws and various parts out nicely.

Reading the flash chips

After the laptop was completely disassembled, we then had access to the flash chips. We plugged a raspberry pi into the flash chip, and plugged the pi into another laptop, and proceeded with reading the chip. On the first chip, we got a good read instantly. Because there were no problems, we went ahead and flashed the first 8Mb of the 12Mb rom onto this first chip. The write was successful, and we then moved to read the second chip.

The second chip

We ran into problems instantly on the second chip. While reading was successful, we were unable to get a read that correctly identified the chip make and model. It always read the chip as having 0Mb of space, which is obviously wrong. We tried re-soldering wires, changing how we plug into the chip, and almost gave up and re-flashed the old BIOS onto the first chip. However, after many many tries and a dinner break, we decided to just read the documentation for the flash chip. As it turned out, there was a small error on the libreboot website in regards to which pins are important. On the website, it lists 6 out of the 8 pins as being important / used. This information is likely correct for the majority of chips, but unfortunately the second chip was mildly different.

The mild difference

On these chips, there exists a HOLD pin. This pin is usually unused when flashing libreboot onto a chip. After reading the documentation for my chip, we discovered that the HOLD pin on the second chip must be pulled high to enable any communication. This meant that for around 3 hours before this discovery, we had been held back by a single pin not being enabled. Once this mild difference was discovered, we were able to get good reads from the second chip and successfully flash libreboot.

Final thoughts

The reassembly of the laptop wasn't anything special, we had kept our screws and parts in order so there weren't any major speed bumps. While the laptop was disassembled I went ahead and applied new thermal paste / pads and also cleaned up the internals a bit. The only downside thus far of librebooting has been a bit of trouble enabling my graphics card, but honestly keeping it disabled has increased my battery life significantly so I don't think I will be changing that any time soon. Note that I have found out how to enable it, but I have no need to enable it as of this moment. Overall the experience of actually flashing libreboot was pretty difficult. It took up my entire day, but I was lucky enough to have friends with me so it was fun regardless. I highly recommend librebooting your laptop if you trust yourself and have the time to do it. (and if your laptop can be librebooted.)

If you want to libreboot your w540 and have any questions about the process, feel free to send me an email! I will happily help anyone wanting to make their laptop a little more free.

Tags: libreboot, foss, hardware, thinkpad