Return to Level1Techs.com

From Novice to Gentoo

So @Goalkeeper told me to make a post, so here I am detailing how I went from WIndows to an almost full Gentoo ecosystem, and how I’ve been using Linux full time for a couple years at this point.

I started off, like many of you, believing that WIndows was the only option. It wasn’t until my first computer science classes at college that I saw my first Linux desktop. Of course, it was Ubuntu. As I started to code more and more, I needed to compile my code projects more and more so I started dual-booting Ubuntu on my laptop then quickly jumped with both feet in and wiped the windows partition.

Like many of you, this began my ever-long distro-hopping phase. It’s so easy and (gratis) free so why not? I installed all kinds of distros (including Arch, btw) and even some BSDs on my old trusty dell crapbook and was loving it. But, I needed a home. I eventually settled on Fedora because my goal was to work with Linux full time as a career, so why not get familiar with the RHEL ecosystem. The only thing is, Fedora wasn’t quite new enough for me. I like shiny, and I like new. As soon as the newest Fedora release came out, I would have to install it that day. Because I felt like I had to be this elite LInux Master :tm:. So then I moved on to Fedora Rawhide.

Bleeding edge causes you to bleed. It’s a fact of life. As I got newer kernel drivers and quicker vim updates, I also got more and more bugs. Like a lot more. I reported them as they came out but my laptop quickly became unusable for me. I probably made things worse by being so aggressively new, but oh well. At some point along my Fedora career, I installed it on my desktop as well, and it faired better than my laptop, but it also quickly became filled with junk. Eventually, I got to the point of needing to wipe the OS. Specifically, I was having a lot of issues with the radeon driver and couldn’t get amdgpu to install. This was a very sad point in my career, but I thought, why not something new? There was still one distro that I had yet to install. The dreaded Gentoo.

Now, I’ve heard the horror stories. I’ve heard about how nothing works and you have to do everything manually and blah blah blah. I didn’t care. I already had a non-working PC so what’s there to lose? So I gingerly downloaded the live Gentoo CD (it’s not an installer, its just another full Gentoo system), then I followed the Gentoo Handbook, and then my PC worked. It was really a painless install. I remember how much trouble I had figuring out how to wipe my original WIndows partition while keeping the pristine Ubutnu partition (granted, I learned a lot between those times). But I was suprised at the fact that I could install Gentoo in a couple hours when everybody said it would take days. Then I realized how minimal my install was. I think I had the kernel, bash, grub, and OpenRC (becuase SystemD is stoopid), that’s it. I had to install a DE, but before I could do that I had to set my profile, but before that I had to understand the USE flags and then I had to actually compile everything. The process took me a couple of weeks to get a full, stable DE with steam, the latest AMD drivers, etc. Again, it probably won’t take you this long, but I made a lot of mistakes along the way. I really struggled installing packages and figuring out the dependencies and what USE flags to use, but eventually, I started understanding things little by little. It was a struggle, it was a growing process, but I eventually got to the point where I felt in control of my system, not the other way around. And that’s the biggest draw to Gentoo for me. I have such fine grain control like I’ve never seen in another distro. Like let’s say you want to install Dolphin to play the latest games, but you know that you don’t have a bluetooth card. If you’re on Fedora, oh well, you gotta have bluetooth support baked in because it’s a binary package. But with Gentoo, all you need to do is echo "games-emulation/dolphin -bluetooth" >> /etc/portage/package.use/dolphin and then whenever you compile dolphin, it won’t even bother with bluetooth, resulting in a smaller file size. I know this is a trivial example, but it stil shows how flexible the Portage system is for Gentoo. You can also specify global USE flags in the /etc/portage/make.conf to accomplish the same thing but on a global level (i.e. specifiing -X for a headless server).

Speaking of servers, that was my next build. I had a FreeNas server running Emby, MineOS, etc. but I wanted dedicated front-end and back-end servers. So I built a small Ryzen virtualization server and installed Gentoo on it. This time, the entire system only took about a day. Part of the reason for that is that I started developing my own tooling for managing a Gentoo system. I wrote a small bash script to tell me what all the flags mean without having to open a browser, as well as using distcc to speed up compilation by leveraging multiple computers.

