# Add Gentoo as a supported OS

**URL:** https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011
**Category:** Feature Requests
**Created:** [March 4, 2017, 3:09am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011 "2017-03-04T03:09:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![infmachine](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/i/ba9def/32.png) [@infmachine](https://discourse.pi-hole.net/u/infmachine)
#### Post date: [March 4, 2017, 3:09am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/1 "2017-03-04T03:09:42Z")

</div>

Hi,

Does anyone know if it is possible to install pi-hole on a Gentoo system? Also, if it's even remotely possible, what would be involved in doing this?

Thanks!

---

<div class="post-metadata">

### Author: ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)
#### Post date: [March 5, 2017, 3:54am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/2 "2017-03-05T03:54:36Z")

</div>

Moved to Feature Requests so users can vote on it and set the priority of supporting Gentoo and it's package management system.

---

<div class="post-metadata">

### Author: ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)
#### Post date: [March 5, 2017, 4:44am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/3 "2017-03-05T04:44:23Z")

</div>

Since it's not currently a [supported operating system](https://discourse.pi-hole.net/t/hardware-software-requirements/273), (but with enough votes, it could be!) you may want to ask over in [Customizing Pi-hole](https://discourse.pi-hole.net/c/customizing) to see if anyone has done it.

---

<div class="post-metadata">

### Author: ![Graf\_Euler](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/g/a183cd/32.png) [@Graf\_Euler](https://discourse.pi-hole.net/u/Graf_Euler)
#### Post date: [March 9, 2017, 5:28pm UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/4 "2017-03-09T17:28:19Z")

</div>

Hi,

I would also be interessted in this. I'm currently setting up my gentoo system again, which I will use as a home server/router and of course pi-hole needs to be installed.. somehow 😉

Have you already tried something on your own, Infmaschine? Maybe any advice/hints? 🙂

Thanks!

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [March 10, 2017, 7:17am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/5 "2017-03-10T07:17:33Z")

</div>

I used Gentoo myself back in the days where installing OpenOffice on it took about 12 hours (about 10 or more years ago). At some point I stopped using it because of not seeing any major benefit or speed compared to the distros that ship pre-compiled binaries. I have never tried it since then, but I doubt that it would really make a difference in most cases. According to `distrowatch` it is ranked as no. 45, which is not really impressive...

Supporting it requires a number of changes in our automated installer. We currently support `apt-get`, `dnf` and `yum` as package managers. If we would add `emerge` (I remember it being called like this), one would have to sit down and look at the corresponding lines of the installer (see [here](https://github.com/pi-hole/pi-hole/blob/master/automated%20install/basic-install.sh#L59)) and work out an `elif` section that sets the corresponding variables such that our installer can work with it. If Gentoo has no surprises on handling services, then that might be the only necessary change.

However, we are currently very busy with testing the new `FTL` engine and will move on to another large-scale change afterwards. So it is unlikely that one out of the developer test will be able to find the time to make himself familiar (again) with Gentoo and dig out the details that are needed. However, we may be able to give (some) support here if you decide to do it yourself. Also, we will be happy to accept a pull request into the installer code (or implement it in case you don't want to do that yourself) once it is in a reliable working condition.

---

<div class="post-metadata">

### Author: ![Graf\_Euler](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/g/a183cd/32.png) [@Graf\_Euler](https://discourse.pi-hole.net/u/Graf_Euler)
#### Post date: [March 14, 2017, 6:33pm UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/6 "2017-03-14T18:33:32Z")

</div>

I totally understand that from your point of view gentoo is not an 'interesting' target. For me it's more convenience. I'm using gentoo already about 10 years on my private server and I kind of know what I need to do to keep it running 😉 All my other systems (Desktop/Laptops) have Linux Mint running.

Anyway, on Thursday evening I gave it a try and did basically what you proposed and I had to figure out it's basically it, with a few exceptions, e.g. some USE flag changes may be required. Also there is the default init system in gentoo, openRC, which requires some special handling as well.

Today I got my full system to run the first time with pi-hole enabled. It's still not completely configured and everything, but I wanted to see it running. It ran but I had a horrible performance. Loading a single website took about 30 seconds or more... Not yet sure why, but I guess I'll figure it out later. Currently I don't have as much time as I like for this project, because of other things I work on, but I'm happy to share my modified install script as soon as it's in a reliable state. I have a lot of commented out stuff in there right now, because I did some steps manually.

---

<div class="post-metadata">

### Author: ![Graf\_Euler](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/g/a183cd/32.png) [@Graf\_Euler](https://discourse.pi-hole.net/u/Graf_Euler)
#### Post date: [January 20, 2018, 12:29pm UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/7 "2018-01-20T12:29:56Z")

</div>

Hey, It's me again! Long time no see.

I finally had the time to work on the gentoo support, because I wanted to update my Pi-Hole to the new version and had to do all the changes again. I haven't used github yet for any project, and thus I decided to only upload a patch to pastbin, [here](https://pastebin.com/s2i31B3f).  
The changes are really not that big. Here's an overview:

1. Added a gentoo section to the distro\_check() function to fill the global variables accordingly.
2. As gentoo uses OpenRC init system as default, I added checks if the 'service'-command is available before it is used (this also affects the pihole executable).
3. Added a lighttpd.conf.gentoo
4. For gentoo, the install-script does not install the dependencies! The script outputs the missing packages and requests the user to install them. This allows the user to review the use flags of the packages and review the comments of portage, since some packages require some further actions after installing them.

I hope this can be integrated into Pi-Hole, so I don't need to redo this work on every update again. Is it okay to just provide this patch? I guess, you would prefer to have a PR on github, right? 😉

---

<div class="post-metadata">

### Author: ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)
#### Post date: [January 20, 2018, 4:31pm UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/8 "2018-01-20T16:31:40Z")

</div>

A PR would be best, so we can discuss it with the changes easily.

---

<div class="post-metadata">

### Author: ![Graf\_Euler](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/g/a183cd/32.png) [@Graf\_Euler](https://discourse.pi-hole.net/u/Graf_Euler)
#### Post date: [January 21, 2018, 11:40am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/9 "2018-01-21T11:40:52Z")

</div>

Finally, I guess I kind of successfully created a [PR](https://github.com/pi-hole/pi-hole/pull/1928).

---

<div class="post-metadata">

### Author: ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)
#### Post date: [February 14, 2018, 4:57am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/10 "2018-02-14T04:57:17Z")

</div>

> <https://github.com/pi-hole/pi-hole/pull/1928>
>
> \*\*By submitting this pull request, I confirm the following:\*\*
> 
> \- \[X\] I have re…ad and understood the \[contributors guide\](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.
> \- \[X\] I have made only one major change in my proposed changes.
> \- \[X\] I have commented my proposed changes within the code.
> \- \[X\] I have tested my proposed changes, and have included unit tests where possible.
> \- \[X\] I am willing to help maintain this change if there are issues with it later.
> \- \[X\] I give this submission freely and claim no ownership.
> \- \[X\] It is compatible with the \[EUPL 1.2 license\](https://opensource.org/licenses/EUPL-1.1)
> \- \[X\] I have squashed any insignificant commits. (\[\`git rebase\`\](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
> \- \[X\] I have Signed Off all commits. (\[\`git commit --signoff\`\](https://git-scm.com/docs/git-commit#git-commit---signoff))
> 
> \---
> 
> \*\*What does this PR aim to accomplish?:\*\*
> 
> Add support for Gentoo OS to Pi-hole, see \[this feature request\](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011).
> 
> \*\*How does this PR accomplish the above?:\*\*
> 
> Originally described \[here\](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/7?u=graf\_euler).
> \> 1. Added a gentoo section to the distro\_check() function to fill the global variables accordingly.
> \> 2. As gentoo uses OpenRC init system as default, I added checks if the ‘service’-command is available before it is used (this also affects the pihole executable).
> \> 3. Added a lighttpd.conf.gentoo
> \> 4. For gentoo, the install-script does not install the dependencies! The script outputs the missing packages and requests the user to install them. This allows the user to review the use flags of the packages and review the comments of portage, since some packages require some further actions after installing them.
> 
> 
> \*\*What documentation changes (if any) are needed to support this PR?:\*\*
> 
> Add Gentoo to supported OS

---

<div class="post-metadata">

### Author: ![chscherrer](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/c/dfb087/32.png) [@chscherrer](https://discourse.pi-hole.net/u/chscherrer)
#### Post date: [May 23, 2018, 11:21am UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/11 "2018-05-23T11:21:54Z")

</div>

Hi,  
@Graf_Euler it seems to me that there are a couple more issues to solve. OpenRC boot-up script doesn't work, I've got no logs in /var/log/ and further. Could you please help with a couple more details how you made Pi-Hole work on your Gentoo? Thanks

---

<div class="post-metadata">

### Author: ![mustang01](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@mustang01](https://discourse.pi-hole.net/u/mustang01)
#### Post date: [November 1, 2019, 12:23pm UTC](https://discourse.pi-hole.net/t/add-gentoo-as-a-supported-os/2011/12 "2019-11-01T12:23:07Z")

</div>

Hello, I need to install pi-hole on gentoo.  
Will anyone update patches with gentoo support to the latest pihole version available? RPI 4 1024MB RAM freezes, ddns stops working, and that's not acceptable. I don't want to install the pihole virtual machine from ubuntu. Please help.
