install libreboot on gigabyte ga g41m es2l version 1.1

17 replies [Last post]
tonlee
Offline
Joined: 09/08/2014

I want to install libreboot on a gigabyte ga g41m es2l version 1.1 computer. Libreboot.org does not provide pieces of information that I can
install it. Can you tell how to install libreboot?
Ram speed is 800mhz.
I asked on libreboot's irc but get no answer or answers which are not
useful.
Thank you.

jxself
Offline
Joined: 09/13/2010

"Libreboot.org does not provide pieces of information that I can install it."

Yes it does. Go to libreboot.org and click on Install. It's just not called out as a separate thing because it's the same process as how to install libreboot on all systems that aren't called out with special instructions from the default.

If one starts out at https://libreboot.org/docs/install/#flashrom and begins scrolling down beyond questions like "Asus KFSN4-DRE?" because it's not that device and beyond questions like "Apple iMac 5,2?" and etc. because it's not that machine either you eventually end up at "All good? Excellent! Moving on..." and "Download the libreboot_util.tar.xz archive, and..."

tonlee
Offline
Joined: 09/08/2014

> Libreboot.org does not provide pieces of information that I can install it.

I should have written
Libreboot.org does not provide enough pieces of information that I can install it.

> Yes it does.

I do not doubt all required pieces of information are displayed. But
it is not structured well enough that I am able to install
libreboot. I require a detailed plan.

jxself
Offline
Joined: 09/13/2010

"I require a detailed plan."
libreboot.org is very detailed.
So very detailed in fact that the information there can be used to make this quick-and-dirty script.
Yes it should be better. Yes it makes some assumptions. It's not meant to be run blindly.
It assumes you're installing usqwerty_txtmode.rom which may or may not be the case for you.
So you may need to change the file name for something else in libreboot_r20160907_grub_ga-g41m-es2l.tar.xz.
But it should give an idea of what to do.

#!/bin/bash
set -euo pipefail
#SPDX-License-Identifier: GPL-3.0-or-later

# Make note of MAC address
macaddress=`ifconfig -a | grep HWaddr | sed -e 's/^.*HWaddr //'`

# Make a note of ethernet name
interface=interface=`ip link | awk -F: '$0 !~ "lo|vir|wl|^[^0-9]"{print $2;getline}'`

# Put it in /etc/network/interfaces
cat <> /etc/network/interfaces
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto $interface
iface $interface inet dhcp
hwaddress ether $macaddress
EOF

# Get the GPG key to verify releases
gpg --recv-keys 0x969A979505E8C5B2

# Download libreboot utilities
wget https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/libreboot_r20160907_util.tar.xz
wget https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/SHA512SUMS
wget https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/SHA512SUMS.sig

# Verify GPG signature
gpg --verify SHA512SUMS.sig

# Verify hash
sha512sum -c SHA512SUMS 2>&1 | grep OK

# Extract tarball
tar xf libreboot_r20160907_util.tar.xz
cd libreboot_r20160907_util.tar.xz

# Get ROM
mkdir -p rom/grub
wget https://www.mirrorservice.org/sites/libreboot.org/release/stable/20160907/rom/grub/libreboot_r20160907_grub_ga-g41m-es2l.tar.xz

# Verify hash
sha512sum -c ../SHA512SUMS 2>&1 | grep OK

# Extract tarball
tar xf rom/grub/libreboot_r20160907_grub_ga-g41m-es2l.tar.xz

# On GA-G41M-ES2L, libreboot's default GRUB config has a stupid 1 second timeout
# This make it difficult to select other options on boot
# Adjust timeout to be 30 seconds
./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom extract -n grub.cfg -f grub.cfg
sed -i 's/timeout=1/timeout=30/g' grub.cfg
./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom remove -n grub.cfg
./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom add -n grub.cfg -f grub.cfg -t raw

# Do it!
sudo ./flash update libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom

# One you see it's VERIFIED turn off the computer.
# Not reboot -- sudo shutdown -h now

