Ubuntu Trusty on the Elitebook EVO 850

After three years of hard work, it is time to retire my 8440p and let the family enjoy its availability. For my new workhorse, I have chosen the HP Elitebook EVO 850 that fit my budget and performance requirement.

TL;DR : The Elitebook EVO 850 basic functionalities work fine with Ubuntu 14.04.1

Before hosing the Windows 7 installation, I thought of testing the basic functionalities. So after booting Win7 I checked that most of the thing (sound, light, webcam, etc) did work as expected.

Never underestimate the power of the bug : if there is some hardware issue, then it is better to do a first diagnostic on Windows. The HP tech will love you for that (been there, done that). Otherwise, there will always be a doubt that Ubuntu is the culprit & they will not try to look any further.

After a successful Windows boot, I created a bootable USB stick with the latest Ubuntu release on it to verify that Ubuntu itself runs fine. No need to wipe out Windows and install Ubuntu on it only to find out that the hardware fails miserably. Here is the command I used to create the bootable USB stick, since the USB creator has been buggy for years on Ubuntu :

$ dd if=ubuntu-14.04.1-desktop-amd64.iso of=/dev/sdc bs=4M

One important note : this is a laptop that is factory installed with a secure boot configuration in the BIOS. I did not have to change anything to boot Ubuntu so you should not have to.

Since everything looked good, I went ahead & restarted the laptop & installed Ubuntu Trusty Tahr 14.04..1 on the laptop, using a full disk install with full disk encryption.  Installation was flawless and completed in less than five minutes, thanks to the 250Gb SSD drive !

Publié dans Non classé | Laisser un commentaire

remote kernel crash dump : More testing needed

A couple of weeks ago I announced that I was working on a new remote functionality for kdump-tools, the kernel crash dump tool used on Debian and Ubuntu.

I am now done with the development of the new functionality, so the package is ready for testing. If you are interested, just read the previous post which has all the gory details on how to set it up & test it.

Publié dans Technical, Ubuntu Server | Laisser un commentaire

remote kernel crash dump for Debian and Ubuntu

A few years ago, while I started to participate to the packaging of makedumpfile and kdump-tools for Debian and ubuntu. I am currently applying for the formal status of Debian Maintainer to continue that task.

For a while now, I have been noticing that our version of the kernel dump mechanism was lacking from a functionality that has been available on RHEL & SLES for a long time : remote kernel crash dumps. On those distribution, it is possible to define a remote server to be the receptacle of the kernel dumps of other systems. This can be useful for centralization or to capture dumps on systems with limited or no local disk space.

So I am proud to announce the first functional beta-release of kdump-tools with remote kernel crash dump functionality for Debian and Ubuntu !

For those of you eager to test or not interested in the details, you can find a packaged version of this work in a Personal Package Archive (PPA) here :

https://launchpad.net/~louis-bouchard/+archive/networked-kdump

New functionality : remote SSH and NFS

In the current version available in Debian and Ubuntu, the kernel crash dumps are stored on local filesystems. Starting with version 1.5.1, they are stored in a timestamped directory under /var/crash. The new functionality allow to either define a remote host accessible through SSH or an NFS mount point to be the receptacle for the kernel crash dumps.

A new section of the /etc/default/kdump-tools file has been added :

# ---------------------------------------------------------------------------
# Remote dump facilities:
# SSH - username and hostname of the remote server that will receive the dump
# and dmesg files.
# SSH_KEY - Full path of the ssh private key to be used to login to the remote
# server. use kdump-config propagate to send the public key to the
# remote server
# HOSTTAG - Select if hostname of IP address will be used as a prefix to the
# timestamped directory when sending files to the remote server.
# 'ip' is the default.
# NFS - Hostname and mount point of the NFS server configured to receive
# the crash dump. The syntax must be {HOSTNAME}:{MOUNTPOINT} 
# (e.g. remote:/var/crash)
#
# SSH="<user@server>"
#
# SSH_KEY="<path>"
#
# HOSTTAG="hostname|[ip]"
# 
# NFS="<nfs mount>"
#

