We are still actively working on the spam issue.

Difference between revisions of "Libreboot"

From InstallGentoo Wiki
Jump to: navigation, search
m
m
 
(No difference)

Latest revision as of 22:00, 17 November 2019

Libreboot is a distribution of coreboot, which is basically identical to the latter, except for the fact that all proprietary blobs are removed in order to obtain a fully FOSS firmware that initializes hardware and boots the operating system. Despite the controversy, if you are at all interested in keeping/expanding your freedoms, then you should consider using Libreboot. However there is one major problem; Libreboot is only possible on a few different systems (thanks Intel).

Controversy

In September 2016, Libreboot's lead maintainer (a transgender) started accusing the FSF of having fired someone because of transgender-related issues. FSF denied these allegations. This maintainer then tried to remove Libreboot from the GNU but that wasn't a decision they were actually capable of making.

In January 2017, Richard Stallman released Libreboot from the GNU.

Then in April 2017, Libreboot removed the accusations and the lead maintainer apologized. The entire project was also transferred to another contributor. 3 weeks later they reapplied to be a part of GNU.

Installation

Check your hardware

Libreboot supports only a small subset of hardware on the market. A complete list is available on the Libreboot website, but some are easier to work with than others. For example, you can install Libreboot on a Thinkpad X60 notebook entirely via software means.

You'll also notice that most of the supported devices are at least a decade old. This is because modern hardware has severe security issues. Old hardware does too, but Libreboot is able to overcome it. As far as we know.

Now that you've realized that your current laptop doesn't support Libreboot, you're probably wondering what you should get instead. Personally, I would recommend the Thinkpad X200 notebook. If you're lucky, you can buy one off eBay for about $100 USD. Libreboot also supports the X200s and X200 Tablet models, but flashing Libreboot onto either of those is more difficult. With the X200, you don't need to solder anything.

Flashing your hardware

There are three steps to flashing your hardware:

  • Taking apart and wiring up your target device
  • Copying the current ROM off the flash chip
  • Overwriting the chip with Libreboot

The first step is best followed by a visual reference and varies significantly depending on the device, so you should search online for a video specific to your hardware.

You will need a program called "flashrom", which is probably available in your Linux distribution's package repositories.

Flashrom is a general-purpose flash chip programming tool. You'll be using the following flags for this installation process:

  • -p <device> - specifies the (hardware) programmer device you will use to control your flash chip. If you're using a Raspberry Pi or similar single-board computer, the device name will be linux_spi. You can check the program's manual page for a list of every supported device.
  • -r <filename> - orders flashrom to write the contents of the flash chip to the specified file.
  • -w <filename> - overwrites the ROM on the flash chip with the contents of the specified file. This is where you're most likely to brick the device.
  • -c <chipset> - specifies the chipset of the flash chip you're writing to. This should be printed on the chip.

You'll start with the command

sudo flashrom -p <device> -r romread1.rom

You may also need to specify the chipset with the -c flag. You can find the chipset printed on the flash chip.

It is recommended to read the ROM multiple times, and then compare the reads to make sure they're identical. Once you've read the ROM to three different files, you can compare their hashes to make sure they're the same.

sha256sum romread{1,2,3}.rom

Once you've gotten three identical reads, proceed by overwriting the ROM.

Libreboot has different versions for various ROM sizes of the same device, and you'll have to determine the storage capacity of your flash chip in order to choose the correct ROM. This can be done through flashrom by running it with just the programmer specified. You will see a line that looks like this:

Found Macronix flash chip "MX25L6405D" (8192 kB, SPI) mapped at physical address 0x00000

In this case, the flashchip has a capacity of 8192 kB, or 8MB.

Make sure you've selected the correct ROM image for Libreboot, and then run this command:

sudo flashrom -p <device> -w <libreboot_rom>

If everything works out well, flashrom will write the new ROM, attempt to verify it, and then exit with a message along the lines of "Flash verified!".

If you've gotten this far, then you should now disconnect everything from the target device and turn it on (with or without putting it completely back together). If everything worked, your screen will turn on to show a GRUB boot menu, with a background image of a penguin snuggling the back of a wildebeest. Find a safe place to keep your copy of the stock boot firmware ROM; you might need it in the future.

Installing an operating system

Now you just need to install an operating system.

One advantage Libreboot (and coreboot) offer over traditional boot firmware is that you can completely encrypt your disk, including the /boot directory. Installing your operating system this way requires some special changes to your partition setup. There are several guides for this on the Libreboot website.

Common issues

>Flashrom isn't finding my flash chip!

Check the connections to your flash chip. Make sure you've specified the correct programmer and chipset when running flashrom.

>Flashrom says the flash succeeded, but now the screen won't turn on!

One situation where this will happen is if Libreboot is having troubles with some of your device's hardware. If you're using mismatched RAM sticks, Libreboot probably won't work.

External links