Perusal, Synthesis, Bliss

April 22, 2014: installing Ubuntu 14.04 Long Term Support with KDE on LDLC computer Saturne SG4-I3-8-S9H7

Installing Ubuntu 14.04 while keeping some of the volumes inside my encrypted volume groups

The goal is to install the new Ubuntu version while keeping all my permanent partitions: /home on a 1To HDD, and /home/local, /usr/local that are located on a 90Go SSD. The partitions swap, /, and /boot are to be formated. Only /boot is not encrypted.
The text installer of Ubuntu is no more available, because it was in the “alternate” version of Ubuntu that disappeared in version 12.10. This text-installer is in fact originally a Debian software, named debian-installer (here). For the 13.04 version, I installed Lubuntu 13.04, which is to the best of my knowledge the only Ubuntu variant to have kept an alternate version of Ubuntu with debian-installer. But at this time I tried also Kubuntu 13.04 and Ubuntu 13.04, using the graphical installer named “ubiquity”, this one having a gtk+ frontend in the case of Ubuntu, and a Qt frontend in Kubuntu. I took into account the tip given here:
The desktop image installer cannot unlock existing encrypted (LUKS) volumes. If you need to make use of existing encrypted volumes during partitioning, then use the "Try Ubuntu without installing" boot option to start a live session, open the encrypted volumes (for example, by clicking on their icons in the Unity launcher), enter your password when prompted to unlock them, close [i.e. unmount them, e.g. on command line] them again, and run ubiquity to start the installer. (1066480)
But the two versions were not strictly equivalent, because using this trick the Ubuntu version allowed me to install Ubuntu on the partitions while keeping my personal partitions, contrary to the KDE version that segfaulted.
I have tried again in 14.04, and obtained almost the same result: no segfault in the KDE version this time, but an error when clicking on “Install Now” just after having specified the partitioning:
On the contrary, the version of the ubiquity installer proposed in Unity allows to install 14.04 without problem (using exactly the same partitioning as above). However, even if the installation on the hard drives is successful the fact that my volume groups are encrypted is not managed properly by ubiquity: after a reboot, Linux fall back to the busybox console that allows to act manually on hard drives. This means that with busybox, all encrypted volumes have to be mounted manually, and I don’t want to bother with that.
A simpler way than struggling with busybox is to follow more or less the procedure now a bit outdated described in the HOWTO of John Wiersba located here. The idea is to boot a live Linux distribution and “rescue” the Ubuntu 14.04 system just installed on the hard drives. For that, I have used the text installer (i.e. debian-installer) of Lubuntu 13.04, which is available on my usb key where I have installed multisystem. But it has to be run in “rescue mode”, i.e. the “rescue a broken system” mentioned in the HOWTO, no more available directly in Lubuntu. A workaround is to edit the grub menu proposed by multisystem, modifying the line corresponding to Lubuntu 13.04 by typing “e”. This yields a basic editor with the text corresponding to the boot options:
linux /ubuntu2/install/vmlinuz root=UUID=8B31-F530 file=/cdrom/preseed/lubuntu.seed cdrom-detect/try-usb=true quiet --
initrd /ubuntu2/install/initrd.gz
Just add “rescue/enable=true” before “--”:
linux /ubuntu2/install/vmlinuz root=UUID=8B31-F530 file=/cdrom/preseed/lubuntu.seed cdrom-detect/try-usb=true quiet rescue/enable=true --
initrd /ubuntu2/install/initrd.gz
And type F10 to boot with these options. Debian-installer then runs, with the words “rescue mode” on the top left of the screen. In this mode, it scans the disk to detect encrypted volumes, and asks for passwords to mount them, as the Opensuse Yast partitioning tool does. After that, you can follow the HOWTO mentioned above: execute a shell in the logical volume corresponding to / (“vg-lv_root” in my case) and put a suitable /etc/crypttab file (which you may have saved before anything). Then, type
$ update-initramfs -k all -c -v
In addition to the procedure indicated by John, I had to change a line in /etc/fstab, namely to replace
/dev/mapper/luks-3d134da2-[...]351b /home ext4 defaults 0 2
/dev/mapper/sdb1_crypt /home ext4 defaults 0 2
Indeed there is no such block peripheral on my machine:
$ ls /dev/mapper
control  sda5_crypt  sdb1_crypt  vg-lv_homelocal  vg-lv_root  vg-lv_swap  vg-vg_usrlocal


