zigford.org

About | Links | Scripts
Sharing linux/windows scripts and tips

Gentoo Secure Boot on Precision 5510

August 07, 2023 — Jesse Harris

Work requires me to run Windows from time to time. With modern deployments of Windows requiring BitLocker and Secure Boot, I want to be able to seamlessly reboot to Gentoo without having to fiddle with UEFI and disable Secure Boot.

Read more...

Openfortivpn on Gentoo with OpenRC

April 14, 2021 — Jesse Harris

I recently setup a low-powered HP Stream laptop with Gentoo. Given it's lower spec, I opted for configuring it with a more conservative set of packages and decided to try OpenRC instead of systemd.

One of the default use flags for systemd, is resolvconf. On my other systems with Systemd, connecting to a FortiNet VPN usually results in DNS being automatically configured.

The Openfortivpn client uses resolvconf, but with OpenRC I don't have it installed, so I went about exploring how to configure the openfortivpn and ppp client to setup DNS automatically.

Read more...

r8152 resume from suspend

January 19, 2021 — Jesse Harris

I recently upgraded my Precision 5510 to a Precision 5550. I was able to use btrfs send to transfer my existing Gentoo install to the new machine and used genkernel for my kernel config until I can get around to fine tuning. I have noticed an odd quirk where resuming from suspend, the ethernet port on my TB16 thunderbolt dock does not work.

Read more...

Screen sharing and capture in Wayland on Gentoo

June 01, 2020 — Jesse Harris

The article shows the tweaks I had to make to my system in order to be able to share my screen in Zoom, and capture my screen in OBS under Gnome on Wayland on Gentoo.

Read more...

Firewalld kernel requirements

March 06, 2020 — Jesse Harris

I wanted to work out the minimum kernel requirements to run Firewalld with nftables backend running in Gentoo. Here I've documented my findings.

Read more...

Nagios Core on Gentoo/Raspberry Pi with Nginx

February 29, 2020 — Jesse Harris

I haven't posted in a while due to a change in my work. I'm currently working in the Server and Storage team at my workplace for a 6 month secondment. The role is much more aligned with my enjoyment of using GNU/Linux.

Read more...

Precision 5510 - Gentoo GNU/Linux

October 12, 2019 — Jesse Harris

This documents all configurations, apps and tweaks to get a nicely working Linux machine.

Read more...

Cascadia Code

September 20, 2019 — Jesse Harris

Microsoft released a new open source font yesterday to go along with their Windows Terminal project. I wipped up a quick ebuild to use it on my Gentoo systems.

Read more...

Snapd Repository for Gentoo

September 07, 2019 — Jesse Harris

I've been maintaining my personal Gentoo overlay for sometime with my own ebuild of snapd. I've received a number of comments and questions about it, both via email, twitter and on github.

Read more...

Live on 64-bit Raspberry Pi 4 with Gentoo

August 15, 2019 — Jesse Harris

I recently wrote that the site is now hosted from the raspberry pi 4.

Read more...

Converting VHS and DV to Modern Formats - Part 1

May 26, 2019 — Jesse Harris

Over the past 10 years I've been meaning to convert my family's VHS tapes to a modern format. Originally that would have been DVD, but as it seems that DVD and Blu-Ray would have a limited lifespan, I've opted to go directly to modern encoding formats.

Read more...

Snaps on Gentoo - The saga continues

February 10, 2019 — Jesse Harris

A while ago I posted about Snaps on Gentoo, about why and how to get it working. Sometime after that post, snaps stopped working and I didn't have the time to investigate.

Until last week that is.

Read more...

Gentoo local overlay

September 18, 2018 — Jesse Harris

I find myself having to create a local overlay to test/develop a new ebuild without affecting my main system from time to time. I usually fire up a clean kvm Gentoo guest to start working on, but I've usually forgotten the proceedure

This is a quick instruction on a straight-forward local overlay

  1. Create the local path tree where the overlay will reside:

    mkdir -p /usr/local/portage/overlay/{metadata,profiles}
    
  2. Create the layout.conf file and repo_name file

    cd /usr/local/portage/overlay
    echo "masters = gentoo" > metadata/layout.conf
    echo  "$(hostname)" > profiles/repo_name
    
  3. Create a repos.conf file:

    cat <<EOF>/etc/portage/repos.conf/$(hostname).conf
    [$(hostname)]
    location = /usr/local/portage/overlay
    auto-sync = no
    priority = 10
    EOF
    

done.

Now you can begin to populate the local repo with custom ebuilds. I usually do this and then upload my new ebuild to my github repository.

See also:

repos.conf, Custom Repository

Tags: gentoo, portage-overlay

Snaps on Gentoo

August 12, 2018 — Jesse Harris

