Do Not "Switch To Linux"

Using Linux for your first time can be very exciting. You suddenly gain access to a wealth of customization options, all the free and open-source software you could ever want or need, and access to a strong community of (sometimes overly-)enthusiastic Linux users. But before you dive headfirst into this new world, there's an important consideration I'd like to advise you on. It boils down to this: don't "switch to Linux" on your one and only computer. Don't dual-boot it and don't bother with getting a second hard drive. In essence, do not touch your current working computer, no matter what operating system it's running. Leave it fully operational and invest in a cheap second computer instead. You can thank me later!

linux (10)

Automate Linux Kernel Builds

I wrote a small shell scriptâ„¢ to automate building new Linux Kernels. I use this to build new kernels on my Debian systems:

#!/usr/bin/env bash

WORKSPACE='/home/gd/workspace'
LINUX="${WORKSPACE}/linux"

find "${WORKSPACE}" -type f \( -name 'linux-*deb' -o -name 'linux-upstream*' \) -mtime -3 -exec rm {} \;

linux (10) kernel (5) bash (3)

Generate new Factorio map

#!bash

su -

service factorio stop

cd /factorio

bin/x64/factorio --create saves/my-save.zip \
                 --map-gen-settings data/map-gen-settings.json \
                 --map-settings data/map-settings.json
                 
chown -R factorio:factorio /factorio

service factorio start

linux (10) factorio (2)

Factorio on systemd

# adduser factorio
# systemctl enable factorio.service
# service factorio start

# /etc/systemd/system/factorio.service
[Unit]
Description=Factorio Server

[Service]
Type=simple
User=factorio
ExecStart=/factorio/bin/x64/factorio --start-server-load-latest --server-settings /factorio/data/server-settings.json
WorkingDirectory=/factorio
Restart=on-failure
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

linux (10) factorio (2) systemd (1)

How-to build latest Linux kernel from Linus' git repo on Debian

Here's a how-to for building a recent Linux kernel on your Debian GNU/Linux box: You will need to do all this as root. It's serious business building new Linux kernels :) su - The dash after the su command makes it behave as if you had logged in as root directly, a full login environment is applied. Make sure you have the required tools and libraries installed: apt install build-essential initramfs-tools procps libncurses5-dev fakeroot git-core screen zlib1g-dev flex bison bc libelf-dev:native libssl-dev:native Use git to clone Linus' latest git repo: cd /usr/src git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git This will take a long time: Cloning into 'linux'... remote: Counting objects: 2725713, done. remote: Compressing objects: 100% (412816/412816), done. remote: Total 2725713 (delta 2286272), reused 2725359 (delta 2285962) Receiving objects: 100% (2725713/2725713), 559.28 MiB | 3.30 MiB/s, done. Resolving deltas: 100% (2286272/2286272), done. Once you

linux (10) debian (5) kernel (5) ubuntu (1)

How-to guide for beginner-level Linux Kernel patch submissions

Every day I see new Linux Kernel hackers fail at their first patch submission. I'm not an expert, but I've learned how the process works and most importantly I've learned how to avoid irritating Linux Kernel maintainers. The "maintainers" are the gate keepers to the Linux Kernel. If you piss them off you will never land any patches into the Linux Kernel. All Linux Kernel development takes place in the open and hundreds (thousands?) of Linux Kernel developers will see and possibly read your patch submissions. You will want to make every effort to submit the best possible patch you can. That's where I come in. If you follow my guide there's a better than average chance you will actually land your patch into the Linux Kernel. For a beginner I recommend working on the drivers/staging tree maintained by Greg Kroah-Hartman. Clone Greg KH's staging tree: > git clone git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git This will take a while. After that you need to checkou

linux (10) kernel (5) git (3) sed (1) diff (1) patch (1)