The kdump-config command also gains a new option : propagate which is used to send a public ssh key to the remote server so passwordless ssh commands can be issued to the remote SSH host.

Those options and commands are nothing new : I simply based my work on existing functionality from RHEL & SLES. So if you are well acquainted with RHEL remote kernel crash dump mechanisms, you will not be lost on Debian and Ubuntu. So I want to thank those who built the functionality on those distributions; it was a great help in getting them ported to Debian.

Testing on Debian

First of all, you must enable the kernel crash dump mechanism at the kernel level. I will not go in details as it is slightly off topic but you should :

  1. Add crashkernel=128M to /etc/default/grub in GRUB_CMDLINE_LINUX_DEFAULT
  2. Run udpate-grub
  3. reboot

Install the beta packages

The package in the PPA can be installed on Debian with add-apt-repository. This command is in the software-properties-common package so you will have to install it first :

$ apt-get install software-properties-common
$ add-apt-repository ppa:louis-bouchard/networked-kdump

Since you are on Debian, the result of the last command will be wrong, as the serie defined in the PPA is for Utopic. Just use the following command to fix that :

$ sed -i -e 's/sid/utopic/g' /etc/apt/sources.list.d/louis-bouchard-networked-kdump-sid.list 
$ apt-get update
$ apt-get install kdump-tools makedumpfile

Configure kdump-tools for remote SSH capture

Edit the file /etc/default/kdump-tools and enable the kdump mechanism by setting USE_KDUMP to 1 . Then set the SSH variable to the remote hostname & credentials that you want to use to send the kernel crash dump. Here is an example :

USE_KDUMP=1
...
SSH="ubuntu@TrustyS-netcrash"

You will need to propagate the ssh key to the remote SSH host, so make sure that you have the password of the remote server’s user you defined (ubuntu in my case) for this command :

root@sid:~# kdump-config propagate
Need to generate a new ssh key...
The authenticity of host 'trustys-netcrash (192.168.122.70)' can't be established.
ECDSA key fingerprint is 04:eb:54:de:20:7f:e4:6a:cc:66:77:d0:7c:3b:90:7c.
Are you sure you want to continue connecting (yes/no)? yes
ubuntu@trustys-netcrash's password: 
propagated ssh key /root/.ssh/kdump_id_rsa to server ubuntu@TrustyS-netcrash

If you have an existing ssh key that you want to use, you can use the SSH_KEY option to point to your own key in /etc/default/kdump-tools :

SSH_KEY="/root/.ssh/mykey_id_rsa"

Then run the propagate command as previously :

root@sid:~/.ssh# kdump-config propagate
Using existing key /root/.ssh/mykey_id_rsa
ubuntu@trustys-netcrash's password: 
propagated ssh key /root/.ssh/mykey_id_rsa to server ubuntu@TrustyS-netcrash

It is a safe practice to verify that the remote SSH host can be accessed without password. You can use the following command to test (with your own remote server as defined in the SSH variable in /etc/default/kdump-tools) :

root@sid:~/.ssh# ssh -i /root/.ssh/mykey_id_rsa ubuntu@TrustyS-netcrash pwd
/home/ubuntu

If the passwordless connection can be achieved, then everything should be all set. You can proceed with a real crash dump test if your setup allows for it (not a production environment for instance).

Configure kdump-tools for remote NFS capture

Edit the /etc/default/kdump-tools file and set the NFS variable with the NFS mount point that will be used to transfer the crash dump :

NFS="TrustyS-netcrash:/var/crash"

The format needs to be the syntax that normally would be used to mount the NFS filesystem. You should test that your NFS filesystem is indeed accessible by mounting it manually :

root@sid:~/.ssh# mount -t nfs TrustyS-netcrash:/var/crash /mnt
root@sid:~/.ssh# df /mnt
Filesystem 1K-blocks Used Available Use% Mounted on
TrustyS-netcrash:/var/crash 6815488 1167360 5278848 19% /mnt
root@sid:~/.ssh# umount /mnt