During my struggle to have a correct installation, I installed Opensuse 13.1 from the KDE live CD to check that all my partitions were ok. It has not destroyed the KDE settings I had in Kubuntu, but it is not so fine:
I also tried to install Lubuntu 14.04 and Lubuntu 13.10: contrary to the 13.04 version, the text installer gives an error just after having specified the partitions. I did not manage to solve the problem, and then switch to the solution described above consisting in installing Ubuntu 14.04 with the Unity version of ubiquity. Consequently, I will only keep the 13.04 version of the USB key, mainly to be able to rescue my system as indicated above (instead of using busybox).

Installation of KDE

Once logged in Unity, just install the KDE packages with:
$ apt-get install kubuntu-full

New index and search engine: lack of scalability?

In KDE 4.13, the Nepomuk file indexer is replaced by Baloo. The reason is given here, here, and here. Compared to Nepomuk, one RDF database has been replaced by several SQLite databases. As nepomuk is no more used, I have removed the directory ~/.kde/share/apps/nepomuk that contained 2.1Go of data. I may check in the future that it is not created again.
If needed, the best way to deactivate Baloo is given on the author’s blog (see the previous link): put /home in the list of the excluded directories. But my initial idea was to let Baloo run, giving a chance to this system in which his author seems to believe firmly. After all, Google (or other indexing tools) are our best friends day after day.
But Baloo seems to lack of scalability: I have a *lot* of PDFs and DJVUs files on my machine (say, 50 Go), Baloo has indexed for more than 24 hours, slowing down my computer a lot because of high hard disk usage (contrary for example to my backups with “rdiff-backup”, perhaps because I take care to run it with “nice -n 19”), and it is still not finished:
$ cd ~/.local/share/baloo
$ du
6.4G    ./file
104K    ./emailContacts
168K    ./contacts
512K    ./email
20K     ./notes
6.4G    .
$ ps aux|grep baloo
jscordia 12180  0.3  0.3 548916 31728 ?        SNl  09:32   2:44 /usr/bin/baloo_file
jscordia 16361  0.0  0.2 360236 21480 ?        SN   09:34   0:02 /usr/bin/akonadi_baloo_indexer --identifier akonadi_baloo_indexer
jscordia  9894  4.0  0.4 398832 36632 ?        DN   22:43   0:03 /usr/bin/baloo_file_extractor 184148 184147 184146 184144 184143 184142 184141 184140 184138 184137 184136 18413
Moreover, after 24 hours, my hard disk is involved a lot, but the database does increase very slowly in size compared to the beginning: the Baloo directory seems to be stalled at 6.4 Go. At some time, it even asked for the root password because the “file number limit” or something like that had been reached.
As I have several things to do urgently on my computer, I cannot afford this performance decrease any longer. Thus I use the technique given by the author of putting /home in the excluded directories. Just after having clicked on “apply”, a process “/usr/bin/baloo_file_cleaner” appears:
$ ps aux|grep baloo
jscordia  6556  0.0  0.3 337740 28184 ?        SN   11:15   0:00 /usr/bin/akonadi_baloo_indexer --identifier akonadi_baloo_indexer
jscordia 31641  1.8  0.5 271116 44156 ?        RN   13:52   0:01 /usr/bin/baloo_file_cleaner
After three or four hours, the size of the baloo directory has still increased!
$ du
6.5G    ./file
104K    ./emailContacts
168K    ./contacts
512K    ./email
20K     ./notes
6.5G    .
and baloo_file_cleaner is still using the hard disk extensively:
$ ps aux|grep baloo
jscordia  6556  0.0  0.3 337740 28184 ?        SN   11:15   0:00 /usr/bin/akonadi_baloo_indexer --identifier akonadi_baloo_indexer
jscordia 31641  0.9  0.3 254464 27564 ?        DN   13:52   2:28 /usr/bin/baloo_file_cleaner
So I decide to reboot to stop the process (rather than killing baloo). As I have put /home in the list of directories to be ignored, I expect baloo to remain idle after the restart is complete; and indeed this happens as expected.
Before deactivating Baloo, I have tested a bit, and the first results were rather fine. There is a command line search tool, although very basic here:

Now, the usual way to search in files is using Dolphin:
Note that Baloo is a different piece of code than Akonadi (see here and here):
The Akonadi framework is responsible for providing applications with a centralized database to store, index and retrieve the user’s personal information. This includes the user’s emails, contacts, calendars, events, journals, alarms, notes, etc. In SC 4.4, KAddressBook became the first application to start using the Akonadi framework. In SC 4.7, KMail, KOrganizer, KJots, etc. were updated to use Akonadi as well. In addition, several Plasma widgets also use Akonadi to store and retrieve calendar events, notes, etc.