jxself
Offline
Joined: 09/13/2010

Oh, it seems that these forums chop off some pieces from part about putting it in /etc/network/interfaces so you can get the correct version from http://dpaste.com/20PTCD9.txt

jxself
Offline
Joined: 09/13/2010

I have also made some additional edits to that file. I can't seem to edit the post of the original file so using the link is an even better idea now.

tonlee
Offline
Joined: 09/08/2014

Thank you.

Is the dpaste link an every step required manual?
Is it correct that you can install libreboot from a gnulinux system
hdd?
If yes any specific settings which has to be set in bios before
you install libreboot?
I then run the commands from your dpaste link in the command line,
one by one?
Can I use a debian 9 system hdd?

jxself
Offline
Joined: 09/13/2010

"Is the dpaste link an every step required manual?"

I am not sure I understand this question.

"Is it correct that you can install libreboot from a gnulinux system hdd?"

Or this one. I mean, you need to have an operating system running in order to be downloading that stuff, yes haha. :)

"If yes any specific settings which has to be set in bios before you install libreboot?"

Nope.

"I then run the commands from your dpaste link in the command line, one by one?"

I don't recommend running them blindly. Read what's happening, know what's happening, understand what's happening. :)

tonlee
Offline
Joined: 09/08/2014

> I am not sure I understand this question.

If I follow your link I can do all the installing. It is not
required to go to libreboot.org for pieces of information?

> have an operating system running

About the mainboard it is not required to have a separate
gpio computer? You can install libreboot internally
from the computer's system hdd? Which would be
easier.

> I don't recommend running them blindly.

As said before, this is above my skills. The commands and
locations are partly gibberish to me. So I have to.

Will your link also work to install libreboot on a t400
from a beaglebone black?

jxself
Offline
Joined: 09/13/2010

"If I follow your link I can do all the installing. It is not
required to go to libreboot.org for pieces of information?"

Not really.

"You can install libreboot internally from the computer's system hdd? Which would be easier."

Right; libreboot can be installed using only software. An external method of flashing is only needed if something goes wrong.

"Will your link also work to install libreboot on a t400 from a beaglebone black?"

No. The original flashing (when the proprietary junk is still present) has to be done with an external method and can't be done only with software. Once libreboot is installed future updates can be done via software so you really only have that initial hurdle to get over.

tonlee
Offline
Joined: 09/08/2014

macaddress=`ifconfig -a | grep HWaddr | sed -e 's/^.*HWaddr //'`

Returns command not found.

I switched to a windows system.
Running
cmd
ipconfig /all

returns
ehternet adapter local area connection
media state media disconnected
description realtek rtl8168c(p)/8111c(p) family pci-e
gigabit ethernet nic (ndis 6.20)
physical address [mac address displays]
dhcp enabled yes
autoconfiguration enabled yes

Is the physical address the macaddress searched for?

jxself
Offline
Joined: 09/13/2010

"Returns command not found."

Which is missing? ifconfig? grep? sed? Just install whatever is missing. Ta Da!

Really, though, I thought everyone has those. ifconfig is from the net-tools package.
sudo apt install net-tools grep sed as applicable.

tonlee
Offline
Joined: 09/08/2014

https://linuxconfig.org/how-to-install-missing-ifconfig-command-on-debian-linux

ip address
displayed the same macaddress as on windows.

macaddress=`ifconfig -a | grep HWaddr | sed -e 's/^.*HWaddr //'`
Displays nothing on the command line.

If I install trisquel 7 64bit and update will instructions on
http://dpaste.com/20PTCD9.txt
work?
If I install trisquel 8 64bit and update will instructions on
http://dpaste.com/20PTCD9.txt
work?

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

As far as I understand, 'ip' is the new 'ifconfig'. 'ip link' is already called later in the script, to define the "interface" variable. Its output includes the MAC address too. In other terms, both "interface" and "macaddress" variables can be defined from the output of 'ip link'. For instance:
device=$(ip -o link | grep -ve lo -e vir -e wl)
interface=$(printf "$device" | cut -d : -f 2)
macaddress=$(printf "$device" | grep -Eo '([0-9a-f]{2}:){5}[0-9a-f]{2} ')