Once you are sure that your NFS setup is correct, then you can proceed with a real crash dump test.

Testing on Ubuntu

As you would expect, setting things on Ubuntu is quite similar to Debian.

Install the beta packages

The package in the PPA can be installed on Debian with add-apt-repository. This command is in the software-properties-common package so you will have to install it first :

$ sudo add-apt-repository ppa:louis-bouchard/networked-kdump

Packages are available for Trusty and Utopic.

$ sudo apt-get update
$ sudo apt-get -y install linux-crashdump

Configure kdump-tools for remote SSH capture

Edit the file /etc/default/kdump-tools and enable the kdump mechanism by setting USE_KDUMP to 1 . Then set the SSH variable to the remote hostname & credentials that you want to use to send the kernel crash dump. Here is an example :

USE_KDUMP=1
...
SSH="ubuntu@TrustyS-netcrash"

You will need to propagate the ssh key to the remote SSH host, so make sure that you have the password of the remote server’s user you defined (ubuntu in my case) for this command :

ubuntu@TrustyS-testdump:~$ sudo kdump-config propagate
[sudo] password for ubuntu: 
Need to generate a new ssh key...
The authenticity of host 'trustys-netcrash (192.168.122.70)' can't be established.
ECDSA key fingerprint is 04:eb:54:de:20:7f:e4:6a:cc:66:77:d0:7c:3b:90:7c.
Are you sure you want to continue connecting (yes/no)? yes
ubuntu@trustys-netcrash's password: 
propagated ssh key /root/.ssh/kdump_id_rsa to server ubuntu@TrustyS-netcrash
ubuntu@TrustyS-testdump:~$
If you have an existing ssh key that you want to use, you can use the SSH_KEY option to point to your own key in /etc/default/kdump-tools :
SSH_KEY="/root/.ssh/mykey_id_rsa"

Then run the propagate command as previously :

ubuntu@TrustyS-testdump:~$ kdump-config propagate
Using existing key /root/.ssh/mykey_id_rsa
ubuntu@trustys-netcrash's password: 
propagated ssh key /root/.ssh/mykey_id_rsa to server ubuntu@TrustyS-netcrash

It is a safe practice to verify that the remote SSH host can be accessed without password. You can use the following command to test (with your own remote server as defined in the SSH variable in /etc/default/kdump-tools) :

ubuntu@TrustyS-testdump:~$sudo ssh -i /root/.ssh/mykey_id_rsa ubuntu@TrustyS-netcrash pwd
/home/ubuntu

If the passwordless connection can be achieved, then everything should be all set.

Configure kdump-tools for remote NFS capture

Edit the /etc/default/kdump-tools file and set the NFS variable with the NFS mount point that will be used to transfer the crash dump :

NFS="TrustyS-netcrash:/var/crash"

The format needs to be the syntax that normally would be used to mount the NFS filesystem. You should test that your NFS filesystem is indeed accessible by mounting it manually (you might need to install the nfs-common package) :

ubuntu@TrustyS-testdump:~$ sudo mount -t nfs TrustyS-netcrash:/var/crash /mnt 
ubuntu@TrustyS-testdump:~$ df /mnt
Filesystem 1K-blocks Used Available Use% Mounted on
TrustyS-netcrash:/var/crash 6815488 1167488 5278720 19% /mnt
ubuntu@TrustyS-testdump:~$ sudo umount /mnt

Once you are sure that your NFS setup is correct, then you can proceed with a real crash dump test.

 Miscellaneous commands and options

A few other things are under the control of the administrator

The HOSTTAG modifier

When sending the kernel crash dump, kdump-config will use the IP address of the server to as a prefix to the timestamped directory on the remote host. You can use the HOSTTAG variable to change that default. Simply define in /etc/default/kdump-tools :

HOSTTAG="hostname"

The hostname of the server will be used as a prefix instead of the IP address.

Currently, this is only implemented for the SSH method, but it will be available for NFS as well in the final version.

kdump-config show

To verify the configuration that you have defined in /etc/default/kdump-tools, you can use kdump-config’s show command to review your options.

