Raspberry Pi Gentoo Install

Keywords: #Gentoo #Linux #Raspberry Pi #Installation

Gentoo Linux Logo

So, in this here post I’ll go over my experience while installing Gentoo Linux on my Raspberry Pi B, 2011.12. A big thanks to my buddy Bobby for sending me a quarter-dozen of these wonderful things! The installation instructions provided by Gentoo, here, are nearly perfect. However, I hit a few stumbling blocks, likely due to the fact that the last time that I used Gentoo exclusively was around 2003. I’ll ensure they’re pointed-out, for those others who are out of practice or unfamiliar with the nuance of Gentoo. Also, all of these commands are performed as root or with the sudo command.

Gentoo Linux Logo

The first thing that I ran into was related to preparing the SD Card. First thing I’d do is run lsblk and note the name of the SD Card:

[root@laptop ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    1  15.2G  0 disk
├─sda1        8:1    1   100M  0 part
├─sda2        8:2    1   128M  0 part
└─sda3        8:3    1  14.9G  0 part
nvme0n1     259:0    0 465.8G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part /efi
├─nvme0n1p2 259:2    0    16G  0 part [SWAP]
├─nvme0n1p3 259:3    0    50G  0 part
├─nvme0n1p4 259:4    0    95G  0 part /
├─nvme0n1p5 259:5    0     5G  0 part /var
├─nvme0n1p6 259:6    0    50G  0 part
├─nvme0n1p7 259:7    0    50G  0 part
└─nvme0n1p8 259:8    0 199.3G  0 part
nvme1n1     259:9    0 476.9G  0 disk
├─nvme1n1p1 259:10   0   300M  0 part
├─nvme1n1p2 259:11   0   128M  0 part
├─nvme1n1p3 259:12   0 456.2G  0 part
├─nvme1n1p4 259:13   0   900M  0 part
└─nvme1n1p5 259:14   0  19.4G  0 part

In my case, it’s sda. Run fdisk and create your partitions ensuring that sda1, or whatever your first partition is called, is of the W95 FAT32 (LBA) type. Once you create the partitions with fdisk you should end up with something similar to this:

[root@laptop ~]$ fdisk -l /dev/sda
[sudo] password for henry:
Disk /dev/sda: 15.15 GiB, 16269705216 bytes, 31776768 sectors
Disk model: STORAGE DEVICE  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe5e76b4f

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         2048   206848   204801  100M  c W95 FAT32 (LBA)
/dev/sda2       208896   471039   262144  128M 83 Linux
/dev/sda3       471040 31776767 31305728 14.9G 83 Linux

If you’re using Gentoo, or Linux in general, you should be able to follow the rest of the instructions, entering the appropriate device name where needed. When you get to editing fstab, ensure that you edit it verbatim as the Raspberry Pi recognizes the SD Card as mmcblk .

From that point forward, the only issue I ran into was being able to select the profile. I wasn’t able to get eselect profile list to work until I ran emerge-webrsync, which takes a while. Also, if you emerge --ask ntp you might just go do something… for a while!

Anyhow, I hope these little tips help with the installation of Gentoo Linux on your Raspberry Pi B. If it didn’t, I don’t have a method for you to tell me that “I suck,” yet. That’s in-progress and may, very well, be done by the end of the weekend. Take ‘er easy.