Monday, June 23, 2014

Motherboard/BIOS make and model in Linux

Forgotten what motherboard is in the server that's furthest in in the closet? No worries, you can check it from the console in Linux with this simple command.
[ -f /usr/sbin/dmidecode ] && sudo -v && echo -n "Motherboard" && sudo /usr/sbin/dmidecode -t 1 | grep "Manufacturer\|Product Name\|Serial Number" | tr -d "\t" | sed "s/Manufacturer//" && echo -ne "\nBIOS" && sudo /usr/sbin/dmidecode -t 0 | grep "Vendor\|Version\|Release" | tr -d "\t" | sed "s/Vendor//"
This will produce something like this
Motherboard: System manufacturer
Product Name: P5Q-E
Serial Number: System Serial Number

BIOS: American Megatrends Inc.
Version: 2101
Release Date: 04/06/2009
As you can see all information is not always available but hopefully the product name is there at least. This should be all you need to find information about the motherboard.

Source

Sunday, June 22, 2014

Automatic VirtualBox extpack upgrade on Linux host

Can't be arsed to write something here ...
#!/bin/bash
version=$(vboxmanage -v)
echo Version: $version
var1=$(echo $version | cut -d 'r' -f 1)
echo Main   : $var1
var2=$(echo $version | cut -d 'r' -f 2)
echo Build  : $var2
file="Oracle_VM_VirtualBox_Extension_Pack-$var1-$var2.vbox-extpack"
echo Extpack: $file
wget http://download.virtualbox.org/virtualbox/$var1/$file -O /tmp/$file
VBoxManage extpack install /tmp/$file --replace

Thursday, June 19, 2014

XBMC - auto login, auto start, auto restart - systemd edition

These instructions are stupid, you should totally use this now. :)


Right up front I want to admit that I am not well versed in the inner workings of systemd and there are probably ways to get this done without resorting to "hax" as well. But I like easy, easy is simple by definition and I also like simple. Fancy that.

This is basically a refresh of an old post from 2012 that covers auto login and auto (re)start of xbmc under ubuntu/upstart. This time it is Arch Linux and, more specifically, systemd that is the obstacle. An obstacle which is not insurmountable, or at least not unworkaroundable as it were.