Projet

Général

Profil

Eole23 with kernel 3 » Historique » Version 7

Daniel Dehennin, 21/12/2011 10:52
Objectif et contraintes du passage à un noyau 3.0

1 1 Daniel Dehennin
h1. Kernel 3.0 sur un module EOLE 2.3
2 1 Daniel Dehennin
3 6 Daniel Dehennin
*Étude du passage à un noyau Ubuntu LTS backport*
4 6 Daniel Dehennin
5 7 Daniel Dehennin
L’idée est d’éviter de compiler un kernel spécifique EOLE, nécessitant la recompilation des outils comme iptables du fait du changement de l’"ABI":http://fr.wikipedia.org/wiki/Application_binary_interface du noyau.
6 7 Daniel Dehennin
7 7 Daniel Dehennin
Nous devons cependant concerver un certains nombre de fonctionnalités :
8 7 Daniel Dehennin
* La gestion des conteneurs "LXC (en)":http://en.wikipedia.org/wiki/LXC
9 7 Daniel Dehennin
* Les extensions "ipset (en)":http://en.wikipedia.org/wiki/Netfilter#ipset
10 7 Daniel Dehennin
* Le filtrage du "P2P":http://fr.wikipedia.org/wiki/P2P
11 7 Daniel Dehennin
12 1 Daniel Dehennin
h2. Installation
13 1 Daniel Dehennin
14 2 Daniel Dehennin
Un noyau _backport_ est disponible sur _Lucid_:
15 2 Daniel Dehennin
16 2 Daniel Dehennin
<pre>
17 2 Daniel Dehennin
root@eole:~# apt-get install linux-image-generic-lts-backport-oneiric
18 2 Daniel Dehennin
</pre>
19 2 Daniel Dehennin
20 1 Daniel Dehennin
h3. Adaptations
21 2 Daniel Dehennin
22 2 Daniel Dehennin
Il est nécessaire d’effectuer quelques adaptation afin de démarrer un noyau 3.0.
23 2 Daniel Dehennin
24 2 Daniel Dehennin
h4. Démarrage par défaut sur le noyau 3.0
25 2 Daniel Dehennin
26 2 Daniel Dehennin
La séléction du noyau se fait lors d’une mise à jour de grub, par défaut, uniquement les noyaux se finissant par @-eole@ sont pris en compte.
27 2 Daniel Dehennin
28 2 Daniel Dehennin
On modifie l’"expression rationnelle":http://fr.wikipedia.org/wiki/Expression_rationnelle sélectionnant le noyau par défaut:
29 2 Daniel Dehennin
<pre>
30 2 Daniel Dehennin
root@eole:~# sed -ie "s/\(EOLE_GRUB_REGEX='.\*\)-eole'/\1'/" /etc/default/grub
31 2 Daniel Dehennin
</pre>
32 2 Daniel Dehennin
33 2 Daniel Dehennin
h4. Iptables
34 2 Daniel Dehennin
35 2 Daniel Dehennin
EOLE recompile iptables du fait du patch modifiant l’"ABI":http://fr.wikipedia.org/wiki/Application_binary_interface du noyau.
36 2 Daniel Dehennin
37 2 Daniel Dehennin
L’utilisation d’un noyau standard nécessite l’installation de la version Ubuntu d’iptables
38 2 Daniel Dehennin
39 2 Daniel Dehennin
<pre>
40 2 Daniel Dehennin
root@eole:~# apt-get install iptables=1.4.4-2ubuntu2
41 2 Daniel Dehennin
</pre>
42 2 Daniel Dehennin
43 2 Daniel Dehennin
Attention, une mise à jour réinstallera la version EOLE, durant les tests, il faut garder la version Ubuntu:
44 2 Daniel Dehennin
45 2 Daniel Dehennin
<pre>
46 2 Daniel Dehennin
root@eole:~# echo "iptables hold" | dpkg --set-selections
47 2 Daniel Dehennin
</pre>
48 2 Daniel Dehennin
49 2 Daniel Dehennin
h4. Conteneurs
50 2 Daniel Dehennin
51 2 Daniel Dehennin
La version des outils _LXC_ sur _Lucid_ ne fonctionnent pas avec un noyau 3.0.
52 2 Daniel Dehennin
53 2 Daniel Dehennin
Il faut donc installer une version _backport_:
54 2 Daniel Dehennin
<pre>
55 2 Daniel Dehennin
root@eole:~# apt-get install python-software-properties
56 2 Daniel Dehennin
root@eole:~# add-apt-repository ppa:serge-hallyn/lxc-backport
57 2 Daniel Dehennin
root@eole:~# apt-get update
58 2 Daniel Dehennin
root@eole:~# apt-get install lxc=0.7.4-0ubuntu1.1
59 2 Daniel Dehennin
root@eole:~# echo "lxc hold" | dpkg --set-selections
60 2 Daniel Dehennin
</pre>
61 2 Daniel Dehennin
62 2 Daniel Dehennin
h4. Filtrage p2p
63 2 Daniel Dehennin
64 2 Daniel Dehennin
L7 filter nécessite un patch noyau qui change l’"ABI":http://fr.wikipedia.org/wiki/Application_binary_interface du noyau.
65 2 Daniel Dehennin
66 2 Daniel Dehennin
Il est possible d’utiliser le module @ipp2p@ de "xtables-addons":http://xtables-addons.sourceforge.net/
67 2 Daniel Dehennin
68 2 Daniel Dehennin
Il faut une version de xtables-addons fonctionnant sur noyau 3.0
69 2 Daniel Dehennin
70 2 Daniel Dehennin
<pre>
71 2 Daniel Dehennin
root@eole:~# bzr branch lp:ubuntu/oneiric/xtables-addons
72 2 Daniel Dehennin
root@eole:~# cd xtables-addons && dpkg-buildpackage
73 2 Daniel Dehennin
</pre>
74 3 Daniel Dehennin
75 3 Daniel Dehennin
h4. ipset
76 3 Daniel Dehennin
77 5 Daniel Dehennin
Une mise à jour d’ipset viendra avec "@xtables-addons-common@":https://launchpad.net/ubuntu/+source/xtables-addons/1.35-1
78 3 Daniel Dehennin
79 3 Daniel Dehennin
<pre>
80 3 Daniel Dehennin
root@amonecole:~# ipset -L
81 3 Daniel Dehennin
ipset v4.1: Kernel ip_set module is of protocol version 6.I'm of protocol version 4.
82 3 Daniel Dehennin
Please upgrade your kernel and/or ipset(8) utillity.
83 3 Daniel Dehennin
</pre>