Update 07/09/2019

Snapd is now in a overlay on it's on for your convenience. See here

Update

The instructions to get snaps working on gentoo here are outdated. See my current post Snaps on Gentoo - The saga continues

Why?

Many will think it is heresy to put binary packages on a Gentoo system let alone a package system which encourages binary packages to come with their own set of shared libraries.

While I tend to agree, the practicality of sticking to this arrangement can be difficult for a couple of cases. Here are a few I can think of:

  • Source not available
  • No binary package or source ebuild for Gentoo
  • ebuild takes too long to compile

In the case of ebuilds taking too long (eg. chromium), I have a limited budget and can't really afford to leave my power hungry desktop on 24/7 to keep chromium builds up-to-date.

Here are a quick list of software that I use which fall into one of these categories:

  • Citrix Reciever
  • Powershell (Available as source, but no ebuild and I haven't had the time to try write one myself)
  • Minecraft (Gaming with the kids)
  • Discord (Chatting with games)
  • Chromium (Primarily a firefox user, but have some trouble with getting it to see and work with Citrix)

With my excuses for putting snap's on Gentoo out of the way, here is how I've got it working for my systems.

Overlay

There are a few overlay's for Gentoo out there. Even an official one maintained (or as the case may be, unmaintained) by zyga from Canonical. I tried that one, and many of the forks with no such luck.

After googling around I stumbled on a thread on snapcraft.io and a post from user jamesb192 about the progress on their snapd overlay.

JamesB192 overlay works, but it doesn't have an overlay.xml file for adding with layman. To overcome this, I've hosted one on my site here. You can add this to your system using overlay like this:

        echo app-portage/layman git >> /etc/portage/package.use/layman
        emerge app-portage/layman
        layman -o http://jesseharrisit.com/overlay.xml -f -a gentoo-zigford

Now that you have the overlay installed should be able to emerge snapd like so:

        emerge app-emulation/snapd

Note - You may need to adjust your kernel config and the ebuild is pretty good at highlighting which options need to be set.

Issues

During my testing of snaps on Gentoo, I've come across a couple of issues that either have been solved or could be solved in the ebuild

  1. snap packages only install and run as root (This was solved by setting suid on /usr/lib64/snapd/snap-confine, and solved in ebuild 2.34)
  2. /var/lib/snapd not created (manually mkdir the directory)

Final thoughts.

Snap packages feel like a great augmentation for Gentoo. It allows me to keep using Gentoo as a daily driver and augment some of it's missing packages with packages from more popular distros.

Tags: gentoo, snapd, overlay

Downgrade Gentoo from testing to stable

August 05, 2018 — Jesse Harris

At some point in my main Gentoo boxes life I added the ~amd64 keyword into my make.conf. I don't remeber why I did this, but I can't think of a reason I need my entire install to be bleeding edge.

Read more...

Using the latest vim on Gentoo

May 22, 2018 — Jesse Harris

Most people (including myself until recently), think of Gentoo as a bleeding edge source distribution. This is pretty far from accurate as most packages marked stable are quite out of date. And even if you decide to accept all unstable packages by adding:

        ACCEPT_KEYWORKS="~amd64"

to your make.conf file, you will likely be a bit disappointed when you can't get the latest gnome bits.

As my last post indicated, I'm a bit of a vim user and I want to have the latest vim on all my machines (Windows at work, WSL/Ubuntu 18.04 on the Windows box, and Gentoo at home). To that end, here is the simple thing you need to do to get the latest Vim on Gentoo:

Overview

  1. Add a special keyword to vim's ACCEPT_KEYWORDS var
  2. Unmerge existing vim
  3. emerge the new vim

Keywords

Newer versions of portage allow /etc/portage/package.keywords to be a directory with simple files so that you can seperate files for seperate packages. Now, lets check if it is a file or dir and convert it if it is a directory.

    cd /etc/portage
    if test -f package.keywords; then
        mv package.keywords keywords
        mkdir package.keywords
        mv keywords package.keywords/
    fi

And now, lets use the special keyword for the vim package which will allow ebuilds from github

    echo app-editors/vim "**" > package.keywords/vim
    echo app-editors/gvim "**" >> package.keywords/vim
    echo app-editors/vim-core "**" >> package.keywords/vim

Unmerge existing vim

    emerge --unmerge app-editors/vim app-editors/gvim

Merge the new vim

    emerge app-editors/vim app-editors/gvim

Final thoughts.

This is the way I did it, but thinking about it now, it may be unnessecary to unmerge vim. You could probably get away with running emerge --update vim gvim

Tags: gentoo, vim, git, ebuild

Burning a DVD Video on Gentoo

May 15, 2018 — Jesse Harris

Quick note for my future self

Read more...