Libreboot-compatible laptops with 8 GB of RAM and a Core 2 Duo P8700 used to require external flashing, but the Dell Latitude E6400 may be internally flashed. The E6400 has additional security measures that must be bypassed for flashing, which adds some extra steps to the process.
My goal here is to combine various guides on the libreboot.org website into one single guide that explains the entire process, start to finish.
Since this installation will involve restarting the laptop, I suggest having this guide open on a separate computer.
Installing Libreboot involves writing software to the lowest level of the computer hardware. This is inherently risky, the entire laptop can be ruined if things go wrong (it has happened to me, through my own blunders). If you have any valuable information on the laptop, make a backup before continuing with this guide.
The information in this guide is presented without warranty.
* Make sure you have the program flashrom installed by entering the following command: 'sudo apt install flashrom'
* Clone the 'lbmk' repository. You will use this repository to get some utility programs. 'git clone https://codeberg.org/libreboot/lbmk'
* Do not run the command './build module all'. This will compile EVERYTHING, which takes a very long time and isn't necessary. Only two programs in this repository are needed.
* In the lbmk folder, go to util/ich9utils and use the 'make' command to build out the programs in this folder. Do the same for the util/e6400-flash-unlock folder.
* You will need to check the size of the ROM on your particular laptop. Do so by running this command: 'sudo flashrom -p internal' Make note of the ROM size, and the name of the chip. More than one chip name will be listed. To find the correct chip name, try the following command with each chip name: 'sudo flashrom -p internal -c [CHIP NAME]'
* Download the ROM file. I recommend downloading from the following: https://www.mirrorservice.org/sites/libreboot.org/release/testing/
* Run the following command: 'sha256sum [NAME OF DOWNLOADED ROM FOLDER] && cat [DOWNLOADED ROM FOLDER'S SHA256 FILE]' If the outputs of these two commands match, you can be confident you downloaded the correct file.
* Delete the sha256 file.
* De-compress the downloaded ROM folder using the program of your choice. The resulting folder will be called 'bin'
* Inside 'bin' is another folder, and inside that folder is a file called 'seabios_e6400_[ROM size]_libgfxinit_corebootfb.rom'. Copy this file back up to your Downloads folder.
* Delete the 'bin' folder.
Installing Libreboot will usually erase your laptop's MAC address. This is not usually a big deal, but if there were two computers running Libreboot on the same network it can cause problems. The solution is to insert the MAC address into the ROM file.
* Find your laptop’s MAC address by running the command 'ip link'. The MAC address will be a string of numbers and letters following 'link/ether' Write down the MAC address for later.
* Go into the folder lbmk/util/ich9utils and run the following command: 'ich9gen' --macaddress [MAC ADDRESS YOU WROTE DOWN] This will produce several files, each containing your MAC address. The one relevant for you will be titled 'ich9fdgbe_[ROM SIZE].bin'. Copy this file to your Downloads folder, and go back to your Downloads folder.
* This step will insert the MAC address file into the ROM file: 'dd if=ich9fdgbe_[ROM SIZE].bin of=[ROM FILE] bs=12k count=1 conv=notrunc'
* Delete the file created by ich9gen.
This part is important in case things go wrong.
* First, read the proprietary BIOS off the chip. We will make three copies just to be sure it got read correctly.
* Next, make sure the files all match so that we know we got a clean read off the ROM chip. Enter the following command: 'sha256sum dump_1.bin && sha256sum dump_2.bin && sha256sum dump_3.bin' If the outputs from all three match, the read was successful.
* Go into the folder lbmk/util/e6400-flash-unlock, and run the program './e6400-flash-unlock' for the first time.
* Power down the laptop. It should power up on on its own afterwards.
* Go into the folder lbmk/util/e6400-flash-unlock, and run the program './e6400-flash-unlock' for the second time. This will disable the ROM’s security checks.
* Go back to your Downloads folder.
* It’s time to write the Libreboot BIOS to the ROM chip. Run the following:
'sudo flashrom -p internal -c [CHIP NAME] -w [ROM FILE]'
You may see some scary messages like erase failed
, this is okay.
* IF SOMETHING GOES WRONG: you will get a message saying not to turn off the computer. At this point, your best bet is to try flashing the proprietary BIOS back onto the ROM chip by running the command from the last step, but replacing the ROM file with 'dump_1.bin'
If you see the message FLASH VERIFIED
, that's a good sign that the write
was successful.
* Go back into lbmk/util/e6400-flash-unlock/ and run './e6400-flash-unlock' for a third time. This will re-engage the security checks for the ROM chip. If you don’t do this step, the computer will have a hard time shutting down.
* Power down the laptop.
* Wait for ten seconds or so. This might be superstition, but I like to give
the laptop time to think.
* Power on the laptop. If it starts up fine, then Libreboot was successfully installed.
This part is just to be extra-safe.
* Read the new file off the ROM: 'sudo flashrom -p internal -c [CHIP NAME] -r test_dump.bin'
* Compare files: 'sha256sum test_dump.bin && sha256sum [ROM FILE]' If the outputs match, then you can rest assured the new BIOS was correctly written to the ROM chip.
Open the following link: https://64.media.tumblr.com/1e2ffa3a26c5c976a6830ade1ffc4d6a/tumblr_inline_nobjkwmJdA1r3wqyr_500.gif