Tag Archives: Linux

Raspberry Pi | how to disable swapping

If you wan’t to disable swapping on your raspberry pi to prevent fast weardown of you SD card or even if you are using a SSD to boot on via USB it can reduce your disks lifespan if you have swapping turned on and it’s default on.

Here is how to completely disable swapping on Raspberry Pi (raspberian)

sudo dphys-swapfile swapoff
sudo dphys-swapfile uninstall
sudo update-rc.d dphys-swapfile remove
apt purge dphys-swapfile

This is tested on my Raspberry Pi 3 with Raspberian 9 (Debian 9 based)

WARNING: this is only a good idea if you know that the server has enough ram for it’s tasks.

CS:GO | Linux | Playing against my 10 year old kid and losing

I have tested Steam on my old Lenovo T450 laptop that is my secondary machine, it’s running Linux Mint 19 Cinnamon Edition and is working great with Steam. I’m quite surprised that it was fast enough to Play CS:GO and in the same time being recording a full desktop session, but it worked out just fine. My hardware is Core 5i CPU, 8 GB RAM, Intel HD 5500 Grapichs card, 128 GB SSD harddisk. I used KaZam to record with, it came with Linux Mint.

How to upgrade Debian 8 (Jessie) to 9 (stretch)

If you have an old Debian Jessie you would like to have upgraded to Debian Stretch then here is what i did to make it happend.

First take a snapshot of your filesystems, just to be safe….

Run the commands below, you may have to do some minor cleanup in your /apt/sources.d directory, there can be some duplicate entries with the name jessie in it.
sed -i 's/jessie/stretch/g' /etc/apt/sources.list 
apt-get update 
apt-get upgrade 
apt-get dist-upgrade 
apt-get autoremove 
apt-get clean apt-get dist-upgrade -f 

Raspberry Pi | apt not working – segmentation fault

If you are experiencing segmentation fault on an apt update like this

peter@rasp1:~ $ sudo apt update
Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
Get:2 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Get:3 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,536 kB]
Get:4 http://archive.raspberrypi.org jessie/main armhf Packages [171 kB]
E: Method gzip has died unexpectedly!
E: Sub-process gzip received a segmentation fault.
E: Method /usr/lib/apt/methods/gzip did not start correctly

Then it can be resolved by sudo apt-get install –reinstall apt

peter@rasp1:~ $ sudo apt-get install --reinstall apt
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/1,067 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 38419 files and directories currently installed.)
Preparing to unpack .../apt_1.0.9.8.4_armhf.deb ...
Unpacking apt (1.0.9.8.4) over (1.0.9.8.4) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Setting up apt (1.0.9.8.4) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...

After update and reinstall you will be able to do an sudo apt-update end a sudo apt-upgrade

peter@rasp1:~ $ sudo apt update
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Get:1 http://mirrordirector.raspbian.org jessie/main armhf Packages [9,536 kB]
Get:2 http://archive.raspberrypi.org jessie/main armhf Packages [171 kB]
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Get:3 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [43.3 kB]
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Get:4 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [84.2 kB]
Get:5 http://mirrordirector.raspbian.org jessie/rpi armhf Packages [1,356 B]
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 8,692 kB in 20s (417 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
49 packages can be upgraded. Run 'apt list --upgradable' to see them.