Install Gentoo on Raspberry Pi 2 / 3 + USB Hardrive
This method uses a NOOBS install of Raspbian as the host to install Gentoo onto a USB Hardrive. It is quick & simple, providing a working Gentoo install with the least pain in the shortest time possible.
Please read ALL the instructions before attempting this install
This install method leaves NOOBS and Raspbian on the SD Card as the ultimate Rescue Disc (dual boot).
The install is quick and easy, using the stable Raspberry Pi Foundation Kernel off the SD-Card. No Kernel Compile required.
You'll also end up with a machine theoretically fractionally faster because it everything will be compiled for ARMv7a_hardFP unlike other distros which are all compiled for the older ARMv6. I also provide an optional Stage-3 compiled for NEON vpf4 to enable all Hardware Acceleration, current-armv7a_neonvfpv4_hardfp.
What follows is How I Did It .... Every instruction has been copy pasted directly from my install. I then re-installed a couple of times following and these instructions to check they are "correct". If you spot mistakes or can suggest improvements, please contact me.
Over View
The install falls roughly into 3 categories or stages.
- Booting Raspbian Desktop to partition & format the USB Hardive
- Download Base Files System, portage Package Stuff
- chroot to sort the configs, such as set the keyboard, date, and such like.
Ingredients
- Rapsberry Pi 2 / 3
- USB Hardrive
- 8Gb Micro SD card with NOOBS
It is trivial to purchase a suitable SD Card with NOOBS pre-installed. It is also wise, as not all SD Cards are created equal. This method demands NOOBS, as we will use at as an effective replacement for Grub/LILO.
Instructions INDEX
This might look intimidating, but many of these steps only require you too copy paste one or two lines. Some steps are just double checking, or informational.
- Install Raspbian using GUI Utility NOOBS
- Use Rapsbian Desktop too Partition and Format the USB Hardrive.
- Choose your Install method, console or ssh.
- Double check the location of the USB Hardrive really is /dev/sda
- mkdir /mnt/gentoo and Mount the USB Hardrive
- download Base System (armv7a_hardfp stage 3 tarball)
- download Portage (packaging system)
- pre-installed Linux Kernel (Raspberry Pi Foundation)
- add one line to make.conf
- copy DNS.
- prepare to chroot
- chroot into Gentoo
The next part is Config from inside a Gentoo chroot jail
- Start configuring Gentoo with Time, Date, TimeZone and install NTP. (Raspberry has no Hardware Clock)
- Select and install system locales.
- Edit partitions and file systems /etc/fstab.
- Configure Networking.
- Set Root Password and add a User Account.
- Must have Utils.
- Edit one line of NOOBS Boot Loader cmdlinetxt.
Gentoo is NOT a Toy
Have you backed up all your data yet ?
Gentoo is nothing like Linux Mint, it is a source based meta linux. It is important to realise, that things like a Working Desktop are not provided by this install. This install will only provide a minimal, raw, tiny, crude, gentoo environment - from which YOU can config and build what ever you want.
I am not, nor ever will be, an elite gentoo hacker or developer. I will never make it as a Technical Author either, being dsylexic with tendencies to aspergers and the social skills of a Ferengi does not help either. So for definitive correct information about all things Gentoo visit the website https://gentoo.org/ and take time to read the documentation (RTFM).
For more information, Gentoo has handbooks on Working with Gentoo, Working with Portage and Network configuration. You really should take at least a 5 minute look at the documentation before even considering an install. This install relies upon NOOBS, more comprehensive documentation, including more advanced configuration of NOOBS, is available on GitHub.
Now go away, sleep on it, and then if you still want to have a go, re-read the instructions, back up everything, and follow the instructions with the Official Gentoo Handbook to hand - so that you can see the steps I skipped in an effort to simplify the install.
While I have taken every precaution I could think of, please be aware that installing any operating system is not with out risk.
Elite Linux Combat Rating System
Spot the oxymoron....
- Mac User - Harmless
- Windows Expert - Mostly Harmless
- Mint - Deadly
- Gentoo User - Dangerous
- Linux From Scratch - Elite
The Mac is harmless, everything just works. Windows mostly harmless because they think config means clicking in control panel. Mint is deadly because of package dependency hell, and a flawed release system. Gentoo is down right dangerous, because it is not a toy. Only Linux From Scratch is Elite, and that is the truth of it... LOL :-)
Did you spot the oxymoron ?
:-)