ubuntu@TrustyS-testdump:~$ sudo kdump-config show
USE_KDUMP: 1
KDUMP_SYSCTL: kernel.panic_on_oops=1
KDUMP_COREDIR: /var/crash
crashkernel addr: 0x2d000000
SSH: ubuntu@TrustyS-netcrash
SSH_KEY: /root/.ssh/kdump_id_rsa
HOSTTAG: ip
current state: ready to kdump
kexec command:
 /sbin/kexec -p --command-line="BOOT_IMAGE=/vmlinuz-3.13.0-24-generic root=/dev/mapper/TrustyS--vg-root ro console=ttyS0,115200 irqpoll maxcpus=1 nousb" --initrd=/boot/initrd.img-3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic

If the remote crash kernel dump functionality is setup, you will see the options listed in the output of the commands.

Conclusion

As outlined at the beginning, this is the first functional beta version of the code. If you are curious, you can find the code I am working on here :

http://anonscm.debian.org/gitweb/?p=collab-maint/makedumpfile.git;a=shortlog;h=refs/heads/networked_kdump_beta1

Don’t hesitate to test & let me know if you find issues

Publié dans Canonical, Technical, Ubuntu Server | Laisser un commentaire

Juju, maas and agent-name

While working on a procedure with colleagues, I ran into an issue that I prefer to document somewhere. Since my blog has been sleeping for close to a year, I thought I’d put it here.

I was running a set of tests on a version of juju that will resemble 1.16.4. This version, as each one after 1.16.2 implement the agent-name identifier that is, as I understand it, used to discriminate between multiple bootstrapped environments.

I had a bootstrapped environment on a maas 1.4 server (1.4+bzr1693+dfsg-0ubuntu2~ctools0) with a few services running on two machines. Many hours of testing led us to identify that even though juju was using agent-name, it appeared that maas was not.

After upgrading to the latest and greatest version of maas (1.4+bzr1693+dfsg-0ubuntu2.2~ctools0), I ran a « juju status » and to my dismay I got this :

$ juju status

Please check your credentials or use ‘juju bootstrap’ to create a new environment.

Error details:

no instances found

Using –show log to get a bit more information gave me the following :

$ juju status –show-log

2013-11-28 15:33:05 ERROR juju supercommand.go:282 Unable to connect to environment « maas14″.

Please check your credentials or use ‘juju bootstrap’ to create a new environment.

 

Error details:

no instances found

Going to the maas server to look at a few log, I found that juju was indeed sending the agent-name to maas :

GET /MAAS/api/1.0/files/97fbdbaa-c727-4f19-8710-dbc6d361e8db-provider-state/ HTTP/1.1″ 200 516 « - » « Go 1.1 package http »

192.168.124.1 – - [28/Nov/2013:16:33:32 +0100] « GET /MAAS/api/1.0/nodes/?agent_name=97fbdbaa-c727-4f19-8710-dbc6d361e8db&id=node-17ad8da0-5361-11e3-bd0a-525400fd96d7&op=list HTTP/1.1″ 200 203 « - » « Go 1.1 package http »

Well, it turns out that after the upgrade of the maas packages, maas will start to honour the agent-name, but since the instances were created without any agent-name, it was no longer able to provide the information.

Raphael Badin who works on the maas team suggested to use the following maas shell commands to fix things up :

$ sudo maas shell

>>> from maasserver.models import Node
>>> # This assumes one wants to update *all* the nodes present in this MAAS.
>>> Node.objects.all().update(agent_name="AGENT_NAME_FROM_JUJU")

Be very careful with such a command if your maas environment is in production as this will change all the nodes present in MAAS.

Publié dans Technical | Laisser un commentaire

Planes, Trains & Automobiles

Ok, the title shows my age. But a facebook post from a colleague (oh, yeah, who happens to be my boss), writing his thoughts on a train to Québec city made me think of my own experience of today, sitting in a plane for 8 hours on my way to Montréal.

