Tag Archives: operating system

Running Ubuntu on a Desktop


Recently I’ve had the pleasure of installing Ubuntu on my desktop. Here are some thoughts and what I initially do:

Machine is a:

Motherboard: Gigayte GA-EX58-UD3R
CPU: Intel Core i7
Memory: 8GB
Disks: Intel i300 SSD, 2x500GB and 1x3TB Western Digital Drives.
Graphics Card: AMD HD6800

Here are some of the things figured out along the way:

  • grub2 does not like keyboard, but if I boot on the Ultimate Boot CD (grub) – the keyboard does work. This is with flipping all the USB keyboard, mouse, storage, legacy .. settings on and off in BIOS.
    • After removing Ubuntu 12.10 and installing 12.04 (this is with USB things enabled in BIOS) – the keyboard works in grub2 menu.
  • to install better drivers, easiest is to open Ubuntu Software, edit sources and allow post-release things.
    • then go to settings and “additional drivers”
  • after upgrading to fglrx,
    • to change speed of the GPU fan to 20% hit: aticonfig –pplib-cmd “set fanspeed 0 20”
    • to view the speed of the GPU fan hit: aticonfig –pplib-cmd “get fanspeed 0”
    • to view the GPU temperature hit: aticonfig –adapter=0 –od-gettemperature

If you do decide to try with newer drivers for the ATI – card, make sure you have the installation CD/DVD handy. Or even better, get it on a USB-drive, way faster.

To find the devices for / and /boot – at least when I boot up there are these disk icons in the side-bar on the left side. If you hover over the icon you’ll see the size, if you click, it mounts and then a folder is opened. Then in the output of ‘mount’ you can see which device it is. Unmount and then proceed with these to get a working chroot:

sudo mount /mnt /dev/devicethathasroot
sudo mount /mnt/boot /dev/devicethathasslashboot
sudo mount ‐‐bind /dev /mnt/dev
sudo mount ‐‐bind /proc /mnt/proc
sudo mount ‐‐bind /sys /mnt/sys
xhost +local:
# above xhost is to get x things working from within a chroot (possibly unsafe?).
chroot /mnt
# you can get network working, it needs a good /etc/resolv.conf first. Either overwrite the existing one or somehow get the local nameserver up and running

Install some good software

apt-get install screen openssh-server tmux openjdk-6-jre unrar p7zip pidgin vim

Spotify Repository – http://www.ubuntuupdates.org/ppa/spotify

Google Chrome Repository – http://www.ubuntuupdates.org/ppa/google_chrome

Universal Media Server

For UMS you’ll also need:

apt-get install ffmpeg mplayer mencoder libzen-dev mediainfo

You also need to make sure zen and mediainfo works – check trace log in UMS to see if there are any errors in the beginning that they are not found. If so the hack is to create symlinks. For me the libzen.so and libmediainfo.so are in the /usr/lib/x86_64-linux-gnu/ directory.

Getting graphite running (for graphing / system monitoring )

One reason was that I wanted to learn more about this tool – but another reason is that it’s quite light weight, especially if you’re going to be running an httpd anyway.

To install it, follow this guide: http://coreygoldberg.blogspot.fi/2012/04/installing-graphite-099-on-ubuntu-1204.html

Carbon-cache initd-script: https://gist.github.com/1492384

To monitor temperature and fan speed of your AMD/ATI card put this script in /usr/local/bin/atitemp.sh:

# Script to monitor temp and fanspeed of an AMD/ATI card.
# amdccle required? Also X?

HOST1="$(hostname -s)"

CMD="$(which aticonfig)"

if [ "$?" != "0" ]; then
        echo "Cannot find aticonfig, check paths and if it's even installed."
        exit $?

while [ 1 ];

TEMP=$(/usr/bin/aticonfig --adapter=0 --od-gettemperature|grep Sensor|awk '{print $5}'|sed -e 's/\.00//')
SPEED=$(/usr/bin/aticonfig --adapter=0 --pplib-cmd "get fanspeed 0"|grep Result|awk '{print $4}'|tr -d "%")
DATU="$(date +%s)"

echo "##########" >> $LOGF

if [ "$TEMP" != "" ]; then
echo "servers.$HOST1.atitemp $TEMP $DATU"|nc localhost 2003

if [ "$DEBUG" == "1" ]; then
echo $TEMP >> $LOGF


sleep 1
if [ "$SPEED" != "" ]; then
echo "servers.$HOST1.atifanspeed $SPEED $DATU"|nc localhost 2003

if [ "$DEBUG" == "1" ]; then
echo $SPEED >> $LOGF


sleep 60;

To graph useful system resources (network bandwidth, cpu/mem-usage, disk space)