Non-free formats and software

Medibuntu has been discontinued: see here, here, here, here. The announce of Gauvain Pocentek is here:
The project is not really needed nowadays, except for one package: libdvdcss. This package is now maintained by Jonathan Riddell at Blue Systems. It is available in a repository hosted by VideoLAN.
Indeed, Jonathan Riddell of Blue Systems has concluded that only libdvdcss is needed here. So, if true, this means that the package “non-free-codecs” that was available in Medibuntu, which contained a lot of various codecs, is now replaced by other packages (free alternatives?) in Ubuntu repositories. I find it hard to believe, but maybe many of these codecs are no more used today. As usual, I will see in time when “shit happens”. Concerning libdvdcss, it is easily installed with
$ sudo /usr/share/doc/libdvdread4/
Now, Adobe Flash or an equivalent is already available on my fresh installation. I think this is because I tick a checkbox saying something as “Install software with copyright issue (mp3, etc.)” in the first screen proposed by the Ubiquity installer in the live version of Unity 14.04. I have also followed the instruction given here and installed the package “kubuntu-restricted-extras”.

Muon and package management

A new software has appeared, “muon-discover”. It does not allow to list all installed or available packages, but only a bunch of selected softwares. Consequently, I have installed manually muon:
$ wajig install muon

Simple screen locker wallpaper configuration

There is no possibility to change it at current time, but there are manual workarounds (I have not tried myself). See bug report here and here.

Integrated graphic card

The graphic card works correctly out of the box: the LED on the laptop panel shows that by default the GPU integrated to the Intel processor is used, not the NVidia GEForce GT650M. Some tests presented below show that we have performance similar to Kubuntu 13.04 when it comes to the integrated GPU: so no need to install Bumblebee as in the previous Kubuntu releases, nor to install the NVidia drivers: this is enough for the time being.
$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
305 frames in 5.0 seconds = 60.944 FPS
300 frames in 5.0 seconds = 59.824 FPS
glxspheres is not available. Before it was available in the mesa-utils package (see here). The score obtained with glmark2 is similar to the one obtained in 13.03 with the integrated GPU:
$ glmark2
    glmark2 2012.08
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) Ivybridge Mobile 
    GL_VERSION:    3.0 Mesa 10.1.0
[build] use-vbo=false: FPS: 1657 FrameTime: 0.604 ms
[build] use-vbo=true: FPS: 1994 FrameTime: 0.502 ms
[texture] texture-filter=nearest: FPS: 2850 FrameTime: 0.351 ms
[texture] texture-filter=linear: FPS: 2882 FrameTime: 0.347 ms
[texture] texture-filter=mipmap: FPS: 2946 FrameTime: 0.339 ms
[shading] shading=gouraud: FPS: 1588 FrameTime: 0.630 ms
[shading] shading=blinn-phong-inf: FPS: 1547 FrameTime: 0.646 ms
[shading] shading=phong: FPS: 1570 FrameTime: 0.637 ms
[bump] bump-render=high-poly: FPS: 698 FrameTime: 1.433 ms
[bump] bump-render=normals: FPS: 2704 FrameTime: 0.370 ms
[bump] bump-render=height: FPS: 2565 FrameTime: 0.390 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1737 FrameTime: 0.576 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 709 FrameTime: 1.410 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1901 FrameTime: 0.526 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 535 FrameTime: 1.869 ms
[desktop] effect=shadow:windows=4: FPS: 871 FrameTime: 1.148 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 513 FrameTime: 1.949 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 532 FrameTime: 1.880 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 543 FrameTime: 1.842 ms
[ideas] speed=duration: FPS: 1145 FrameTime: 0.873 ms
[jellyfish] <default>: FPS: 1139 FrameTime: 0.878 ms
[terrain] <default>: FPS: 132 FrameTime: 7.576 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 2186 FrameTime: 0.457 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 2470 FrameTime: 0.405 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 2188 FrameTime: 0.457 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 2433 FrameTime: 0.411 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 2212 FrameTime: 0.452 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 2323 FrameTime: 0.430 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 2124 FrameTime: 0.471 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 2481 FrameTime: 0.403 ms
                                  glmark2 Score: 1705 
The qtdemo executable is no more available (see the bug report here). A fallback is to use qtcreator where many (all?) demos provided before in qtdemo are available, but have to be compiled before being run.