Not because we were late leaving by one hour, wait that was only enlightened by the pilot’s humour in describing in almost real time the reasons for us being late (mixup in the baggage loading, then nobody to remove the boarding gate, then the guy who’s supposed to move the plane out of the  boarding area just left without notice). But because this plane was taking me from he country I elected to live from the country were I was born, the city where I spent some of my best time.

Flying for me is rarely a burden, once I’m in the plane.  Actually, once I’ve cleared security and am waiting to board.  Then the calm reaches me; all I need to do is sit and be taken care of. Even when, while watching the beginning of « The Fight Club » on the onboard video system, I watch an « in flight collision », three days after dreaming of experiencing an airline crash on take off.  I am not a frequent flyer by any measure, but air travelling is not a problem for me.

But every now and then, I get to fly back home from home.  I get to return to Montréal, Québec, from Le Chesnay France.  This does often put me in curious positions. Like an hour ago when, in the hotel’s elevator, I meet two people from France. I recognise the accent, then automatically switch to my « France » accent and behave just like any other person from France visiting.  But earlier, coming back from the airport, I talked to the taxi driver as any other quebéquois would have done.  I do like this situation. Makes me think that I have taken out the best of both worlds. I also remember this big map of France that I put up on my appartment wall, back when going to France was not even a possibility yet.  Back then it was a wish.

It also take me away from my family, my two beloved daughter and Nathalie, the woman I love. And bring me back to my family, my two other brothers and my parents who still live here.  Even though I am briefly far away from the family I have participated to build, I am also briefly closer to the family who saw me grow up.  Airplanes get me to go from one to another in only a few hours.

Automobiles will not see me much here. This may be a proof that I am only a visitor here nowadays.  I used to drive the streets of Montréal daily, without hesitation, knowing where to go.  I have this feeling driving in the Paris area nowadays.  I’m much more familiar with Versailles and Paris than I would be in Laval or the east end of Montréal.  But if I was to come back here, it would all come back very quickly.

Planes, trains & Automobiles take us to our lives at the speed at which they evolve, or at the distances where they happen.

Publié dans Non classé | Un commentaire

Installing Ubuntu Quantal with Full disk encryption

For historical reasons, I have been installing my Ubuntu laptop on a fully encrypted disk for years.  Up until now, I needed to use the alternate CD since this was the only possibility to install with full disk encryption.

This is no longer the case.  If you want to use full disk encryption with Quantal Quetzal, you can use the standard installation CD and will be presented with the following options :

You can then select the « Encrypt the new Ubuntu installation for security » option to request full disk encryption. Alternatively, you can elect to use LVM as I did, but this is not a requirement in order to get full disk encryption.

Kudos to the Ubuntu development team for making this option so simple now !

Publié dans Technical, Ubuntu Desktop | Laisser un commentaire

Lucid panics after 208 days ? Don’t get biten by that

If you are part of those people who are reluctant to upgrade to newer kernels, here is an example of how this can make your life miserable every 209 days.

There is a specific kernel bug in Lucid that will provoke a kernel panic after 208 days, which is regular behavior on a server (and a cloud instance ?). Here is the kernel GIT commit related to this :

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-lucid.git;a=commit;h=595378ac1dd449e5c379bf6caa9cdfab008974c8

This has been fixed in the ubuntu kernel since 2.6.32-38 months ago but if you prefer not to upgrade to earlier kernels on Lucid, you will be hit by this bug.

Publié dans Ubuntu Server | Laisser un commentaire

Amazon Music Store’s MP3 on Precise

One nice thing about Banshee was the seemless integration of the Amazon MP3 store. Since I reinstalled my laptop on Precise, I know have Rhythmbox instead of Banshee which does not seems to offer the same kind of integration.

Luckily for me, I found a nice little hack that will help me get my favorite non-DRMed MP3 files on Ubuntu :

http://ubuntuforums.org/showthread.php?t=1955149

In short, install clamz that will allow you to read & download the .amz files that the Amazon music store sends when you buy music. 

Hope this helps

Publié dans Ubuntu Desktop | Laisser un commentaire

One year at Canonical