Would be good to install collectl and just export to graphite. But this does not work well currently because the version of collectl with Ubuntu 12.04 LTS is 3.6.0 (3.6.3 with 12.10).
3.6.1 is needed to make it work with graphite and 3.6.5 to make it work good if you want to group servers.

There are plenty of other options though. You can write some scripts yourself, use diamond or a few other tools that has graphite-support.

Diamond is another option, to install follow these two links https://github.com/BrightcoveOS/Diamond/wiki/Installation (only addition is first you have to clone the git repository, from in there you run make builddeb).

How to manually configure a custom collector: https://github.com/BrightcoveOS/Diamond/wiki/Configuration

Linux’s ctrl-alt-SysRq – Magic SysRq Key


Wow, awesome.

Looks like you can do lots of fun stuff here in case you get a stalled system.

Quite fun that this is a quite useful thing and I have never heard of this before. Maybe Linux community is being quiet about this because it’s close to ctrl-alt-del :)

mnemonic: BRUISER (REISUB)

unRaw      (take control of keyboard back from X),
 tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
 kIll      (send SIGKILL to all processes, forcing them to terminate immediately),
  Sync     (flush data to disk),
  Unmount  (remount all filesystems read-only),

openstack testing day

Only one day late!

I actually started installing this on the 8th but I forgot to install it to hdd so the ‘yum update’ failed and broke the machine with I/O errors :)

Installing it in a VMWare Workstation (fedora 64-bit type, 2, cores, 4G RAM, 20G disk).


Basic Setup


http://fedoraproject.org/wiki/QA:Testcase_install_OpenStack_packages – No problem.


http://fedoraproject.org/wiki/QA:Testcase_setup_OpenStack_Nova –

Says that if you are doing this in a VM you need to “configure nova to use qemu without KVM and hardware virtualization:”. This is not true, as VMWare Workstation 8 has virtualization pass-through.

[root@localhost mart]# vgcreate nova-volumes $(sudo losetup --show -f /var/lib/nova/nova-volumes.img)
  No physical volume label read from /dev/loop0
  Writing physical volume data to disk "/dev/loop0"
  Physical volume "/dev/loop0" successfully created
  Volume group "nova-volumes" successfully created

Gives this error, which already is reported:

Verified connectivity to MySQL.
Creating 'nova' database.
Asking openstack-nova to sync the databse.
2012-03-09 07:28:26 WARNING nova.utils [-] /usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/versions/075_convert_bw_usage_to_store_network_id.py:49: SADeprecationWarning: useexisting is deprecated.  Use extend_existing.

2012-03-09 07:28:28 WARNING nova.utils [-] /usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migrate_repo/versions/081_drop_instance_id_bw_cache.py:40: SADeprecationWarning: useexisting is deprecated.  Use extend_existing.



[root@localhost nova]# ADMIN_PASSWORD=$OS_PASSWORD openstack-keystone-sample-data
The default service password has been detected.  Please consider
setting an actual password in environment variable SERVICE_PASSWORD

But after that it generates users.


No problems, should ‘glance index’ return anything at this stage?


No problems.

6 Add SSH keypair

No problems, just do exactly what the instructions say (don’t try to be smart and put them in .sh files for example :P).

7 Register Guest Images

At this point the wiki went down :/

[root@localhost ~]# glance add name=f16 is_public=true disk_format=qcow2 container_format=ovf copy_from=http://berrange.fedorapeople.org/images/2012-02-29/f16-x86_64-openstack-sda.qcow2
Failed to add image. Got error:
Unexpected response: 500
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.

Yes, this is where it fall short. Manpage for clance doesn’t even have the ‘copy_from’. Maybe it could be downloaded? ‘glance index’ doesn’t work either.


[root@localhost ~]# glance index
Failed to show index. Got error:
Internal Server error: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 210, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 279, in __
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1086, in get_re
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1055, in call_a
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    valid = self._validate_claims(claims)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    return self._validate_claims(claims, False)
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
  File "/usr/lib/python2.7/site-packages/keystone/middleware/auth_token.py", lin
    return json.loads(data)["access"]["token"]["id"]
  File "/usr/lib64/python2.7/json/__init__.py", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

[root@localhost ~]# cd images/
[root@localhost images]# ls
aki-tty  ami-tty  ari-tty
[root@localhost images]# http://berrange.fedorapeople.org/images/2012-02-29/f16-                                                                                        x86_64-openstack-sda.qcow2^C
[root@localhost images]# glance add name=aki-tty is_public=true container_format                                                                                        =aki disk_format=aki < aki-tty/image
=================================================[100%] 7.79M/s, ETA  0h  0m  0s
=[  2%]                                                 1.25M/s, ETA  0h  0m  3s                                                                                        Failed to add image. Got error:
You are not authorized to complete this action.
Details: 401 Unauthorized

