Unattended Upgrades

** Update 11/10/17 [Thanks James] **

It looks like there is an issue if you had dnf-automatic in Fedora 25 or earlier as Fedora 26 jumps from DNF 1.x to 2.x, so please read THIS post before you install it in 25 and upgrade.

Blatantly stolen from here for my records – Thanks Iain R. Learmonth


Make sure that unattended-upgrades is installed and then enable the installation of updates (as root):

apt install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades

Fedora 22 or later

Beginning with Fedora 22, you can enable automatic updates via:

dnf install dnf-automatic

In /etc/dnf/automatic.conf set:

apply_updates = yes

Now enable and start automatic updates via:

systemctl enable dnf-automatic.timer
systemctl start dnf-automatic.timer

(Thanks to Enrico Zini I know all about these timer units in systemd now.)

RHEL or CentOS

For CentOS, RHEL, and older versions of Fedora, the yum-cron package is the preferred approach:

yum install yum-cron

In /etc/yum/yum-cron.conf set:

apply_updates = yes

Enable and start automatic updates via:

systemctl start yum-cron.service



Debian + KVM Virtualization

Moving on from my getting Nvidia working in Debian for my laptop, I thought I’d move onto the server and have a play with KVM Virtualization.  I’ve experiance with VMware and Hyper-V and Virtualization using RHEL, but that’s with a GUI and I wanted to everything from scratch.  I did the Debian minimal installation so I new I didn’t have anything I didn’t want.  I then did this.

  • apt-get install qemu-kvm libvirt-bin

A lot of extra dependencies were added as well.  Once I’d done this, I rebooted just to make sure.

To make sure it was up and working, you can run the following command to check it’s all working

  • virsh list –all

You should see something like this.  All this is telling you is what VM’s are running currently.


That’s all I had to do to get it working.

From that point on, all I needed to do was install virt-manager onto my laptop, setup keys so that virt-manager could log onto the server, upload a few iso images and install some vms, but that can be for another post.

Look Look Virtual Machines Running 😀



Debian Jessie + Kvm

While Debian has always been my favourite server os, due to it’s stability and community, I’ve never really ever used it for anything other than a standard simple samba storage server, and for that it’s always worked a treat.  I’ve been using Windows 2012 hyper-v for a couple of weeks and with replication, it’s been pretty sweet.  But in a paranoid moment, I realised, that to be honest, I don’t trust Microsoft one little bit so decided to change it.  If you know me you’ll know I just can’t make up my mind, so will probably be back or on another OS in a few days any way.

Any way, I need a virtualisation server, as I run a number of servers, so KVM for me is the way to go.  Here’s [in it’s simplest terms] how I got it working on Debian 8.

Install the required components

apt-get -y install qemu-kvm libvirt-bin virtinst bridge-utils#

Add the local user to the kvm and libvirt groups

adduser paulmellors kvm
adduser paulmellors libvirt

Reboot just to be on the safe side.  Job done.

Most of everything else can be done client side.  I already have converted my vhdx files to qcow2 so it’s just a case of using virt-manager [yes I’m lazy] to create the virtual machines, make a few tweaks to the network settings and bobs your uncle, or so they say.

Converting the files was done something like this

qemu-img convert -f vhdx -O qcow2 image1.vhdx image1.qcow2

Quite simple when you know how.

Stage two, is to do the same on my second server, then setup glusterfs to replicate the qcow2 files accross machines for redundancy 😀


Debian Testing – Nvidia

I’m currently running Debian testing on my laptop, it’s a Dell Latitude E6510 with an Nvidia video card. Here’s what I did to get it working, it was less painful than I thought it was going to be.

1, If you haven’t already add contrib and non-free to your sources.list file, then update.
2, Run this aptitude -r install linux-headers-$(uname -r|sed ‘s,[^-]*-[^-]*-,,’) nvidia-kernel-dkms
3, Install nvidia-xconfig and run it to generate your nvidia xorg.conf


Your nvidia should now be working.

Debian Cron Log

By default the logging for the cron demon is not active in Debian . To activate it, open the file


uncomment the line

# cron.* /var/log/cron.log

Restart rsyslog

/etc/init.d/rsyslog restart

You will find the cron logs in /var/log/cron.log

Nic Bonding with Debian 8 Jessie

With the release of Debian Jessie a couple of days ago, i thought I’d just reiterate a post I did a few months ago for Nic Bonding in Ubuntu.  Well the same process can be done with Debian 8, so if you have 2 NICs then give it a try.

sudo apt-get install ifenslave-2.6
sudo vi /etc/modules

Make sure it has these in it

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.

Load the bonding kernel module.

sudo modprobe bonding

Edit Interfaces

sudo vi /etc/network/interfaces

This is mine for an example

auto lo
iface lo inet loopback
#eth0 is manually configured, and slave to the “bond0” bonded NIC
auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0
#eth1 ditto, thus creating a 2-link bond.
auto eth1
iface eth1 inet manual
bond-master bond0

# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address x.x.x.x
gateway x.x.x.x
netmask x.x.x.x
dns-nameservers x.x.x.x x.x.x.x
dns-search xxxxxxx
bond-mode balance-tlb
bond-miimon 100
bond-slaves none

Reboot or restart networking, you should then be able to check your bonding to see if it’s worked.

# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)Bonding Mode: transmit load balancing
Primary Slave: eth0 (primary_reselect always)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx
Slave queue ID: 0

The time has come

I’m a tech head, if you know me you’ll know this, you’ll also know i’m never satisfied with anything, and this is mostly with my OS for both my servers and my laptop.  But there comes a time when you have to sit back and think what you’re actually wanting from it all.  Money in my case is a major factor, ok so it’s not a mega amount, but when you sit down and think about it, it all builds up.  £7.99 a month for Office 365, £7.99 a month for Creative cloud, £45.99 a year for anti virus software etc etc etc.  I’ve finally got to the stage where I can’t afford this, or more to the point, don’t want to have to spend the money for this, it’s sad that I have to fork out my hard earned money which I’d prefer to spend on the kids/family, to keep my systems stable, and with Windows Server 2012 running into the hundreds just for a single license, for the home user it’s madness.

There are alternatives, and for me, these alternatives are behind my decision to completely ditch Microsoft from all my systems at home.  Done, gone.  Don’t get me wrong, I do like Microsoft, but for me, the home user, there just isn’t any point any more.

My needs are simple, I need a laptop, and servers.  Here’s my setup currently.

Laptop – Ubuntu [it’s the easiest distro for me and my family to use as non linux users]

Server1 [Storage Server] – I’m running Debian on this, I just need a stable OS for the storage of my files/pictures/videos, this then backs up to a NAS which I haven’t had to touch in months.

Servers2/3 – These are my Ubuntu KVM servers, they are running multiple VM’s [webserver, irc server etc], I say 2/3 as they are using gluster, which is a technology to sync files between them both, I use it in case one of the servers fails, that way I can bring up the VM on the other server.

I’m going to get lots of “but you”, “I thought you were already…”, “why ubuntu”, “but you can still use windows with…” comments, but for the moment, this setup will/is going to work for me.  I’ve cancelled my office renewal, cancelled my antivirus renewal, going to cancel my Adobe renewal which will mean that I will no longer have to pay for software.

I’m going to have to hope I don’t regret this 🙂