One year ago, I had done my last day after thirteen years with Digital Equipment Corp which became Compaq, then HP.  After starting on Digital Unix/Tru64, I had evolved to a second level support position in the Linux Global Competency Center.

In a few days, on the 18th, I will have completed my first full year as a Canonical employee. I think it is time to take a few minutes to look back at that year.

Coming from a RHEL/SLES environment with a bit of Debian, my main asset was the fact that I  had been an Ubuntu user since 5.04, using it as my sole operating system on my corporate laptop. The first week in the new job was also a peculiar experience, as it brought me back to my native country and to Montréal, a city that I love and where I lived for three years.  So I was not totally lost in my new environment. I also had the chance of ramping up my knowledge of Ubuntu Server, which was an easy task.  What was more surprizing and became one of the most exciting part of the new job is to work in a completely dedicated opensource environment from day one.

Rapidly I became aware of the fact that, participating in the Ubuntu community was not only possible, but it was expected.  That if I were to find a bug, I needed to report it and, if possible find ways to fix it.  In my previous job I was looking for existing solutions, or bringing in enough elements to my L3 counterpart that they would be able to request a fix to Red Hat or Novell.  Here if I was able to identify the problem and suggest a solution, I was encouraged to propose it as the final fix.  I also rapidly found out that the developpers were no longer the remote engineers in some changelog file, but IRC nicks that I could chat with and eventually meet.

Then came about Openstack in the summer : a full week of work with colleagues aimed at getting to know the technology, trying to master concepts that were very vague back then and making things work.  Getting Swift Object Store up and running and trying to figure out how best this could be used.  Here I was asked to do one of the think I like best : learning by getting things to work. This lead to a better understanding of what a cloud architecture was all about and really made me understand how useful and interesting a cloud infrastructure can be. Oh, and I did get to build my first openstack cloud.

This was another of this past year’s great experience : UDS-P. I had heard of UDS-O when I joined but it was too early for me to attend.  But after six months around it was time for UDS-P and, this time, I would be there.  Not only I had time to meet a good chunk of developpers, but I also got a lot of work done.  Like helping Michael Terry fix a bug on Deja-Dup that would only appear on localized systems, get advices on fixing kdump with the kernel team and some of the foundation engineers and a whole lot more.

Then came back the normal work for our customers, fixing their issues, trying to help improve their support experience and get better at what we do. And also seeing some of my fixes make it into our upcoming distribution and also back to the existing ones.  This was a great thrill and an objective that I did not think would come by so fast.

Being part of the Ubuntu community has been a great addition to my career. This makes me want to do even more and get the best out of our collective efforts.

This was a great year. Sure hope that the next one will be even better.

Publié dans Canonical, Ubuntu Desktop, Ubuntu Server | Un commentaire

Customer support the Ubuntu way

Recently, I have realized a major difference in how customer support is done on Ubuntu.

As you know, Canonical provides official customer support for Ubuntu both on server and desktop. This is the work I do : provice customer with the best level of support on the Ubuntu distribution.  This is also what I was doing on my previous job, but for the Red Hat Enterprise Linux and SuSE Linux Enterprise Server distributions.

The major difference that I recently realized is that, unlike my previous work with RHEL & SLES, the result of my work is now available to the whole Ubuntu community, not just to the customers that may for our support.

Here is an example. Recently one of our customer identified a bug with vm-builder in a very specific case.  The work that I did on this bug resulted in a patch that I submitted to the developers who accepted its inclusion in the code. In my previous life, this fix would have been made available only to customers paying a subscription to the vendors through their official update or service pack services.

With Ubuntu, through Launchpad and the regular community activity, this fix will become available to the whole community through the standard -updates channel of our public archives.

This is true for the vast majority of the fixes that are provided to our customers. As a matter of fact, the public archives are almost the only channel that we have to provide fixes to our customers, hence making them available to the whole Ubuntu community at the same time.  This is different behavior and something that makes me a bit prouder of the work I’m doing.

Publié dans Canonical, Industry, Technical, Ubuntu Desktop, Ubuntu Server | 4 commentaires