# May 01, 2013: installing (K)Ubuntu 13.04 on LDLC computer Saturne SG4-I3-8-S9H7

## Resizing the logical volumes / and /home/local

I have three partitions on two drives in my computer:
• a non-encrypted partition for /boot on an SSD;
• another encrypted partition on this SSD; it contains several logical volumes for /, swap, /usr/local, /home/local (separated from /home to benefit from the speed of the SSD for scientific computing);
• an encrypted partition for /home on an HDD.
I did not keep enough space for / in my previous Linux installation (Kubuntu 12.10), which led to some problems (e.g. impossibility to install automatic updates, error when pressing TAB for command line completion, error at start of Chrome or Firefox). Fortunately, the corresponding logical volume for / was “adjacent” (is it the right term to use?) to another logical volume, /home/local. It is not possible to resize the logical volumes in the Kubuntu installer, but it is in the installer of a old CD I had kept on a dusty shelf: OpenSuse 11.4 KDE Live CD AMD64. The OpenSuse partitioner is the best one, and it shows that one more time; however I had to proceed in two steps:
1. go to manual partioning, and resize /home/local logical volume from 26G to 15G. However, even if shows that the maximum size of / can be increased to 30G, the interface refuses to apply this size. So I keep it like that, and go on in the installation process. After it has resized /home/local, an error was obtained (if my memory is correct, something like “sdb1 impossible to mount”. So I stopped the installation and rebooted.
2. At the reboot, I run the OpenSuse installer one more time, and go to manual partitioning. /home/local is shown to be of size 15G, and / of 21G. But this time it lets me increase the size of / to 30G. I go on in the partioning, and stopped the installation after the resizing procedure has been applied.
After all the installation process (base installation and my additional packages), / has 15Go used, and 15Go available: it should be enough! Concerning /boot, I had problems in the late months, because the automatic updates tried to install a new kernel, but no more space was available on /boot. Now I think it was the problem, but it was not so explicit. One kernel takes about 45 Mo in /boot, so my /boot of 180Mo can contain many kernels before the size problem appears. If it happens again, I will have to examine how to delete the older kernels so as to free disk size.

## Installation of Kubuntu through Lubuntu

My goal is to make an installation on / and /boot, keeping the other partitions unchanged. This means that logical volumes have to be detected during the installation. At this time, my idea was to use the Kubuntu 13.04 installer, using the tip explained at 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 them again, and run ubiquity to start the installer. (1066480)
refering to bug 1066480. Indeed, this technique works: by mounting and unmounting my two encrypted partitions in Dolphin from the KDE live CD, I was able to see them in the installer afterwards (the installer may be run from a special icon on the KDE desktop). Without mounting them before, only the various /dev/sda* and /dev/sdb* partitions are seen, not the various encrypted volumes. However, the installer segfaults more or less rapidly when assigning paths to logical volumes. I found no easy workaround, so my next idea was to do the same by using a live distribution of Ubuntu instead of Kubuntu. Indeed the process is almost the same, and the installation works like a charm. However, at the reboot, I obtain an error: Linux does not find the logical volume for /. The solution was to use the technique indicated in the HOWTO located here, i.e. to use the “rescue mode” at Linux boot so as to:
• make a suitable /etc/crypttab file
• run update-initramfs as indicated in the aforementioned HOWTO.
But I did not realize that at this time, and instead I had the idea to use the old good text installer shipped with Lubuntu, but unfortunately no more distributed with Ubuntu and Kubuntu. So I downloaded Lubuntu, put it on a USB key, installed it (the logical volumes and partitions are detected without any problem by this text installer; to do that it asks for the encryption passwords, as does the OpenSuse partitioner). After having updated /etc/crypttab and run update-initramfs, it booted perfectly. Now, to obtain a working KDE system, I had to do the two following things from the “rescue mode” of the installer:
• use adduser to add my user. Indeed, for some reason only a guest account appeared after a reboot.
• put this new user in the “sudo” group so as to be able to run root commands. As well as “lpadmin” group (see below).
• install the following packages\begin_inset Separator latexpar\end_inset
• kde-standard which is the “KDE Plasma Desktop and standard set of applications” (not kde-plasma-desktop, which is the “KDE Plasma Desktop and minimal set of applications”);
• kde-workspace-randr for display management to appear in KDE system settings, update-manager-kde, kontact, muon, muon-installer, kmag, kde-config-gtk-style-preview (see below).
Next time, if the crash in the Kubuntu installer is solved, I should be able to install Linux without erasing my logical volumes and my encrypted partition.

## Bad fonts in Gtk+ applications

In Gimp, Firefox, Chromium, etc. the fonts are ugly. I have found the solution at here. It is necessary to install the package “kde-config-gtk-style-preview” to have the Gtk+ configuration dialog in KDE system settings. In fact, the problem was in my file /home/user/.gtkrc-2.0, which contained:
# File created by KDE Gtk Config
# Configs for GTK2 programs
include "/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc"
style "user-font"
{
font_name="Abyssinica SIL"
}
widget_class "*" style "user-font"
gtk-font-name="Abyssinica SIL 12"
gtk-theme-name="oxygen-gtk"
gtk-icon-theme-name="oxygen"
gtk-fallback-icon-theme="oxygen"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-button-images=0

The ugly font is “Abyssinica SIL”. By clicking on “Defaults” in “System Settings -> Application Appearance -> GTK”, this file is reset to a suitable content, and the fonts in Firefox and others are now correct.

## Card reader Realtek Semiconductor Co., Ltd. Device 5289

The card reader works out of the box for my SD card, no need of additional installation, contrary to Kubuntu 12.10.

## Scanner and printer Canon MF4330d

The scanner works out of the box.
For the printer, no interface appears in KDE System Settings. Anyway, usually I use the web interface at here. To be able to add a printer, I was compelled to add my user in group “lpadmin”. Everything worked perfectly, except that as usual I had to
• make a symbolic link:\begin_inset Separator latexpar\end_inset
$sudo ln -s /usr/lib /usr/lib64  • install my packages:\begin_inset Separator latexpar\end_inset • cndrvcups-common_2.50-1_amd64.deb • cndrvcups-ufr2-uk_2.50-1_amd64.deb Note that both packages have to be installed for the printer to work. ## Reading mp3 It was necessary to install the package kubuntu-restricted-extras (now put in my packages.py list). ## Internal hard drive I had the same noise as in 12.10. I have put apm=253 in /etc/hdparm.conf, and the problem is solved (see notes concerning 12.10 installation). ## Graphic card GeForce GT 650M No desktop effects possible in KDE after the installation. I tried to install nvidia-experimental-310 (to perhaps have the last version of NVidia drivers, I have read that there is now some support for nvidia optimus technology) but it does not work: bad resolution after doing nvidia-settings (which is necessary) exactly as in Kubuntu 12.10. So I decide to go fast, I remove the /etc/X11/xorg.conf created by nvidia-settings, and install bumblebee: $ sudo add-apt-repository ppa:bumblebee/stable
$sudo apt-get update$ sudo apt-get install bumblebee bumblebee-nvidia

Even before a reboot, i.e. just after typing the previous lines, it seems to work: the LED corresponding to integrated Intel chip becomes on, and the one corresponding to nvidia card gets off. Now, let us look at the performance, comparing with the installation in Kubuntu 12.10:
$glxgears Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. 303 frames in 5.0 seconds = 60.563 FPS 299 frames in 5.0 seconds = 59.789 FPS$ optirun glxgears
4007 frames in 5.0 seconds = 801.339 FPS
3954 frames in 5.0 seconds = 790.734 FPS
4032 frames in 5.0 seconds = 806.280 FPS

It is perhaps better for optirun compared to 12.10. Now, using glxspheres:
$glxspheres Polygons in scene: 62464 Visual ID of window: 0x20 Context is Direct OpenGL Renderer: Mesa DRI Intel(R) Ivybridge Mobile 60.377009 frames/sec - 67.380742 Mpixels/sec 59.743814 frames/sec - 66.674096 Mpixels/sec$ optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 650M/PCIe/SSE2
97.711372 frames/sec - 109.045891 Mpixels/sec
115.186857 frames/sec - 128.548532 Mpixels/sec
117.789642 frames/sec - 131.453241 Mpixels/sec
120.343986 frames/sec - 134.303888 Mpixels/sec

Idem: perhaps better with optirun compared to 12.10. Now let us compared the scores at glmark2:
• integrated Intel chipset: 1902. It is far better than in 12.04!
• nvidia GeForce GT 650M: 285. Better than in 12.10, but still far below the integrated chipset.
Note that all OpenGL demo of “qtdemo” work perfectly, as well with the integrated video chipset as with the nvidia card (then use “optirun qtdemo”).

## Kontact

Now it is necessary to activate knode by a tickbox in Kontact settings.

## HOWTOs

The package containing HOWTOs is missing: doc-linux-html. Only some HOWTOs are available:
\$ wajig listall|grep howto
doc-linux-fr-html         Linux docs in French: HOWTOs, MetaFAQs in HTML format
doc-linux-fr-text         Linux docs in French: HOWTOs, MetaFAQs in ASCII format
doc-linux-ja-html         Linux HOWTOs and FAQs in Japanese (HTML format)
doc-linux-ja-text         Linux HOWTOs and FAQs in Japanese (TEXT format)
doc-linux-pl              Linux docs in Polish: HOWTO - ascii version
doc-linux-pl-html         Linux docs in Polish: HOWTO - html version


## Improvements in KDE

• Now by right-clicking on the desktop, on “desktop settings”, we have the possibility to display a “folder view” as in KDE 3. I prefer that to the grey widget showing a folder. In fact it seems this is a not so recent improvement, but this is the first time I notice it.
• The RandR module of KDE systemsettings to set the display (two screens, primary output, etc.) works perfectly, except the “Save as default” option that does not seem to work on my computer.