I have not used the more complicated 'sed' and 'awk' commands. There is little need for them here. And I preferred 'printf' to 'echo', which is less portable (this choice is pointless if the shebang is not substituted for "#!/bin/sh").

jxself
Offline
Joined: 09/13/2010

"macaddress=`ifconfig -a | grep HWaddr | sed -e 's/^.*HWaddr //'`
Displays nothing on the command line."

Right it doesn't display anything because it's not supposed to. What's happening is that the MAC address is merely being saved into a variable (called macaddress) for later use when making the file /etc/network/interfaces.

You can see it yourself by, after running the command macaddress=`ifconfig -a | grep HWaddr | sed -e 's/^.*HWaddr //'` by typing "echo $macaddress" without the quotes and it'll print the contents of that variable.

Anyway, the program saves the MAC address into a variable for use later. If you'll notice, that the variable appears when the program is creating /etc/network/interfaces (look for the reference to $macaddress) so yes, it is correct that nothing is printed when running that command. Because it's not supposed to.

The instructions should work on either Trisquel version.

tonlee
Offline
Joined: 09/08/2014

> Make note of MAC address

I understood it would display on command line and I should write it down.

http://dpaste.com/20PTCD9.txt
I ran the commands twice. But I did not run
> sudo ./flash update libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom
because of some messages which displayed.

First run of commands.
$ gpg --recv-keys 0x969A979505E8C5B2
gpg: directory `/home/pc/.gnupg' created
gpg: new configuration file `/home/pc/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/pc/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/pc/.gnupg/secring.gpg' created
gpg: keyring `/home/pc/.gnupg/pubring.gpg' created
gpg: no keyserver known (use option --keyserver)
gpg: keyserver receive failed: bad URI

$ gpg --verify SHA512SUMS.sig
gpg: Signature made Do 08 Sep 2016 00:15:17 CEST using RSA key ID 05E8C5B2
gpg: Can't check signature: public key not found

$ cd libreboot_r20160907_util.tar.xz
bash: cd: libreboot_r20160907_util.tar.xz: Not a directory

$ ./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom extract -n grub.cfg -f grub.cfg
bash: ./cbfstool/x86_64/cbfstool: No such file or directory <- this message because I set a keyboard other than us?
$ sed -i 's/timeout=1/timeout=30/g' grub.cfg
sed: can't read grub.cfg: No such file or directory

Second run of commands.
No errors about the gpg key.

$ cd libreboot_r20160907_util.tar.xz
bash: cd: libreboot_r20160907_util.tar.xz: Not a directory

$ ./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom extract -n grub.cfg -f grub.cfg
bash: ./cbfstool/x86_64/cbfstool: No such file or directory
$ sed -i 's/timeout=1/timeout=30/g' grub.cfg
sed: can't read grub.cfg: No such file or directory
$ ./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom remove -n grub.cfg
bash: ./cbfstool/x86_64/cbfstool: No such file or directory
$ ./cbfstool/x86_64/cbfstool libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom add -n grub.cfg -f grub.cfg -t raw
bash: ./cbfstool/x86_64/cbfstool: No such file or directory

> # Not reboot -- sudo shutdown -h now

Shall I write? sudo shutdown -h

tonlee
Offline
Joined: 09/08/2014

sudo ./flash update libreboot_r20160907_grub_ga-g41m-es2l/ga-g41m-es2l_usqwerty_txtmode.rom
displays
./flash: command not found.

tonlee
Offline
Joined: 09/08/2014

computer -> etc -> default -> grub

nano edit

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

into

GRUB_CMDLINE_LINUX_DEFAULT="iomem=relaxed quiet splash"

sudo flashrom -p internal:dualbiosindex=0 -w libreboot.rom

sudo flashrom -p internal:dualbiosindex=1 -w libreboot.rom