Scanner and printer Canon MF4330d

I have updated the Canon drivers for Cups: from 2.50, I switched to the 2.80 version, which can be downloaded here as a tar.gz archive. In the directory Linux_UFRII_PrinterDriver_V280_uk_EN/64-bit_Driver/Debian of this archive, there are two 64 bits .deb packages:
Contrary to the previous versions where the .deb (made with the alien utility from .rpm packages) installed files in /usr/lib64 (here and here), these ones only use the /usr/lib directory. So we can install them without more work:
$ apt-get install cndrvcups-common_2.80-1_amd64.deb cndrvcups-ufr2-uk_2.80-1_amd64.deb
Now, when trying to add a printer via the KDE dialog, two items appear in the list of printers. Only the second one allows to click on “next”:
On the contrary, when adding the printer through the Cups web interface at here, the “CNUSB” possibility can be chosen:
In fact, it has to be chosen for some reason unknown to me, as explained here for Ubuntu 12.04. This means that the KDE dialog cannot be used to add the Canon MF4330d. This is not enough: this last page also asks to install the package libxml2:i386, and indeed it is needed to make it work, otherwise we get the following line in /var/log/cups/error_log:
$ cat /var/log/cups/error_log
D [26/Apr/2014:19:18:08 +0200] [Job 31] PID 12234 (/usr/lib/cups/filter/pstoufr2cpca) crashed on signal 11.
Anyway, no obvious problem is seen with ldd: without the package libxml2:i386, we obtain
$ ldd /usr/lib/cups/filter/pstoufr2cpca =>  (0x00007fff9f7fe000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc094daa000) => /lib/x86_64-linux-gnu/ (0x00007fc0949e4000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc09479d000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc0944df000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc0942d3000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc0940c1000) => /lib/x86_64-linux-gnu/ (0x00007fc093ea3000) => /lib/x86_64-linux-gnu/ (0x00007fc093c8a000) => /lib/x86_64-linux-gnu/ (0x00007fc093983000)
        /lib64/ (0x00007fc095054000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc0936b8000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc093489000) => /lib/x86_64-linux-gnu/ (0x00007fc093284000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc093079000) => /lib/x86_64-linux-gnu/ (0x00007fc092dfa000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc092be5000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc0929a3000) => /lib/x86_64-linux-gnu/ (0x00007fc09275e000) => /lib/x86_64-linux-gnu/ (0x00007fc092559000) => /lib/x86_64-linux-gnu/ (0x00007fc092355000) => /lib/x86_64-linux-gnu/ (0x00007fc09213a000) => /lib/x86_64-linux-gnu/ (0x00007fc091f34000) => /usr/lib/x86_64-linux-gnu/ (0x00007fc091d2c000) => /lib/x86_64-linux-gnu/ (0x00007fc091b23000)
$ wajig install libxml2:i386
$ ldd /usr/lib/cups/filter/pstoufr2cpca =>  (0x00007fff439fe000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391bbe4000) => /lib/x86_64-linux-gnu/ (0x00007f391b81e000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391b5d7000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391b319000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391b10d000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391aefb000) => /lib/x86_64-linux-gnu/ (0x00007f391acdd000) => /lib/x86_64-linux-gnu/ (0x00007f391aac4000) => /lib/x86_64-linux-gnu/ (0x00007f391a7bd000)
        /lib64/ (0x00007f391be8e000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391a4f2000) => /usr/lib/x86_64-linux-gnu/ (0x00007f391a2c3000) => /lib/x86_64-linux-gnu/ (0x00007f391a0be000) => /usr/lib/x86_64-linux-gnu/ (0x00007f3919eb3000) => /lib/x86_64-linux-gnu/ (0x00007f3919c34000) => /usr/lib/x86_64-linux-gnu/ (0x00007f3919a1f000) => /usr/lib/x86_64-linux-gnu/ (0x00007f39197dd000) => /lib/x86_64-linux-gnu/ (0x00007f3919598000) => /lib/x86_64-linux-gnu/ (0x00007f3919393000) => /lib/x86_64-linux-gnu/ (0x00007f391918f000) => /lib/x86_64-linux-gnu/ (0x00007f3918f74000) => /lib/x86_64-linux-gnu/ (0x00007f3918d6e000) => /usr/lib/x86_64-linux-gnu/ (0x00007f3918b66000) => /lib/x86_64-linux-gnu/ (0x00007f391895d000)
I did not encounter the problem in the previous versions because I used to install the metapackage ia32-libs, which has recently disappeared.