Logging to persistent tmpfs on Raspbian “jessie”

At the end of Using a Raspberry Pi 2 Model B as a router/firewall for the home LAN I wrote that I decided not to put /var/log into tmpfs, because:

  1. I wanted the logs to be persistent
  2. I thought that the wear would result in less and less of the sd card to become available (and 16GB for logs should last a loong time)

As it turned out the sd card died after one month.

I don’t know if the cause was excessive logging, the use of ntopng (which did write quite a lot, both in the number of files, the number of files, and in the total storage used, which was approximately 0,5GB after 30 days of uptime) or simply a bad sd card.

However, going forward with a new sd card, I’ve done the following:

  1. Removed ntopng
  2. Put /var/log on tmpfs (limited to 100MB in size), synced to a backing store on the sd card using rsync

Continue reading Logging to persistent tmpfs on Raspbian “jessie”

Using a Raspberry Pi 2 Model B as a router/firewall for the home LAN

Since 1999 I have been using a 1996 vintage DEC PII desktop as the router/firewall between the internet and my home network.  The DEC computer came to me with Win95 (or possibly Win98) in 1998, got SuSE linux and started its mission as router and firewall (and CUPS server, and IMAP server, and various other server stuff). When upgrading the SuSE installation to a newer version went south, it spent a while running ThomasEz’s floppyfw, until I used a floppy net install to install debian potato, immediately switched it to debian testing, until debian woody arrived, when it was moved to debian stable, and then I just kept running “apt-get dist-upgrade” until I finally had it running debian 8 “jessie” on june 6 in 2015.

The old DEC desktop has survived its maker company, survived lightning strikes that have sent the power supplies and/or main boards of other computers on the same LAN into continously beeping mode (i.e. broken). However, in December 2015 it started acting up, and crashing with irregular intervals (sometimes two weeks, sometimes one day).

So… the time for a replacement would have to be not too far ahead. The question was what to replace it with?
Continue reading Using a Raspberry Pi 2 Model B as a router/firewall for the home LAN

Debian “jessie” on Intel “Skylake”

Except for work computers with GNU/linux, the last of which was retired in 2008, my GNU/linux computers have been outdated hand-me-downs. And when the P4 I got back in 2010 went belly up, I figured it was time for trying a modern machine.

Note: I wasn’t going for a top-of-the-line gaming computer with high performance everything. Just a modern state of the art computer.

I wasn’t satisfied with the combination of price and specs on the desktop computers sold by the consumer electronic retailers, so I asked an old colleague who likes building his own computers (thanks Alexey!) to help me come up with an order for components that would work when I put it together. This is what I ordered:

  • Main board: ASUS H170M-PLUS, Socket-1151
  • CPU: Intel Core i5-6600 Skylake
  • Memory: Corsair Vengeance LPX DDR4 2133MHz 16GB
  • SSD: Kingston SSDNow V300 120GB 2.5″ OEM
  • Hard disk: Seagate Barracuda® 1TB
  • Cabinet: Fractal Design Define S Black
  • Power supply: Corsair CX500, 500W PSU

Continue reading Debian “jessie” on Intel “Skylake”

Installing debian “squeeze” with PXE boot on a Samsung N145 Plus netbook

Introduction

This article describes the steps necessary to install debian 6 “squeeze” on a Samsung N145 Plus netbook, with the following specification:

  • Intel Atom processor
  • 10.1″ display
  • 1GB RAM
  • 340GB HDD
  • Windows 7 preinstalled

Continue reading Installing debian “squeeze” with PXE boot on a Samsung N145 Plus netbook

Objektorientering i Java: “Monstersim”

English summary: This article is in Norwegian and presents a step-by-step receipe for creating a Java program that simulates a dragon and a troll in a cave. The purpose is to give an introduction to the Java programming language, object orientation, computer simulation, and the eclipse Java IDE’s support for aiding coding (in particular “Quick Fix”).

Denne artikkelen tar deg gjennom en steg-for-steg bruksanvisning for å lage et program som simulerer en drage og et troll i ei grotte. Artikkelen er ganske lang, men bør være rett fram å følge.

Continue reading Objektorientering i Java: “Monstersim”