While the Gentoo handbook is very thorough in detailing the process of installation on a standard BIOS environment, Gluglugs or librebooted, refurbished Thinkpads take some special considerations. The purpose of this article is to document some of these considerations to help out any other Gentoo users who decide to take the 100% Free Software philosophy into practice with their installs.

Booting a Gentoo LiveCD Environment from Libreboot

After following the directions at LiveUSB to construct a bootable installation medium, you might encounter some issues with the grub scripts the Libreboot developer has written for booting from USB drives. If the directions for loading the isolinux config from USB at libreboot.org are followed, it spits out a three line error code and fails to boot the iso.

Manually boot Gentoo from GRUB CLI

To bypass this you must drop to the GRUB command line and manually specify your LiveCD kernel & initrd before issuing the boot command.

First descend to the GRUB command line:

c

Next issue the ls command to verify the location of your Gentoo LiveUSB:

grub> ls

Below is an example output from that command:

grub> ls (mem) (proc) (cbfs) (achi0) (achi0,msdos) (usb0)

Next specify the location of the Gentoo kernel, making sure to pass any parameters needed for boot. See man bootparam or use Google for more kernel parameters. The example below assumes that the Gentoo LiveCD is the only USB drive connected. The root=/dev/ram0 is important, without it there is a kernel panic.

grub> linux (usb0)/isolinux/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot

With the kernel and parameters specified, it's just a matter of identifying the initrd:

grub> initrd (usb0)/isolinux/gentoo.igz

Finally execute the boot command:

grub> boot

Use a Kernel without blobs

There are two ways to ensure the kernel won't contain any binary blobs.

Manualy remove the blobs (gentoo-sources and other sources)

deblob USE flag no more deblobs sys-kernel/gentoo-sources. Get instructions in the Kernel Deblobing article.

Use linux-libre sources

This is not recommended because the kernel sources installed this way won't get updated by portage. It is also more difficult to install the patches from the Project:Hardened.

You have been warned!

Navigate to linux-libre.org and download the desired kernel source.

user $ links http://linux-libre.fsfla.org/pub/linux-libre/releases/

When it comes time to Handbook:Parts/Installation/Kernel just extract the kernel source to a safe location and then symlink it to /usr/src/linux. The commands below are examples given the current kernel at time of writing, do not copy & paste these commands into ssh.

user $ tar xvjpf linux-libre-3.19.1-gnu.tar.bz2

root # ln -s /mnt/gentoo/linux-3.19.1 /mnt/gentoo/usr/src/linux

Maintaining FSF Certified Status

While configuring the portage make.conf be sure to specify that you want nothing to do with any software which isn't completely free. The whole point of this guide is to build a Libre Gentoo system after all. This step has to be done before emerging any software or do a manual update with the --newuse flag which can result in recompiling a lot of software unnecessarily.

root # echo 'ACCEPT_LICENSE="-* @FREE"' >> /etc/portage/make.conf

GRUB Payload

If you are using GRUB as Libreboot payload, it searches for libreboot_grub.cfg files on every partition in /boot/grub/ and /grub/. So you have to place the grub.cfg file there.

root # grub-mkconfig -o /boot/grub/libreboot_grub.cfg

Possible invocation of grub-mkconfig, so libreboot-GRUB may find the config file.

Other ways to configure a GRUB Payload are listed on the libreboot site. [1]