<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Blog</title><link href="https://blog.tblein.eu/" rel="alternate"></link><link href="https://blog.tblein.eu/feeds/general.atom.xml" rel="self"></link><id>https://blog.tblein.eu/</id><updated>2012-07-27T18:16:53+02:00</updated><entry><title>Mounting a ext formated disk on FreeBSD</title><link href="https://blog.tblein.eu/general/2012/mounting-a-ext-formated-disk-on-freebsd/" rel="alternate"></link><published>2012-07-27T18:16:53+02:00</published><author><name>Thomas Blein</name></author><id>tag:blog.tblein.eu,2012-07-27:general/2012/mounting-a-ext-formated-disk-on-freebsd/</id><summary type="html">&lt;p&gt;Disk naming are a little bit different between BSD and Linux. In addition ext2/ext3 file system are not so nicely support. However, you can mount your disk to read then.&lt;/p&gt;
&lt;div class="section" id="list-the-disk-available-on-the-system"&gt;
&lt;h2&gt;List the disk available on the system&lt;/h2&gt;
&lt;p&gt;To get the list of connected disk to the system enter the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;camcontrol devlist
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It will output something as follow:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;lt;VBOX HARDDISK 1.0&amp;gt;   at scbus0 target 0 lun 0 (ada0,pass0)
&amp;lt;VBOX CD-ROM 1.0&amp;gt;     at scbus1 target 0 lun 0 (pass1,cd0)
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To get the partitions available:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ls /dev/ada0*
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="mounting-the-filesystem"&gt;
&lt;h2&gt;Mounting the filesystem&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mount -t ext2fs /dev/ad0s1 /mnt/linux
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
</summary><category term="FreeBSD"></category><category term="ext"></category><category term="mounting"></category></entry><entry><title>Reinstallation of the same packages on Debian</title><link href="https://blog.tblein.eu/general/2012/reinstallation-of-the-same-packages-on-debian/" rel="alternate"></link><published>2012-07-27T18:16:53+02:00</published><author><name>Thomas Blein</name></author><id>tag:blog.tblein.eu,2012-07-27:general/2012/reinstallation-of-the-same-packages-on-debian/</id><summary type="html">&lt;p&gt;For the transfer of a Debian or Ubuntu machine, or to make a mirror of it, it is
often needed to reinstall the packages that are installed one one system on an
other one. We will explain it in here.&lt;/p&gt;
&lt;div class="section" id="the-dpkg-way-of-doing"&gt;
&lt;h2&gt;The dpkg way of doing&lt;/h2&gt;
&lt;p&gt;First of all, we need to grab the list of all installed package and save it in
a text file. Here we will save it in &lt;code&gt;installed_packages.txt&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# dpkg --get-selections &amp;gt; installed_packages.txt&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;installed_packages.txt&lt;/code&gt; file contain a list of package and their installation status:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;aalib1                                          deinstall
abiword-common                                  deinstall
acroread                                        install
acroread-debian-files                           install
acroread-escript                                install
acroread-plugins                                install
adduser                                         install
adept-notifier                                  deinstall
affix                                           install
akode                                           deinstall
akregator                                       install
alsa-base                                       install
alsa-oss                                        install
alsa-tools                                      install
 [...]
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After transferring the list of packages on the new system we need to load it
inside &lt;code&gt;dpkg&lt;/code&gt;, with the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# dpkg --set-selections &amp;lt; mes_paquets&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then, we need to say to apt-get to grab this selection to set the package to
install and remove:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# apt-get dselect-upgrade&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Finally a classical upgrade is required:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# apt-get dist-upgrade&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="the-aptitude-way-of-doing"&gt;
&lt;h2&gt;The aptitude way of doing&lt;/h2&gt;
&lt;p&gt;Grabs the only the manually installed packages on the current system in
&lt;code&gt;installed_packages.txt&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# aptitude search -F%p ~i\!~M &amp;gt; installed_packages.txt&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;installed_packages.txt&lt;/code&gt; file contain a list of package, without
status unlike for the dpkg way:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;aalib1
abiword-common
acroread
acroread-debian-files
acroread-escript
acroread-plugins
adduser
adept-notifier
affix
akode
akregator
alsa-base
alsa-oss
alsa-tools
 [...]
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After transferring the list of packages on the new system, we just have to give
it to aptitude or apt:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# aptitude install $(cat installed_packages.txt)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# apt-get install $(cat installed_packages.txt)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The advantage of this method is that only the manually installed packages will
be installed, with corresponding dependency. It will therefore set correctly the
database use to detect the manually installed packages, and not with all the
packages that were installed on the first system.&lt;/p&gt;
&lt;/div&gt;
</summary><category term="Debian"></category><category term="dpkg"></category><category term="aptitude"></category><category term="installation"></category></entry><entry><title>Création de fichier image disque et montage</title><link href="https://blog.tblein.eu/general/2009/creation-de-fichier-image-disque-et-montage/index-fr.html" rel="alternate"></link><published>2009-06-22T00:00:00+02:00</published><author><name>Thomas Blein</name></author><id>tag:blog.tblein.eu,2009-06-22:general/2009/creation-de-fichier-image-disque-et-montage/index-fr.html</id><summary type="html">&lt;p&gt;Création d'une image disque de 1 Go à trou (utilisation réelle d'espace disque
en fonction des besoins).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt; dd &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/null &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;image &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1G &lt;span class="nv"&gt;seek&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Formatage de l'image en ext3&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt; /sbin/mkfs.ext3 -F image
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Montage de l'image dans le répertoire &lt;code&gt;loop/&lt;/code&gt; (à adapter suivant le
besoin) en tant que &lt;code&gt;root&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt; mount image loop/ -o loop
&lt;/pre&gt;&lt;/div&gt;
</summary><category term="Partition"></category></entry><entry><title>GPG et APT</title><link href="https://blog.tblein.eu/general/2009/GPG_and_APT/index-fr.html" rel="alternate"></link><published>2009-03-03T00:00:00+01:00</published><author><name>Thomas Blein</name></author><id>tag:blog.tblein.eu,2009-03-03:general/2009/GPG_and_APT/index-fr.html</id><summary type="html">&lt;p&gt;Comment ajouter une clé de chiffrement pour vérifier la signature des paquets
d'un dépôt le système de gestion de paquets apt-get&lt;/p&gt;
&lt;div class="section" id="introduction"&gt;
&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Une petite erreur du style :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="go"&gt;W: GPG error: http://debian.ens-cachan.fr stable Release:&lt;/span&gt;
&lt;span class="go"&gt;Les signatures suivantes n&amp;#39;ont pas pu être vérifiées car la clé publique n&amp;#39;est pas disponible : NO_PUBKEY 010908312D230C5F&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Il s'agit d'une fonctionnalité du système d'apt-get permettant de garantir
l'authenticité des serveurs de mise à jour Debian. Chaque paquets est signé
à l'aide d'une clé de chiffrement. Avant sont installation la signature du
paquet va être vérifiée en la comparant à celle obtenue localement. Pour
y remédier il faut récupérer la clé de chiffrement.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="recuperation-de-la-cle-en-ligne-de-commande-apt-key"&gt;
&lt;h2&gt;Récupération de la clé en ligne de commande: apt-key&lt;/h2&gt;
&lt;p&gt;Dans un premier temps la clé va être récupérée sur un des serveurs de clés
à l'aide de la commande suivante:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt; gpg --keyserver hkp://wwwkeys.eu.pgp.net --recv-keys 010908312D230C5F
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Vous pouvez utiliser un autre serveur de clés. En principe ils se synchronisent
entre eux. Remplacer l'identificant de la clé par celui demandé par le système
apt-get.&lt;/p&gt;
&lt;p&gt;Ensuite vous devez l’importer dans le système de paquetage apt-get à l’aide de
la ligne suivante si vous utilisez sudo :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt; gpg --armor --export 010908312D230C5F &lt;span class="p"&gt;|&lt;/span&gt; sudo apt-key add -
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;sinon en tant que super-utilisateur:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt; gpg --armor --export 010908312D230C5F &lt;span class="p"&gt;|&lt;/span&gt; apt-key add -
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;La clé peut être maintenant utiliser par le système de gestion de paquets.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="interface-graphique-du-gestionnaire-de-cle-pour-apt-get-gui-apt-key"&gt;
&lt;h2&gt;Interface graphique du gestionnaire de clé pour apt-get: gui-apt-key&lt;/h2&gt;
&lt;p&gt;Il existe depuis quelque temps une interface graphique à apt-key : &lt;a class="reference external" href="http://www.infodrom.org/projects/gui-apt-key/"&gt;gui-apt-key&lt;/a&gt;. Pour le moment cette
interface est uniquement disponible dans Etch. Vous pouvez l'installer
à l'aide de votre gestionnaire de paquets préféré ou à l'aide de la commande
suivante si vous utilisé sudo:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt; sudo apt-get install gui-apt-key
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;ou en temps que super-utilisateur:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt; apt-get install gui-apt-key
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;L'interface est ensuite intuitive: recopiez l'indentifiant de la clé dans le
champ &amp;quot;ID de la clé&amp;quot; et cliquez sur &amp;quot;Ajouter&amp;quot;. Et la clé est ajoutée
automatiquement.&lt;/p&gt;
&lt;/div&gt;
</summary><category term="Debian"></category><category term="APT"></category><category term="GPG"></category></entry><entry><title>Donner un nom à une partition avec e2label</title><link href="https://blog.tblein.eu/general/2009/Naming-partition-with-e2label/index-fr.html" rel="alternate"></link><published>2009-02-16T00:00:00+01:00</published><author><name>Thomas Blein</name></author><id>tag:blog.tblein.eu,2009-02-16:general/2009/Naming-partition-with-e2label/index-fr.html</id><summary type="html">&lt;p&gt;Lors du montage des partitions le chemin d'accès au périphérique est
généralement utilisé pour référencer une partition, à savoir cette ligne est
présente dans votre fichier &lt;code&gt;/etc/fstab&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt;    &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;       &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;/span&gt;
&lt;span class="err"&gt;/dev/hda2&lt;/span&gt;       &lt;span class="err"&gt;/mount/point&lt;/span&gt;     &lt;span class="err"&gt;ext3&lt;/span&gt;    &lt;span class="err"&gt;defaults&lt;/span&gt;         &lt;span class="err"&gt;0&lt;/span&gt;       &lt;span class="err"&gt;0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ce style d'identification trouve ses limites lorsqu'il s'agit de périphérique
amovible: il ne possède pas toujours le même nom. Il est possible d'attribuer
une étiquette aux partition ext2/ext3  l'aide de l'utilitaire &lt;code&gt;e2label&lt;/code&gt;.
Ainsi la partition peut être retrouver via son étiquette.&lt;/p&gt;
&lt;div class="section" id="ajout-d-une-etiquette"&gt;
&lt;h2&gt;Ajout d'une étiquette&lt;/h2&gt;
&lt;p&gt;Pour ajouter une étiquette à une partition, tapez la commande suivante en tant
que root :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gp"&gt;#&lt;/span&gt; e2label /dev/hdaX étiquette
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;hda&lt;/code&gt; correspond au périphérique (hda, hdb, sda, sdb, ...), &lt;code&gt;X&lt;/code&gt; au
numéro de partition, et &lt;code&gt;étiquette&lt;/code&gt; à l'étiquette utilisée.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="reference-dans-etc-fstab"&gt;
&lt;h2&gt;Référence dans /etc/fstab&lt;/h2&gt;
&lt;p&gt;Une fois l'étiquette alouée, le fichier &lt;code&gt;/etc/fstab&lt;/code&gt; peut être modifié.
Pour cela la référence au périférique devient &lt;code&gt;LABEL=étiquette&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt;   &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;       &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;/span&gt;
&lt;span class="na"&gt;LABEL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;etiquette /mount/point   ext3   defaults   0 0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Où &lt;code&gt;etiquette&lt;/code&gt; est l'étiquette de la partition et /mount/point le
répertoire où la partition doit être montée.&lt;/p&gt;
&lt;/div&gt;
</summary><category term="Partition"></category><category term="e2label"></category></entry></feed>