And on that note, people love to bash on how Gentoo makes you compile everything from source, but honestly, most things just work and typing sudo emerge vim isn’t any harder than sudo apt install vim. You just have to wait longer after typing the command but that’s about it. You can even set load limits and such so you can compile in the background while you continue to browse the interwebz or whatever you kids do nowadays.

My final build is a Ryzen APU inside of a PS3 case. It’s capable of running steam, as well a bunch of emulators. I also managed to sync the ROMs between that computer and my desktop so I can just pickup where I left off by running SyncThing on my server. I originally installed Gentoo on this machine as well, but it led to some disappointing support for some steam games. So while most people settle for windoze because of gaming, I settled for Ubuntu for gaming. I also want to be able to take this thing to LAN parties and stuff so probably better to have a binary-based package manager instead anyway (although you can make Gentoo install binary packages only with the right emerge flags).

TL;DR: Gentoo Desktop (named behemoth because its in a big case), Gentoo Virtualizaton Server (named hydra0, plan on adding more later), FreeNas Storage Server (name leviathan, idk, it’s cool and it fits), Ubuntu (light) Gaming PC in PS3 (non-pejoratively named gaystation3)

13 Likes

Great Story! Gentoo is definitly on my “To-Do” List still. I tried it once on my Desktop and managed to make a kernel without USB support.
My second try was on my Thinkpad. After emerge @world ran for 40hours straight, my wife pulled the charger without me realizing it. Laptop was dead 30 Minutes later. Didn’t feel like doing that again.

I’ll certainly give Gentoo another go on my Ryzen System when i have a free day to see if i can get a usable system to boot. It can’t be THAT hard :wink:

1 Like

Sounds gay. I’m in.

I don’t have enough time to mess with arch, would’ve given up gentoo on the first 2 steps.

I’m still on the hopping stage… It’s been like 10 months already… settled in for mint couple times but always go away cause I despise bunter 18.04 looks. Not sure if POMO works for me.

Got Fedora 30 recently and I’m loving RPM packages and DNF itself, getting my stack(nodejs and vscode, I’m still a noob in programming) up and running was even easier than on windoes.

2 Likes

I think the care and time you put into a gentoo install makes you appreciate the result more and makes it less likely for you to just nuke it.
When a “regular” install of other distros takes 10 Minutes with 4 questions to answer, it’s much less personal and much easier to just throw it away for something else.

What was your experience with arch like? I’m a bit of a walking Arch meme nowadays but I am thinking about going all in on a gentoo install just to get a grip on what everyone is talking about. I wonder though is emerge that much more feature-ful than the arch build system (asp)?

It’s come a long way. I started Fedora when they were just starting to transition dnf over to a new Python to C library and it’s definitely gotten faster. They could probably teach a lot to there emerge developers because dependency finding takes sooooo long. If I ever need/get a personal laptop, I’ll probably be putting Fedora on it, but just staying away from Rawhide

1 Like

I haven’t touched Arch in a while, but I liked it. If you can install Arch then you can install Gentoo. It’s not a direct 1-1, but it feels similar when you’re walking through the guide book. The big difference for me is that Arch definitely has a larger User base, but Gentoo lets you fine tune your system with a higher granularity.

I believe pacman just downloads binary blobs of packages but some things from the AUR will need to be compiled, whereas Gentoo compiles everything (unless the package specifies a -bin version, like firefox and firefox-bin). With certain packages, you can even install a compiler and have it immediately recompile itself with the to be the most efficient. I think openjdk does something like there where you download the openjdk-bin, then download openjdk, building it with openjdk-bin, then you recompile openjdk with openjdk

yeah binary is the default on arch but any package in the pacman repos you can just use the “asp checkout” command to get the source code /compile , and you can edit your universal make flags in /etc/makepkg.conf similar to /etc/portage/make.conf . Also anything you get from the AUR is source by default.

Here’s my /etc/makepkg.conf for example: http://ix.io/1ZOD

And here is an example PKGBUILD found in the main trunk folder for when you asp checkout irssi or any other such package: http://ix.io/1ZOE

1 Like

That’s really cool! I didn’t realize that Arch was even that configurable by default. I wonder if the OPTIONS is as complex as Gentoo’s USE, as well as if pacman has anything similar to emerge's FEATURES like distcc and ccache