This server could not verify that you are authorized to access the document you                                                                                         requested. Either you supplied the wrong credentials (e.g., bad password), or yo                                                                                        ur browser does not understand how to supply the credentials required.

Note: Your image metadata may still be in the registry, but the image's status w                                                                                        =================================================[100%] 20.9M/s, ETA  0h  0m  0s
[root@localhost images]#


CentOS 5.8 Released

CentOS 5.8 was released today 8th of March.


You can download it from many mirrors, for example from FUNET: http://ftp.funet.fi/pub/Linux/INSTALL/Centos/

It installs just fine on an HP DL360 G7 with P410 and P411 controller.

CentOS has as far as I understand been slower at releasing updates than Scientific Linux (for example 6.2 was out 5 days earlier on SLC than on CentOS), this was not the case today though, SLC 5.8 is not available yet. Why?

Compare release dates here:



Tiny Core Linux


Micro Core Linux!

Like super small!

WOop woop…


Three versions:


Core (8MB) – CLI only

This literally boots in 3 seconds after pressing enter at the boot loader, nice!

To get root access hit: ‘sudo sh’.

Basically nothing is installed, but you can download whatever you need with ‘wget’. You’ll need to compile things from source as there’s no packet manager. Or, after trying out the other versions, there may be a packet manager hidden in there somewhere somehow.

Tiny Core

Tiny Core (12MB) – Good for new users and wired connections.

This one boots into a graphical interface with the mac-style bar at the bottom of the screen with icons that pop out. It also has an appbrowser.

Search for something (perhaps ‘seamonkey’) and press ‘go’. This starts to download things. Lots of things. But in the end it completes and it works.

The appbrowser is missing quite a lot, there’s no progress bar so you have no idea how much needs to be downloaded or how long an install might take. You can see in the ‘depends’ tab which the dependencies are and that might give you a clue.

openssl is not installed by default! This is quite a surprise, to me this is almost the basis of a linux-based distribution. But if you don’t need to connect to it remotely or connect from it to another host then I guess you don’t need it :)

irssi doesn’t work by default.

If the packet manager cannot handle installing irssi I call it a crappy distro.

Nuff is e’nuff.

Core Plus

Core Plus (64MB) – Extra nicestuff, good for beginners, wireless and non-US keyboards.

Wonder if irssi works here? – Not in the default terminal or Eterm no! Xchat works though it is full of shieeet.

core plus has a lot nicer boot manager, and it shows a lot more options, such as fluxbox.

Think about:

It takes a fair amount of time to install something (or, it feels longer because there’s no progress bar) if you run it off the livecd. So, if you decide to try another OS without installing apps on disk, be prepared to reinstall apps.

Dragonfly – Testing another OS



It’s based on … BSD! (FreeBSD 4.8 is apparently what dragonfly span off from)

What’s weird is that while VMWare Workstation scans the iso (to find which OS it is) it stops responding (other VMs are unaffected).
It finds FreeBSD 64-bit.

It has a ‘hammer’ filesystem.
Apparently this is unsupported for FS under 10GB and not recommended for under 50G and will apparently require a lot of things (period clean-up job) occasionally.

     HAMMER file systems are designed for large storage systems, up to 1
     Exabyte, and will not operate efficiently on small storage systems.  The
     minimum recommended file system size is 50GB.  HAMMER must reserve 500MB
     to 1GB of its storage for reblocking and UNDO/REDO.  In addition, HAMMER
     file systems operating normally, with full history retention and daily
     snapshots, do not immediately reclaim space when files are deleted.  A
     regular system maintenance job runs once a day by periodic(8) to handle


Nice and straight-forward console-based installation.

Quick and easy!


As it’s BSD, add the user to the ‘wheel’ group so that it can become super-user.

Guide to get sshd working (basically set PasswordAuthentication = yes). The guide mentions a lot of other things, but in 3.0.1 sshd is on by default and the keys have been generated.

Install  software

Edit /usr/pkg/etc/pkgin/repositories.conf and add the URL to a repository near you.

pkgin update

pkgin full-update

pkgin search packagename

pkgin install bash

This installs bash to /usr/pkg/bin/bash

It’s not enough to just edit /etc/passwd to get the new shell, you need to edit it via ‘chsh’.

To install screen you need to

ln -s /usr/lib/libcrypt.so.4 /usr/lib/libcrypt.so.3

or it will complain that libcrypt.so.3 doesn’t exist.

The HAMMER filesystem

All commands start with ‘hammer’. Like ‘hammer info’.



While looking at it from the above angle (quite distant) – this doesn’t appear to be very different from other bsd/unix/linux distributions, a bit different commands to do some things but that’s not so odd in itself.

Personally I like the name, maybe that’s enough to use it? =)