Installation on libreboot
While the Gentoo handbook is very thorough in detailing the process of installation on a standard BIOS evironment, 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:
- Next issue the ls command to verify the location of your Gentoo LiveUSB:
Below is an example output from that command:
(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/ram0is important, without it there is a kernel panic.
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:
- Finally execute the boot command:
Use a Kernel without blobs
There are two ways to ensure the kernel won't contain any binary blobs
Let portage remove the blobs
deblob USE flag to make portage remove the binary blobs from sys-kernel/gentoo-sources and sys-kernel/hardened-sources. The installation process will take longer than without the
deblob USE flag, because the deblob-scripts get applied to the sources after the patches get applied.
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.
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.
tar xvjpf linux-libre-3.19.1-gnu.tar.bz2
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.
echo 'ACCEPT_LICENSE="-* @FREE"' >> /etc/portage/make.conf
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.
grub2-mkconfig -o /boot/grub/libreboot_grub.cfg
Possible invocation of grub2-mkconfig, so libreboot-GRUB may find the config file.
Other ways to configure a GRUB Payload are listed on the libreboot site.