Looks like both of those are mentioned in the “Build Environment” section of the makepkg.conf that I posted. I’m unfamiliar with those but I shall read into it.

Apparently mine is set like this: BUILDENV=(!distcc color !ccache check !sign)

1 Like

So far my impression of Arch is that it has an elegant / convenient method for anything and everything. But I know that Gentoo still exists for a reason lol. I’ll give it a real earnest go and get back to you on my thoughts.

2 Likes

Wow, I need to read better

But yeah, they’re starting to seem a lot more similar than I originally thought

Oh, also @pantato, Gentoo ships with openrc by default instead of systemd. There are also “profiles” that can simplify the USE flags for you. Like you can switch from a ‘desktop-gnome’ profile to a ‘desktop-plasma’ and it will add something like “-gnome plasma” to the global USE Flags.

Technically, they also have documenation for BSD/Gentoo as well as doing things like using ulibc and busybox for the entire system, but I haven’t tried those out.

they also have documenation for BSD/Gentoo

Wouldn’t recommend it for anything other than curiosity, it’s poorly maintained.

you can edit your universal make flags in /etc/makepkg.conf similar to /etc/portage/make.conf

I was not aware of that, I’ll have to do a comparison.

Gentoo is love. Of all the distros, Gentoo’s design scratches itches that almost no other distros do.

And of everything I’ve used, ZFS on Gentoo is the most stable ZFS on Linux I’ve encountered.

1 Like
2 Likes

Great post OP.

I’ve been tinkering with Funtoo lately, which is a close cousin of Gentoo. I actually think that these distros are easier to install than Arch. For instance, Arch asks what window manager you want to use … which is great, but in the Gentoo and Funtoo handbooks (yes, I’ve been reading both) they actually make recommendations based on compatibility. You don’t have to accept the recommendation, but at least it gives you a starting point, if you’ve never thought deep thoughts on the subject of window managers.

I would say that the concept of use flags is easy to grasp and their power is nothing short of awesome. But, the day to day task of actually managing use flags can take quite a while to master and I still periodically shake my head. Why, for instance, am I getting error messages about Python, when I have clearly configured my Python preferences?

Anywho, these distros are a lot of fun and definitely educational, but I wouldn’t recommend that you install them onto your primary machine, until you become proficient! Compiling can take some time on my antique Ivy Bridge T420 ThinkPad, but configuring a RAM disk for the compiler makes things go surprisingly quickly. Bottom line … don’t let the horror stories scare you away from these distros, particularly if you have a micro-management / control freak sorta personality. You’ll be in heaven!

2 Likes

So, it’s 7:30 AM here and i’ve basically a free Sunday. Going to get myself the current bootable ISO and try to get gentoo going on a spare 500G SSD on my Ryzen System. Which me Luck :wink:

Edit: From my previous installs it seems, that i wouldn’t need a gentoo live iso, correct? I could “just” use something like ubuntu live to install gentoo, so i can have a graphical environment with browser and such?

3 Likes

I seem to recall that you can but you can also install it in a vm and then boot from the sdd.

1 Like

From my previous installs it seems, that i wouldn’t need a gentoo live iso, correct?

There’s no Gentoo special sauce. If you’ve installed Arch, the ‘pacstrap’ step does essentially the same thing. Or debootstrap with the debian-installer.

There’s also a few Gentoo-based LiveCDs if you want to make sure it contains all your needed tools. Calculate Linux has a few different flavors of desktop, and does things in a Gentoo Way (more or less). SystemRescueCD used to be the recommended LiveCD, but they recently rebased to Arch and I’m not sure that is still valid.

But anything with a sane tar version should be fine.

1 Like

Holy Hell, what a ride.
So, i managed to somehow do it. I’m now writing to you from a fresh Gentoo system. Including awesomewm and freakin’ Nvidia drivers.
To get this done, i went with the binary version of firefox, but other than that, stuff just seems to be working:

There’s still a LOT to be done, but i have a working system. I never worked with openrc before, so that’ll be fun. Some x configuration like keyboard layout is on the todo list and such. But really, the big stuff is done. I’ve got Nvidia working with multilib, my system just boots fine and all the peripherals seem to be working.

Thank you so much again for posting this and motivating me to finally power through this! I’m sure a lot of my install is unoptimized and all over the place, but it freakin works. So happy :grin:

11 Likes