tag:blogger.com,1999:blog-85478454804644721382024-03-06T09:26:02.902+01:00Computer science Experience Knowledge SHAring (CEKSHA)sharing knowledge earned into design/development/technical delicate and/or difficult situations ...Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.comBlogger127125tag:blogger.com,1999:blog-8547845480464472138.post-42669629564224608902018-11-22T15:58:00.000+01:002018-11-22T15:58:10.965+01:00StackOverflow<div dir="ltr" style="text-align: left;" trbidi="on">
Like lots of people, I'm using <a href="https://stackoverflow.com/users/10524205/bsquare">Stackoverflow</a> every week, and sometimes every day to share experience.<br />
<br />
Of course, there are still lots to learn, and to share, which is very entertaining.<br />
<br />
As samples, these are some of the question I posted:<br />
- <a href="https://stackoverflow.com/q/53396677/10524205?stw=2">Create proper Git repositories from a Catchall (dirty) one</a><br />
- <a href="https://stackoverflow.com/q/52928099/10524205?stw=2">Eclipse Photon - wrong keyboard layout only for shortcut </a><br />
<br />
<br />
As samples, these are some of the question I answered:<br />
- <a href="https://stackoverflow.com/a/53284942/10524205?stw=2">How to restrict merging specific branch into other branches in Gitlab? </a><br />
- <a href="https://stackoverflow.com/a/53118157/10524205?stw=2">How can I see the xltrail-generated diff of an Excel workbook in Beyond Compare?</a><br />
- <a href="https://stackoverflow.com/a/52984968/10524205?stw=2">Ninja framework endpoint throws 500 error when trying to map JSON to custom object</a><br />
<br />
If you are not yet in the community, join it, there are lots of things to share.</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-56713586715020405062018-03-17T12:56:00.002+01:002018-03-17T12:56:37.305+01:00RedOhm Team - Artificial Intelligence, Robotics, Electronics, Mechanics<div dir="ltr" style="text-align: left;" trbidi="on">
Hello everyone, I'm very pleased to introduce you the <a href="http://www.redohm.fr/">RedOhm </a>Team.<div>
<br /></div>
<div>
We are a French team of passionate about</div>
<div>
<a name='more'></a></div>
<div>
Artificial Intelligence, Robotics, Electronics, Mechanics!<br /><div>
<br /></div>
<div>
I'm very happy to participate to this great project since already about 9 months.</div>
<div>
<br /></div>
<div>
Lots of what we produce is mainly home made, from mechanics (including <a href="http://www.redohm.fr/impression-3d/">3D printing</a>), to Artificial Intelligence.</div>
<div>
<br /></div>
<div>
We wrote alot of articles on the Website, about our uses of various controller, sensors, hardware like <a href="https://www.arduino.cc/">Arduino</a>, <a href="https://www.ez-robot.com/">EZ-Robot</a>, <a href="https://www.seeedstudio.io/">Seeed Studio</a> (Grove), <a href="https://www.dfrobot.com/">DrfRobot </a>...</div>
<div>
<br /></div>
<div>
There are already several Robots, see all information on <a href="http://www.redohm.fr/menu_nos_robot/">Redohm's Robots</a> page.</div>
<div>
Our most famous Robots are <a href="http://www.redohm.fr/2016/10/robot-maya-je-veux-tout-savoir/">Maya</a>, and <a href="http://www.redohm.fr/recapitulatif-sentinel/">Sentinel</a>.</div>
<div>
<br /></div>
<div>
This is a collaborative project, so don't hesitate to contact us to contribute, for instance on the <a href="http://www.redohm.fr/contact/">Website</a>, on this <a href="https://bertrandbenoit.blogspot.fr/">Blog</a>, or even sending an e-mail to <a href="mailto:redohm@bertrand-benoit.net">redohm@bertrand-benoit.net</a></div>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
<u>French version:</u></div>
<div>
Bonjour à tous, je suis très heureux de vous présenter l'équipe <a href="http://www.redohm.fr/">RedOhm</a>.</div>
<div>
<div>
<br /></div>
<div>
Nous sommes une équipe Française de passionnés sur</div>
<div>
<!--more--></div>
<div>
L'Intelligence Artificielle, la Robotique, l'Electronique, et la Mécanique!<br /><div>
<br /></div>
<div>
Je suis très heureux de participer à ce projet depuis déjà plus de 9 mois.</div>
<div>
<br /></div>
<div>
La majorité de ce que nous produisons est fait-maison, à commencer par la mécanique (inclus de l'<a href="http://www.redohm.fr/impression-3d/">Impression 3D</a>), jusqu'à l'Intelligence Artificielle.</div>
<div>
<br /></div>
<div>
Nous avons écrit de nombreux articles, sur le Site Web, au sujet des différents matériels que nous utilisons, aussi bien des cartes micro contrôleur, que des modules, des capteurs et cetera, tels que <a href="https://www.arduino.cc/">Arduino</a>, <a href="https://www.ez-robot.com/">EZ-Robot</a>, <a href="https://www.seeedstudio.io/">Seeed Studio</a> (Grove), <a href="https://www.dfrobot.com/">DrfRobot </a>...</div>
<div>
<br /></div>
<div>
Il existe déjà plusieurs Robots, dont vous pouvez trouver les informations sur la page des <a href="http://www.redohm.fr/menu_nos_robot/">Robots Redohm</a>.</div>
<div>
Nos plus connus sont les robots <a href="http://www.redohm.fr/2016/10/robot-maya-je-veux-tout-savoir/">Maya</a>, et <a href="http://www.redohm.fr/recapitulatif-sentinel/">Sentinel</a>.</div>
<div>
<br /></div>
<div>
Il s'agit d'un projet collaboratif, n'hésitez donc pas à nous contacter pour participer, soit via le <a href="http://www.redohm.fr/contact/">Site Web</a>, via mon <a href="https://bertrandbenoit.blogspot.fr/">Blog</a>, ou même en envoyant un e-mail à <a href="mailto:redohm@bertrand-benoit.net">redohm@bertrand-benoit.net</a></div>
</div>
</div>
<div>
<br /></div>
</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-81309786292781628622016-05-29T15:36:00.000+02:002016-05-29T15:36:07.986+02:00Install Domoticz on Raspberry Pi 3<div dir="ltr" style="text-align: left;" trbidi="on">
This article explains how to install Domoticz on Raspberry Pi 3, on Fedora 23 Minimal version (but it should be usable for other distribution).<br />
If you need to install or complete your Raspberry Pi 3 installation on Fedora 23 Minimal version, for the most lightweight, you can read <a href="http://bertrandbenoit.blogspot.fr/2016/04/12-install-fedora-23-minimal-version.html">part 1</a>, and <a href="http://bertrandbenoit.blogspot.fr/2016/04/22-install-fedora-23-minimal-version.html">part 2</a> of my articles.<br />
<br />
<a name='more'></a>Download the last stable version of Domoticz.<div>
This article will explain how to install the version 3.4834 which is currently the newest one.<br /><div>
<br /></div>
<div>
Download the version 3.4834 of Domoticz<br /><div>
<b><i><span style="color: blue;">wget https://github.com/domoticz/domoticz/archive/3.4834.tar.gz -O /tmp/domoticz-3.4834.tar.gz</span></i></b></div>
<div>
<br /></div>
<div>
As root user, you should create a sub-directory for Domoticz installation, and allow your no-root user to work in it</div>
<div>
<b><i><span style="color: blue;">mkdir /opt/domoticz</span></i></b></div>
<div>
<b><i><span style="color: blue;">chown yourUser </span></i></b><b><i><span style="color: blue;">/opt/domoticz</span></i></b></div>
<div>
<br /></div>
<div>
Install some additional tools<br /><b><i><span style="color: blue;">dnf install gcc-c++ cmake curl boost-devel zlib-devel openssl-devel libcurl-devel libusb-devel libstdc++-devel libstdc++-static</span></i></b></div>
<div>
<b><i><span style="color: blue;"><br /></span></i></b></div>
<div>
All the following instructions can be done with your no-root user.</div>
<div>
<br /></div>
Uncompress it and prepare environment<br /><b><i><span style="color: blue;">cd /opt/</span></i></b><b><i><span style="color: blue;">domoticz</span></i></b><div>
<div>
<b><i><span style="color: blue;">tar xf /tmp/domoticz-3.4834.tar.gz<br />ln -s domoticz-3.4834/ domoticz</span></i></b></div>
<div>
<br /></div>
<div>
<b><i>Tips:</i></b> the use of a symbolic link to this 'domoticz' to a specific version of Domoticz installation will allow you to switch easily on any newer version, without having to change any environment variable like PATH, in future.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
If you want to add support to Zwave, you can follow instructions of my dedicated <a href="http://bertrandbenoit.blogspot.fr/2016/05/install-openzwave-on-raspberry-pi-3.html">article to install OpenZWave</a>.</div>
<div>
Then, your OpenZWave root directory MUST be reachable via a symbolic link (or real directory), in the parent directory of your domoticz installation, with name open-zwave-read-only.</div>
<div>
If you followed my article, you can fit it with these instructions</div>
<div>
<b><i><span style="color: blue;">cd /opt/domoticz/</span></i></b></div>
<div>
<b><i><span style="color: blue;">ln -s /opt/open-zwave/open-zwave open-zwave-read-only</span></i></b></div>
<div>
<br /></div>
<div>
Compile Domoticz<br /><b><i><span style="color: blue;">cd /opt/domoticz/domoticz</span></i></b></div>
<div>
<b><i><span style="color: blue;">cmake CMakeLists.txt</span></i></b></div>
<div>
<span style="color: blue;"><b><i>make -j 4</i></b></span></div>
<div>
You can now launch Domoticz</div>
</div>
<div>
<b><i><span style="color: blue;">/opt/domoticz/domoticz/domoticz</span></i></b></div>
<div>
<br /></div>
<div>
By default, you can access it via <b><i><span style="color: blue;">http://rpiIpAddress:8080</span></i></b></div>
<div>
<br /></div>
<div>
Enjoy it ;)</div>
<div>
<br /></div>
</div>
</div>
</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com1tag:blogger.com,1999:blog-8547845480464472138.post-39525608763101458452016-05-29T15:28:00.000+02:002016-05-29T15:30:27.179+02:00Install OpenZWave on Raspberry Pi 3<div dir="ltr" style="text-align: left;" trbidi="on">
This article explains how to install OpenZWave on Raspberry Pi 3, on Fedora 23 Minimal version (but it should be usable for other distribution).<br />
If you need to install or complete your Raspberry Pi 3 installation on Fedora 23 Minimal version, for the most lightweight, you can read <a href="http://bertrandbenoit.blogspot.fr/2016/04/12-install-fedora-23-minimal-version.html">part 1</a>, and <a href="http://bertrandbenoit.blogspot.fr/2016/04/22-install-fedora-23-minimal-version.html">part 2</a> of my articles.<br />
<br />
<a name='more'></a>Download the last stable version of OpenZWave.<br />
<div>
This article will explain how to install the version 1.4 which is currently the newest one.</div>
<div>
<br /></div>
<div>
Download the version 1.4 of OpenZWave<br />
<div>
<b><i><span style="color: blue;">wget https://github.com/OpenZWave/open-zwave/archive/v1.4.tar.gz -O /tmp/open-zwave-1.4.tar.gz</span></i></b></div>
<div>
<br /></div>
<div>
As root user, you should create a sub-directory for OpenZWave installation, and allow your no-root user to work in it</div>
<div>
<b><i><span style="color: blue;">mkdir /opt/open-zwave</span></i></b></div>
<div>
<b><i><span style="color: blue;">chown yourUser </span></i></b><b><i><span style="color: blue;">/opt/</span></i></b><b><i><span style="color: blue;">open-zwave</span></i></b></div>
<div>
<br /></div>
<div>
If not already done, you should create a profile file to update the libraries path (as root user)</div>
<div>
<div>
<b><i><span style="color: blue;">sudo cat <<EOF > </span><span style="color: blue;">/etc/profile.d/variousEnvironment.sh</span></i></b></div>
<div>
<b><i><span style="color: blue;">#!/bin/bash</span></i></b></div>
<div>
<b><i><span style="color: blue;"><br /></span></i></b></div>
<div>
<b><i><span style="color: blue;">export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib</span></i></b></div>
<div>
<b><i><span style="color: blue;">EOF</span></i></b></div>
</div>
<div>
<br /></div>
<div>
Install some additional tools<br />
<b><i><span style="color: blue;">dnf install gcc-c++ systemd-devel bc doxygen git</span></i></b></div>
<div>
<b><i><span style="color: blue;"><br /></span></i></b></div>
<div>
All the following instructions can be done with your no-root user.</div>
<div>
<br /></div>
Uncompress it and prepare environment<br />
<b><i><span style="color: blue;">cd </span></i></b><b><i><span style="color: blue;">/opt/open-zwave</span></i></b><br />
<div>
<div>
<b><i><span style="color: blue;">tar xf </span></i></b><b><i><span style="color: blue;">/tmp/open</span></i></b><b><i><span style="color: blue;">-</span></i></b><b><i><span style="color: blue;">zwave-1.4.tar.gz</span></i></b></div>
<div>
<span style="color: blue;"><b><i>ln -s open-zwave-1.4 open-zwave</i></b></span></div>
<div>
<br /></div>
<div>
<b><i>Tips:</i></b> the use of a symbolic link to this 'open-zwave' to a specific version of OpenZWave installation will allow you to switch easily on any newer version, without having to change any environment variable like PATH, in future.</div>
<div>
<br /></div>
<div>
Compile OpenZWave<br />
<b><i><span style="color: blue;">cd </span></i></b><b><i><span style="color: blue;">/opt/open-zwave/</span></i></b><b><i><span style="color: blue;">open-zwave</span></i></b></div>
<div>
<span style="color: blue;"><b><i>make -j 4</i></b></span></div>
</div>
</div>
<div>
<br /></div>
<div>
You can either make OpenZWave available on OS (recommended)</div>
<div>
<b><i><span style="color: blue;">sudo make install</span></i></b></div>
<div>
<br /></div>
<div>
Or update your profile file to add <b><i><span style="color: blue;">/opt/open-zwave/open-zwave/</span></i></b> in your <b style="font-style: italic;">LIBRARY_PATH </b>(for <i>libopenzwave.so</i>) and in your <b><i>PATH</i></b> (for <i>MinOZW</i> binary).</div>
<div>
<br /></div>
<div>
For ease of use, it it recommended to follow <a href="http://bertrandbenoit.blogspot.fr/2016/05/ensure-to-have-same-path-for-specific.html">my article</a> to ensure to have the same path for your ZWave USB Device.</div>
<div>
<br /></div>
<div>
Now you can easily test your device with OpenZWave (adapt the device path to your needs).</div>
<div>
<b><i><span style="color: blue;">MinOZW /dev/USBzwave</span></i></b></div>
<div>
<br /></div>
<div>
If you get plenty of lines, showing exchange with the USB Device, your setup is successfully completed.</div>
</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com1tag:blogger.com,1999:blog-8547845480464472138.post-1405324055990362922016-05-29T15:07:00.000+02:002016-05-29T15:07:10.819+02:00Ensure to have the same path for a specific USB device<div dir="ltr" style="text-align: left;" trbidi="on">
This article explains how to ensure to have the same path for a specific USB Device on Raspberry Pi 3, on Fedora 23 Minimal version. It should be useful for all other kind of GNU/Linux installation.<br />
<a name='more'></a>If you need to install or complete your Raspberry Pi 3 installation on Fedora 23 Minimal version, for the most lightweight, you can read <a href="http://bertrandbenoit.blogspot.fr/2016/04/12-install-fedora-23-minimal-version.html">part 1</a>, and <a href="http://bertrandbenoit.blogspot.fr/2016/04/22-install-fedora-23-minimal-version.html">part 2</a> of my articles.<br />
<br />
When we plug/unplug several times an USB device, its device path can change.<br />
<br />
This article will take the example of the <b><i>Aotec Z-Stick Gen5 Z-Wave+</i></b>, but following instructions can be applied for any USB device.<br />
<br />
Install some additional tools<br /><span style="color: blue;"><b><i>dnf install usbutils</i></b></span><br />
<br />
<b><u>Find <i>idVendor</i> and the <i>idProduct</i> of your USB Device</u></b><br />
You need to find the <b><i>idVendor</i></b> and the <b><i>idProduct</i></b> of your USB Device; there are at least 3 ways to do that.<br />
<u><br /></u>
<u>Method 1 (works in any case) :</u><br />
<br />
<ul style="text-align: left;">
<li>plug the USB device</li>
<li>run <b><i><span style="color: blue;">dmesg</span></i></b></li>
<li>look for lines like</li>
</ul>
<br />
<blockquote class="tr_bq">
usb 1-1.4: new full-speed USB device number 6 using dwc_otg<br />usb 1-1.4: New USB device found, idVendor=0658, idProduct=0200<br />usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0<br />cdc_acm 1-1.4:1.0: ttyACM0: USB ACM device</blockquote>
<div>
You just found the needed IDs.</div>
<br />
<u>Method 2 (you must be able to identify the device from the vendor name) :</u><br />
<br />
<ul style="text-align: left;">
<li>run <b><i><span style="color: blue;">lsusb</span></i></b></li>
<li>look for the line corresponding to the product</li>
</ul>
<br />
For instance:<br />
<blockquote class="tr_bq">
Bus 001 Device 006: ID 0658:0200 Sigma Designs, Inc.</blockquote>
The ID information corresponds to <b><i>idVendor</i></b>:<b><i>idProduct</i></b>.<br />
<br />
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
</div>
<ul style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;"></ul>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;">
<u>Method 3 (you must know the current device path) :</u></div>
For instance, the Method 1 gives the device sub-path => <b><i>ttyACM0</i></b>.<br />
Run the following command<br />
<b><i><span style="color: blue;">udevadm info /dev/ttyACM0</span></i></b><br />
<br />
You will get plenty of information, including the needed IDs.<br />
<br />
<br />
<b><u>Ensure to have the same path for this specific USB device</u></b><br />
To do that, you only need to create/update a <b><i>/etc/udev/rules.d/50-usb-serial.rules</i></b> file with good information.<br />
It will ensure the same symbolic link is created for the corresponding USB device.<br />
<br />
You only need to adapt the value of <b><i>idVendor</i></b> (0658 here), <b><i>idProduct</i></b> (0200 here) and <b><i>SYMLINK+</i></b> (USBzwave here).<br />
<br />
<b><i><span style="color: blue;">sudo cat <<EOF > </span><span style="color: blue;">/etc/udev/rules.d/50-usb-serial.rules</span></i></b><br />
<b><i><span style="color: blue;">SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="USBzwave", GROUP="dialout", MODE="0666"</span></i></b><br />
<b><i><span style="color: blue;">EOF</span></i></b><br />
<br />
Reboot your Raspberry Pi, or your computer.<br />
<br />
Now, whenever you reboot, plug/unplug the USB device, it will always be reachable with the device path <b><i><span style="color: blue;">/dev/USBzwave</span></i></b> (or whatever you defined in <b><i>SYMLINK+</i></b>).<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-52470267536918809772016-04-18T19:16:00.000+02:002016-04-18T19:16:56.325+02:00Setup Raspberry Pi 3 Sound - on Fedora 23 Minimal version<div dir="ltr" style="text-align: left;" trbidi="on">
This article explains how to properly setup Raspberry Pi 3 Sound, on Fedora 23 Minimal version (but it should be usable for other distribution).<br />
If you need to install or complete your Raspberry Pi 3 installation on Fedora 23 Minimal version, for the most lightweight, you can read <a href="http://bertrandbenoit.blogspot.fr/2016/04/12-install-fedora-23-minimal-version.html">part 1</a>, and <a href="http://bertrandbenoit.blogspot.fr/2016/04/22-install-fedora-23-minimal-version.html">part 2</a> of my articles.<br />
<br />
<a name='more'></a><br />
Update the <b><i>/boot/config.txt</i></b> configuration file, to update the Device Tree<br />
<b><i><span style="color: blue;">sudo echo "dtparam=audio=on" >> /boot/config.txt</span></i></b><br />
<br />
Ensure Sound module is loaded at boot time<br />
<b><i><span style="color: blue;">sudo cat <<EOF > /etc/modules-load.d/sound_bcm2835.conf</span></i></b><br />
<b><i><span style="color: blue;"># Loads Raspberry Pi 3 sound module at boot time.</span></i></b><br />
<b><i><span style="color: blue;">snd_bcm2835</span></i></b><br />
<b><i><span style="color: blue;">EOF</span></i></b><br />
<br class="Apple-interchange-newline" />
Add your no-root user in <b><i>audio</i></b> group (adapt user name)<br />
<b><i><span style="color: blue;">usermod -aG audio bsquare</span></i></b><br />
<div>
<b><i><span style="color: blue;"><br /></span></i></b></div>
Reboot the Raspberry Pi 3.<br />
<br />
<br />
Install some more packages<br />
<b><i><span style="color: blue;">sudo dnf install </span></i></b><span style="color: blue;"><b><i>alsa-utils </i></b></span><b><i><span style="color: blue;">gcc</span></i></b><br />
<br />
Test sound on analog output<br />
<b><i><span style="color: blue;">cd /opt/vc/src/hello_pi</span></i></b><br />
<b><i><span style="color: blue;">sudo make -C libs/ilclient</span></i></b><br />
<b><i><span style="color: blue;">cd hello_audio</span></i></b><br />
<b><i><span style="color: blue;">sudo make</span></i></b><br />
<b><i><span style="color: blue;">sudo ./hello_audio.bin</span></i></b><br />
<br />
Test sound on HDMI output (after previous instructions)<br />
<b><i><span style="color: blue;">sudo ./hello_audio.bin 1</span></i></b><br />
<br />
All the following instructions can/should be executed by the no-root user.<br />
<br />
List availables soundcards<br />
<b><i><span style="color: blue;">aplay -L</span></i></b><br />
<br />
List available sound controls<br />
<b><i><span style="color: blue;">amixer scontrols</span></i></b><br />
<br />
Define the analog as default output (possible values: 0=auto, 1=analog, 2=hdmi)<br />
<b><i><span style="color: blue;">amixer -c 0 cset numid=3 1</span></i></b><br />
<br />
Define the volume (adapt to your needs)<br />
<b><i><span style="color: blue;">amixer -c 0 sset 'PCM' 95%</span></i></b><br />
<br />
Check sound is working properly<br />
<b><i><span style="color: blue;">speaker-test -t sine -f 600</span></i></b><br />
<br />
Check sound is working properly - alternative<br />
<b><i><span style="color: blue;">speaker-test -t wav -c 2</span></i></b><br />
<br />
Check sound is working properly - alternative<br />
<b><i><span style="color: blue;">aplay /usr/share/sounds/alsa/Front_Center.wav</span></i></b><br />
<br />
That's it, your Raspberry Pi 3 Sound hardware is now fully operationnal.</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com1tag:blogger.com,1999:blog-8547845480464472138.post-90605776424128813082016-04-17T15:37:00.000+02:002016-04-17T15:37:29.970+02:00[2/2] Install Fedora 23 Minimal version (lightweight) on Raspberry Pi 3<div dir="ltr" style="text-align: left;" trbidi="on">
This article explains how to complete installation of the most lightweight Fedora 23 Minimal Version on a Raspberry Pi 3, including full Wifi support, automatic @IP binding connecting to your DHCP server, and various interesting things.<br />
You must follow <a href="http://bertrandbenoit.blogspot.fr/2016/04/12-install-fedora-23-minimal-version.html">the instructions of the first part</a> prior to this one.<br />
<br />
<a name='more'></a>In addition to the following instructions, you can get some some others on <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Booting_Fedora">Fedora documentation</a>.<br />
<br />
<h2 style="text-align: left;">
Preparing the first Boot</h2>
Before Powering on your Raspberry Pi 3, insert the microSD card (prepared during the first part of this article), plug it to your network (thanks to ethernet cable), plug USB Keyboard, connect to an HDMI monitor (you can use any adapter to DVI or VGA).<br />
<br />
<h2 style="text-align: left;">
First boot - Wizard</h2>
First check: as soon as you power on the Raspberry Pi 3, you should see the firmware loading on your monitor.<br />
If it is not the case:<br />
<br />
<ul style="text-align: left;">
<li>ensure microSD card is correctly inserted</li>
<li>ensure you properly created the partitions, as explained in <a href="http://bertrandbenoit.blogspot.fr/2016/04/12-install-fedora-23-minimal-version.html">the first part article</a>, the first partition must be a <b><u>primary</u></b> and <b><u>FAT32</u></b> one</li>
<li>ensure you installed the Raspberry firmware in this boot partition</li>
</ul>
<br />
Second check: after firmware loading, you should see Fedora booting and services initialization like you used to see.<br />
If it is not the case:<br />
<br />
<ul style="text-align: left;">
<li>ensure you created properly the <b><i>/boot/cmdline.txt</i></b> file (for instance, ensure the root path is exactly specified like that: <b><i>root=/dev/mmcblk0p3</i></b>) </li>
<li>ensure/check your <b><i>/boot/config.txt</i></b> file</li>
</ul>
<br />
If all is OK, you will reach the Wizard allowing you to define your locale, create a non-root user ...<br />
Once done, you can reboot your Raspberry Pi 3.<br />
<br />
<h2 style="text-align: left;">
Next boot - Some tips</h2>
<h4 style="text-align: left;">
Update your keyboard layout (keymaps) and/or Fonts</h4>
<div style="text-align: left;">
First of all, if you want to change <b>keyboard layout</b>, or <b>fonts</b> (e.g. you chose a bad locale in the Wizard), you can update your <b><i>/etc/vconsole.conf</i></b> file.</div>
To know which keymaps are available, you can run<br />
<b><i><span style="color: blue;">localectl list-keymaps</span></i></b><br />
<br />
You can <b><i>grep</i></b> the result with a locale (e.g. 'en', 'fr' ...).<br />
<br />
This is an example of the <b><i>/etc/vconsole.conf</i></b> file contents<br />
<b><i><span style="color: blue;">KEYMAP=en-latin9</span></i></b><br />
<b><i><span style="color: blue;">FONT="eurlatgr"</span></i></b><br />
<div>
<br /></div>
For the Fonts, you can follow <a href="http://bertrandbenoit.blogspot.fr/2016/04/fix-font-issue-after-fedora-upgrade.html">these instructions</a> (all but instructions about Grub, because Grub is NOT used on the Raspberry Pi 3).<br />
<br />
Reboot for any change to take effect.<br />
<br />
<h4 style="text-align: left;">
Update Hostname</h4>
Define the hostname of your Raspberry Pi 3 (e.g. rpi)<br />
<b><i><span style="color: blue;">sudo echo "rpi" > /etc/hostname</span></i></b><br />
<br />
<h4 style="text-align: left;">
Prevent from some errors like 'error while loading shared libraries'</h4>
Create a file in /etc/profile.d to define some common paths update (let's call it /etc/profile.d/variousEnvironment.sh)<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">cat <</span></i></b><b><i><span style="color: blue;"><EOF</span></i></b><b><i><span style="color: blue;"> </span></i></b><b><i><span style="color: blue;">> </span></i></b><b><i><span style="color: blue;">/etc/profile.d/variousEnvironment.sh</span></i></b><br />
<b><i><span style="color: blue;">#!/bin/bash</span></i></b><br />
<span style="color: blue;"><b><i><br /></i></b></span>
<span style="color: blue;"><b><i>export PATH=$PATH:/opt/vc/bin</i></b></span><br />
<b><i><span style="color: blue;">export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/opt/vc/lib:$LD_LIBRARY_PATH</span></i></b><br />
<b><i><span style="color: blue;">EOF</span></i></b><br />
<br />
<h4 style="text-align: left;">
Disable IPv6</h4>
If you want to <b><i>disable ipv6 support</i></b>, you can't do it using modprobe blacklist, or using sysctl tool, because the running Kernel is NOT a Fedora one, but the one embedded in Raspberry Pi 3 firmware.<br />
To disable ipv6, you can add <b><i>ipv6.disable=1</i></b> option in the <b><i>/boot/cmdline.txt</i></b> file, for instance<br />
<b><i><span style="color: blue;">dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline ipv6.disable=1 rootwait</span></i></b><br />
<br />
<h2 style="text-align: left;">
Update the operating system</h2>
To keep on having the most lightweight installation, you can remove useless (or failing) packages (tips: removing kernel packages will free space on your small <b><i>/boot</i></b> partition)<br />
<b><i><span style="color: blue;">sudo dnf remove kernel kernel-core kernel-modules audit</span></i></b><br />
<br />
You can then update your Fedora<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">dnf update</span></i></b><br />
<br />
<h2>
Update the firmware</h2>
Install some more packages<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">dnf install binutils tar wget</span></i></b><br />
<br />
Download the Raspberry Pi Firmware updater, and "install" it as an user binary<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">wget https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update -O /usr/sbin/rpi-update</span></i></b><br />
<br />
If you didn't reboot yet, you can update your environment variables with the file you created in the Tips part<br />
<b><i><span style="color: blue;">source /etc/profile.d/variousEnvironment.sh</span></i></b><br />
<br />
You can check the Firmware version before/after update<br />
<b><i><span style="color: blue;">sudo vcgencmd version</span></i></b><br />
<br />
Update the firmware<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">rpi-update</span></i></b><br />
<br />
You can run this last instruction whenever you want (e.g. in new firmware version's release notes, there are some bugs fix interested for you).<br />
If a new version is installed, reboot your Raspberry Pi 3.<br />
<br />
<h2 style="text-align: left;">
Wifi setup</h2>
Install the missing Firmware for the Wifi controller of Raspberry Pi 3<br />
<b><i><span style="color: blue;">wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm80211/brcm/brcmfmac43430-sdio.bin -O /lib/firmware/brcm/brcmfmac43430-sdio.bin</span></i></b><br />
<b><i><span style="color: blue;">wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm80211/brcm/brcmfmac43430-sdio.txt -O /lib/firmware/brcm/brcmfmac43430-sdio.txt</span></i></b><br />
<br />
Ensure it is loaded at boot time<br />
<b><i><span style="color: blue;">sudo cat <</span></i></b><b><i><span style="color: blue;"><EOF</span></i></b><b><i><span style="color: blue;"> </span></i></b><b><i><span style="color: blue;">> </span></i></b><span style="color: blue;"><b><i>/etc/modules-load.d/wifi_brcmfmac.conf</i></b></span><br />
<span style="color: blue;"><b><i># Loads Raspberry Pi 3 Wifi module at boot time.</i></b></span><br />
<span style="color: blue;"><b><i>brcmfmac</i></b></span><br />
<span style="color: blue;"><b><i>EOF</i></b></span><br />
<br />
Install some more packages<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">dnf install </span></i></b><span style="color: blue;"><b><i>net-tools wireless-tools</i></b></span><br />
<br />
Install some more packages if your Wifi Network requires a WPA key (recommended !)<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">dnf install </span></i></b><span style="color: blue;"><b><i>wpa_supplicant</i></b></span><br />
<br />
Otherwise, install some other packages if your Wifi Network requires a simple WEP key<br />
<b><i><span style="color: blue;">sudo </span></i></b><b><i><span style="color: blue;">dnf install </span></i></b><span style="color: blue;"><b><i>NetworkManager-wifi</i></b></span><br />
<br />
In this guide, the following instructions will consider your Wifi Network requires a <b><i>WPA key</i></b>.<br />
If it's not the case, you may consider updating your network for <b><i>better security</i></b>, or to look for a simpler guide to setup your Wifi connection with NetworkManager.<br />
<br />
Define WPA configuration (replace <b><i><span style="color: blue;">SSID_NAME</span></i></b> by your Wifi Network SSID)<br />
<b><i><span style="color: blue;">sudo wpa_passphrase SSID_NAME >> /etc/wpa_supplicant/wpa_supplicant.conf</span></i></b><br />
<b><i><span style="color: blue;"><then enter="" key="" wifi="" wpa="" your=""></then></span></i></b>Then enter your Wifi WPA Key<br />
<br />
Update the INTERFACES variable in <b><i>/etc/sysconfig/wpa_supplicant</i></b> (keep the -i option which is needed by wpa_supplicant)<br />
<b><i><span style="color: blue;">INTERFACES="-iwlan0"</span></i></b><br />
<br />
From now, your Raspberry Pi 3 should be able to connect to your Wifi network, before completing the configuration, you can check it<br />
<b><i><span style="color: blue;">sudo systemctl start wpa_supplicant</span></i></b><br />
<b><i><span style="color: blue;">iwconfig wlan0</span></i></b><br />
<br />
If everything is OK, <b><i>iwconfig</i></b> should show you information like "Access point", "Link Quality" and "Signal Level" as witnesses to a successful connection.<br />
Otherwise, you should check your configuration (e.g. WPA key, wpa_supplicant configuration, wpa_supplicant service status ...).<br />
To check status of wpa_supplicant service<br />
<b><i><span style="color: blue;">sudo systemctl status wpa_supplicant</span></i></b><br />
<br />
It's the good time to update your <b><i>DHCP server</i></b> (no matter whether it's a dedicated router, your Internet Provider Box, or a software like dnsmasq ...) to define the <b><i>@IP</i></b> you want to bind your Raspberry Pi 3.<br />
You'll find the <b><i>@MAC</i></b> of your Raspberry Pi 3 as the <b><i>ether</i></b> information, of wlan0 interface<br />
<b><i><span style="color: blue;">ifconfig wlan0</span></i></b><br />
<br />
Once done, you can request the DHCP server to automatically get @IP address<br />
<b><i><span style="color: blue;">sudo dhclient wlan0 -v</span></i></b><br />
<br />
You will see which is the responding <b><i>DHCP server</i></b>, which is the <b><i>@MAC</i></b> sent by the Raspberry Pi 3, and which <b><i>@IP address</i></b> is finally bound to it.<br />
<br />
Eventually, you need to setup an user service allowing to automatically call dhclient at boot time as soon as wpa_supplicant service has successfully started.<br />
<b><i><span style="color: blue;">sudo cat <</span></i></b><b><i><span style="color: blue;"><EOF</span></i></b><b><i><span style="color: blue;"><eof> </eof></span></i></b><b><i><span style="color: blue;">> </span></i></b><b><i><span style="color: blue;"><eof>/usr/lib/systemd/system/rpiAutoWifi.service</eof></span></i></b><br />
<b><i><span style="color: blue;">[Unit]</span></i></b><br />
<b><i><span style="color: blue;">Description=Automatic RPI Wifi Boot Activator</span></i></b><br />
<b><i><span style="color: blue;">After=wpa_supplicant.target</span></i></b><br />
<b><i><span style="color: blue;">Wants=wpa_supplicant.target</span></i></b><br />
<b><i><span style="color: blue;"><br /></span></i></b>
<b><i><span style="color: blue;">[Service]</span></i></b><br />
<b><i><span style="color: blue;">ExecStart=/usr/sbin/dhclient wlan0 -v</span></i></b><br />
<b><i><span style="color: blue;"><br /></span></i></b>
<b><i><span style="color: blue;">[Install]</span></i></b><br />
<b><i><span style="color: blue;">WantedBy=multi-user.target</span></i></b><br />
<b><i><span style="color: blue;">EOF</span></i></b><br />
<br />
Enable the service<br />
<b><i><span style="color: blue;">sudo systemctl enable rpiAutoWifi</span></i></b><br />
<br />
<br />
You can then reboot your Raspberry Pi 3, and check everything is OK.<br />
<b><i><span style="color: blue;">sudo systemctl status wpa_supplicant</span></i></b><br />
<b><i><span style="color: blue;">sudo systemctl status rpiAutoWifi</span></i></b><br />
<b><i><span style="color: blue;">ifconfig</span></i></b><br />
<br />
If it's OK, you can now enable sshd service, and unplug the ethernet cable definitively.<br />
<b><i><span style="color: blue;">sudo systemctl enable sshd</span></i></b><br />
<br />
<h2 style="text-align: left;">
Conclusion</h2>
Your Raspberry Pi 3 is now ready to be managed remotly by SSH, you should have saved as much space as possible with this most lightweight Fedora 23 installation.<br />
<br />
Next articles will explain how to setup Sound and Bluetooth.<br />
<br />
The following ones will explain how to install Zwave controller support, and various interesting Domotics Software like OpenHab, Domoticz or Jeedom.</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-63556399330942694002016-04-13T22:05:00.002+02:002018-03-22T16:18:35.196+01:00[1/2] Install Fedora 23 Minimal version (lightweight) on Raspberry Pi 3<div dir="ltr" style="text-align: left;" trbidi="on">
This article explains how to install the most lightweight Fedora 23 Minimal Version on a microSD card, dedicated to a Raspberry Pi 3.<br />
If you're looking for<br />
<a name='more'></a><br />
an installation with only essentials packages and configuration, with access to all of the Raspberry Pi 3 hardware, only in 'text mode' and dedicated to remote use after setup, you are in the good place.<br />
<br />
On the other hand, if you're willing to setup an OS with graphical desktop environment, you may complete your readings with <a href="https://hobo.house/2016/03/13/installing-fedora-linux-on-the-raspberry-pi-3/">this article</a> explaining how to setup Fedora 23 with XFCE.<br />
In any case, the <a href="https://fedoraproject.org/wiki/Raspberry_Pi">Fedora documentation</a> is interesting.<br />
And you may find some additional information on <a href="https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/">this article</a>, about Fedora 22/23 installation on Raspberry Pi 2.<br />
<br />
<h2 style="text-align: left;">
Preparation</h2>
First of all, you need to download:<br />
- the <a href="https://arm.fedoraproject.org/">Fedora 23 Minimal Version</a> (you can download the Server Version if you're sure you'll need alot of corresponding packages)<br />
- the <a href="https://github.com/raspberrypi/firmware/archive/master.zip">Raspberry Firmware</a><br />
<div style="text-align: left;">
<br /></div>
<h2 style="text-align: left;">
Create and format the partitions</h2>
You can manage the microSD card dedicated to the Raspberry Pi 3 on any card reader, on your computer.<br />
You must create the following partitions:<br />
<br />
<ul style="text-align: left;">
<li>a <b><u>primary</u></b> <b><u>FAT32</u></b> partition* for <b><i>/boot</i></b>, 128 MB is enough (you can a bigger partition if you plan to have lots of kernel versions)</li>
<li>a swap partition, 512MB (or even 1024MB if you have plenty of space)</li>
<li>a <b><u>primary</u></b> <b><u>Linux</u></b> partition for <b><i>/</i></b></li>
<li>(optional) some other Linux partitions (e.g. /home ...)</li>
</ul>
<br />
* Raspberry is expecting this partition as the first one (and MUST be a primary partition)<br />
<br />
You can follow <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Creating_a_custom_partition_layout">these instructions</a>, whilst adapting size to your needs.<br />
Then you can <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Formating_the_SD_card_partitions">format the partitions</a>; if you want, you may format the Linux partitions as Xfs or ReiserFS, instead of ext4.<br />
<br />
You can follow the Fedora Project instructions to <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Mounting_the_SD_card">mount the SD card partitions</a>.<br />
Let's say you mounted the SD card partitions on <b><i>/mnt/rpi</i></b>, and Fedora image on <b><i>/mnt/fedoraImage </i></b>(otherwise, adapt the paths in following instructions).<br />
<div style="text-align: left;">
<br /></div>
<h2 style="text-align: left;">
Prepare the boot partition</h2>
Follow these instructions to <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Populating_the_boot_partition">download the firmware</a>, and uncompress it.<br />
Then, you can copy the firmware files to the boot partition using rsync<br />
<b><i><span style="color: blue;">rsync -av firmware-master/boot/ /mnt/rpi/boot/</span></i></b><br />
<b><i><span style="color: blue;">rsync -av firmware-master/modules/ /</span></i></b><b><i><span style="color: blue;">mnt</span></i></b><b><i><span style="color: blue;">/rpi/lib/modules</span></i></b><br />
<div>
<br /></div>
The Raspberry Kernel reads the mandatory file <b><i>/mnt/rpi/boot/cmdline.txt</i></b><br />
For instance, you can create it with this line<br />
<b><i><span style="color: blue;">dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline ipv6.disable=1 rootwait</span></i></b><br />
<div>
</div>
<br />
Adapt this line to your needs, keeping in mind:<br />
<br />
<ul style="text-align: left;">
<li>don't change <b><i>/dev/mmcblk0p3</i></b>, it is the way your 3rd partition will be named on the Raspberry </li>
<li>you can adapt <b><i>rootfstype</i></b> to your root partition format</li>
<li><b><i>ipv6.disable=1</i></b> is optional, and you can add more options according to your needs</li>
</ul>
<br />
<br />
Eventually, you can create the <a href="https://www.raspberrypi.org/documentation/configuration/config-txt.md">configuration file</a> <b><i>/mnt/rpi/boot/config.txt</i></b> file to define BIOS-like options, with this contents (you can add all additional configuration options you want)<br />
<b><i><span style="color: blue;">disable_overscan=1</span></i></b><br />
<b><i><span style="color: blue;">hdmi_force_hotplug=1</span></i></b><br />
<b><i><span style="color: blue;">hdmi_group=1</span></i></b><br />
<b><i><span style="color: blue;">hdmi_mode=16</span></i></b><br />
<div>
<br /></div>
<h2 style="text-align: left;">
Prepare the root partition</h2>
You can follow <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Populating_the_root_partition">these instructions</a> to populate the root partition.<br />
To copy the Fedora image's files to the root partition using rsync<br />
<b><i><span style="color: blue;">rsync -av /mnt/fedoraImage/ /mnt/rpi/</span></i></b><br />
<br />
<div>
Eventually, you must create the fstab file, following <a href="https://fedoraproject.org/wiki/Raspberry_Pi#Setting_up_fstab">these instructions</a>.<br />
Adapt the instructions:<br />
<br />
<ul style="text-align: left;">
<li>for the root partition file system if you formatted it with something different from ext4</li>
<li>add equivalent lines for any additional partitions you created (e.g. /home ...)</li>
</ul>
</div>
<div style="text-align: left;">
<br /></div>
<h2 style="text-align: left;">
Finalization</h2>
Ensure all data are flushed on the SD card<br />
<b><span style="color: blue;"><i>sync</i></span></b><br />
<br />
You can now:<br />
<br />
<ul style="text-align: left;">
<li>unmount the SD card partitions</li>
<li>unmount the Fedora image</li>
<li>eject the card reader</li>
<li>put the SD card in your Raspberry Pi 3 and start it !</li>
</ul>
<br />
<br />
The next article will give instructions to conclude the installation (including Wifi, automatic @IP address at boot time delivered by DHCP ...) directly on the running Raspberry Pi 3.<br />
<br />
<br />
<br />
<b><u>Edit (22nd March 2018) : </u></b>The partitions management are now very eased by the fedora-arm-installer tool.<br />
<br />
Cf. https://fedoraproject.org/wiki/Architectures/ARM/Raspberry_Pi?rd=Raspberry_Pi#Fedora_or_other_Linux_Distributions<br />
<br />
<br />
<br />
<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-32518765175278475152016-04-10T21:52:00.001+02:002016-04-10T21:52:32.880+02:00Easily get log messages of a specific service from the current boot (with journalctl)<div dir="ltr" style="text-align: left;" trbidi="on">
Although systemd improved greatly alot of things compared to system V, logs can become messy.<br />
You can very easily get<br />
<a name='more'></a><br />
log messages of a specific service from the current boot (with journalctl).<br />
<br />
For instance, let's say you want to check everything about your NetworkManager service<br />
<span style="color: blue;"><b><i>journalctl --boot -u NetworkManager</i></b></span><br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-43115931507334166482016-04-06T21:07:00.001+02:002016-04-06T21:07:25.034+02:00Find easily a package with dnf or yum providing a library, header ...<div dir="ltr" style="text-align: left;" trbidi="on">
Although it's not always well known, dnf (and yum) supports a very interesting and powerful command: <b><i>provides</i></b>.<br />
For instance, it's very useful to fix issue like<br />
<a name='more'></a><br />
<br />
libxxx.h not found, or libxyz.so.1.2 not found ...<br /><br />
For example, let's say you get the following error while compiling some driver:<br />
<blockquote class="tr_bq">
libudev.h not found</blockquote>
<br />
You can fix it very quickly like this (the star and slash are very important because you don't know yet the path of the file in the package which provides it)<br />
<b><i><span style="color: blue;">dnf provides */libudev.h</span></i></b><br />
<br />
In this example, you'll get something like that<br />
<blockquote class="tr_bq">
systemd-devel-222-14.fc23.i686 : Development headers for systemd<br />Repo : updates<br />systemd-devel-222-14.fc23.x86_64 : Development headers for systemd<br />Repo : updates<br />systemd-devel-222-7.fc23.i686 : Development headers for systemd<br />Repo : fedora<br />systemd-devel-222-7.fc23.x86_64 : Development headers for systemd<br />Repo : fedora</blockquote>
Eventually, you only have to install it<br />
<b><i><span style="color: blue;">sudo dnf install systemd-devel</span></i></b><br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-45167823247022259612016-04-04T18:49:00.000+02:002016-04-04T18:49:15.835+02:00Fix Font issue after Fedora Upgrade<div dir="ltr" style="text-align: left;" trbidi="on">
After upgrading Fedora, you may face fonts issue because the default value has changed, but has not been updated during the upgrade process.<br />
<a name='more'></a><br />
For instance it can be the case after <a href="http://bertrandbenoit.blogspot.fr/2016/03/upgrade-gnulinux-fedora-from-18-to-22.html">Upgrading Fedora on several versions</a>, on a single iteration.<br />
<br />
First of all, you must check your <b><i>/etc/vconsole.conf</i></b> file, and see the value of <b><i>FONT</i></b>.<br />
On some old Fedora version, it was defined like that:<br />
<b><i><span style="color: blue;">FONT=True</span></i></b><br />
<br />
On newer Fedora version, it's usually defined like that on Desktop version:<br />
<b><i><span style="color: blue;">FONT=latarcyrheb-sun16</span></i></b><br />
<br />
You must check if the corresponding Font file is installed properly, in /usr/lib/kbd/; for instance:<br />
<b><i><span style="color: blue;">source /etc/vconsole.conf && find /usr/lib/kbd/ -iname "$FONT*"</span></i></b><br />
<br />
If the command returns nothing, you just found your issue!<br />
<br />
Now you must update this FONT definition (e.g. with <b><i><span style="color: blue;">latarcyrheb-sun16</span></i></b>, and perform again the find instruction to ensure this time it's OK).<br />
<br />
<br />
Then you must check if the same issue doesn't exist in the Grub definition, checking the <b><i><span style="color: blue;">GRUB_CMDLINE_LINUX</span></i></b> variable defined in the <b><i>/etc/sysconfig/grub</i></b> file.<br />
You must have something like that (adapt to your <b><i><span style="color: blue;">FONT</span></i></b> definition):<br />
vconsole.font=latarcyrheb-sun16<br />
<br />
Then, you must update your Grub menu:<br />
<b><i><span style="color: blue;">grub2-mkconfig -o /boot/grub2/grub.cfg</span></i></b><br />
<br />
<br />
Eventually, reboot and enjoy the fix.<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-27948213069476471362016-04-03T15:21:00.001+02:002016-04-05T20:59:52.905+02:00Restore previous mouse acceleration behavior on Fedora 22+<div dir="ltr" style="text-align: left;" trbidi="on">
After upgrading Fedora, you may face new mouse acceleration behavior, that looks<br />
<a name='more'></a>strange to you.<br />
<br />
For instance, it seems it can happen after <a href="http://bertrandbenoit.blogspot.fr/2016/03/upgrade-gnulinux-fedora-from-18-to-22.html">Upgrade to Fedora 22 or newer</a>.<br />
<br />
To restore the mouse acceleration behavior we used to have on Fedora 21 and older, you simply need to launch this instruction as root:<br />
<span style="color: blue;"><b><i>cat <<eof> /etc/X11/xorg.conf.d/50-mouse-acceleration.conf</eof></i></b></span><br />
<span style="color: blue;"><b><i>Section "InputClass"</i></b></span><br />
<span style="color: blue;"><b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>Identifier "My Mouse"</i></b></span><br />
<span style="color: blue;"><b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>MatchIsPointer "yes"</i></b></span><br />
<span style="color: blue;"><b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>Option "AccelerationProfile" "-1"</i></b></span><br />
<span style="color: blue;"><b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>Option "AccelerationScheme" "none"</i></b></span><br />
<span style="color: blue;"><b><i><span class="Apple-tab-span" style="white-space: pre;"> </span>Option "AccelSpeed" "-1"</i></b></span><br />
<span style="color: blue;"><b><i>EndSection</i></b></span><br />
<span style="color: blue;"><b><i>EOF</i></b></span><br />
<br />
And then restart X server (or the whole computer).<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-53362305350025451802016-04-03T14:03:00.001+02:002016-04-03T14:13:26.262+02:00Upgrade GNU/Linux Fedora from 21/22 to 23 (with dnf)<div dir="ltr" style="text-align: left;" trbidi="on">
Like explained in <a href="http://bertrandbenoit.blogspot.fr/2016/03/upgrade-gnulinux-fedora-from-18-to-22.html">this article</a>, <a href="https://fedoraproject.org/wiki/FedUp">FEDora UPgrader (fedup) </a>is deprecated since Fedora 21, where <a href="https://fedoraproject.org/wiki/DNF_system_upgrade">DNF system upgrade plugin</a> became the recommended method to upgrade Fedora.<br />
<br />
This article will explain how to use <b><i>dnf</i></b> with its <b><i>system upgrade plugin</i></b>, to Upgrade from Fedora 22 to<br />
<a name='more'></a><br />
Fedora 23 (these instructions should be OK to upgrade from Fedora 21).<br />
<br />
Although the Upgrade process is more and more safe, thanks to advanced tools like dnf, first of all, <b>back up all your important data</b>.<br />
<br />
Like before every upgrade, don't forget to import (and check !) the GPG key of the target distribution:<br />
- for Fedora repositories, check <a href="https://getfedora.org/fr/keys/">this page</a><br />
- for RPM Fusion repositories, check <a href="http://rpmfusion.org/keys">this one</a><br />
<div>
<br /></div>
<div>
<div>
As usual, you should disable the graphical mode during the upgrade process to avoid some issues:</div>
<div>
<b><i><span style="color: blue;">systemctl set-default multi-user.target</span></i></b></div>
<div>
<br /></div>
<div>
Update your current Fedora installation (the --refresh option forced the metadata update)</div>
<div>
<b><i><span style="color: blue;">dnf update --refresh</span></i></b></div>
<div>
<br /></div>
<div>
<div>
If it's not already the case, install the system upgrade plugin of DNF</div>
<div>
<b><i><span style="color: blue;">dnf install dnf-plugin-system-upgrade</span></i></b></div>
<div>
<br /></div>
<div>
Start the Upgrade preparation, requesting the download of target Distribution version packages (adapt the release version to your needs)</div>
<div>
<b><i><span style="color: blue;">dnf system-upgrade download --releasever=23</span></i></b></div>
<div>
<br /></div>
<div>
If ever you have dependencies issues, you <b>MUST</b> resolve them before keeping on.</div>
<div>
For instance, it can happen with third-party repositories' packages, for which you may consider to temporary remove them, and then reinstall them in target Distribution.</div>
<div>
It can happen with packages which are now in conflict (like mariadb which replaced mysql-server package).</div>
<div>
<br /></div>
<div>
You can now request the real upgrade process</div>
<div>
<b><i><span style="color: blue;">dnf system-upgrade reboot</span></i></b></div>
</div>
<div>
<br /></div>
<div>
The system will reboot on the same Kernel, and then start the Upgrade process.</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Before rebooting, you should ensure system is OK.</div>
<div>
To check the services which failed to start:</div>
<div>
<b><i><span style="color: blue;">systemctl --failed</span></i></b></div>
<div>
<br /></div>
<div>
To get status of specific failing service (e.g. kdump):</div>
<div>
<span style="color: blue;"><b><i>systemctl status kdump</i></b></span></div>
<div>
<br /></div>
<div>
To get full log with enhanced information:</div>
<div>
<b><i><span style="color: blue;">journalctl -x</span></i></b></div>
<div>
<br /></div>
<div>
Ensure, there is no <a href="http://bertrandbenoit.blogspot.fr/2007/11/upgrade-gnulinux-fedora-from-7-to-8.html">dependencies problem</a>.</div>
<div>
<br /></div>
<div>
And like usual, check and merge the new configuration files with '<b><i>rpmnew</i></b>' suffix (which can now easily be performed with <a href="https://github.com/xsuchy/rpmconf">rpmconf tool</a>).</div>
<div>
<br /></div>
<div>
After having fixed everything, you can switch back to graphical mode as default:</div>
<div>
<b><i><span style="color: blue;">systemctl set-default graphical.target</span></i></b></div>
<div>
<br /></div>
<div>
Finally reboot and enjoy your upgraded Fedora.</div>
</div>
<div>
<br /></div>
<div>
N.B.: you can check <a href="http://www.if-not-true-then-false.com/2015/fedora-22-to-23-upgrade-dnf/">this article</a> to get some screenshots about the whole Upgrade Process with DNF.</div>
</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-59667748469269120602016-03-28T19:26:00.001+02:002016-04-03T14:13:33.729+02:00Upgrade GNU/Linux Fedora from 18 to 22 (with fedup)<div dir="ltr" style="text-align: left;" trbidi="on">
Although <a href="https://fedoraproject.org/wiki/FedUp">FEDora UPgrader (fedup)</a> has been introduced in Fedora 17, there were too much problems to be used properly.<br />
In addition fedup has been deprecated since<br />
<a name='more'></a><br />
Fedora 21, where <a href="https://fedoraproject.org/wiki/DNF_system_upgrade">DNF system upgrade plugin </a>became the recommended method to upgrade Fedora.<br />
<br />
This article will explain how to use fedup to Upgrade from Fedora 18 to Fedora 22, in a single iteration.<br />
<br />
To begin, unfortunately fedup can't be used to upgrade Fedora 17, because of following issues:<br />
- <a href="https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=980918">bug #980918</a>: fails with error 'NameError: global name 'thislevel' is not defined' (fixed by <a href="https://bugzilla.redhat.com/show_bug.cgi?id=980918#c1">this patch</a>)<br />
- <a href="https://fedoraproject.org/wiki/Common_F20_bugs#fedup-07-fail">Common Bug with fedup 0.7</a>: reboots shortly after booting the System Upgrade option (fixed installing the Fedora 18 fedup 0.8 base version)<br />
- <a href="https://fedoraproject.org/wiki/Common_F20_bugs#fedup-18-gpg">Common Bug with fedup 0.8</a>: fails due to GPG key problems (fixed using the --nogpgcheck option)<br />
- <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1043981">bug #1043981</a>: fails with error 'AttributeError: 'ProblemSummary' object has no attribute 'format_details'' (fixed by <a href="https://github.com/rhinstaller/fedup/commit/01e0419">this patch</a>)<br />
- and eventually ... nothing happens after booting the System Upgrade option<br />
After this long haul, it was obvious fedup was not viable enough to be used on Fedora 17; I recommend to <a href="http://bertrandbenoit.blogspot.fr/2016/03/upgrade-gnulinux-fedora-from-14-to-15.html">upgrade from Fedora 17 to 18 with yum</a>.<br />
<br />
After that, you can use fedup to upgrade directly to Fedora 21 (or even 22) in a single iteration.<br />
As usual, you should disable the graphical mode during the upgrade process to avoid some issues:<br />
<b><i><span style="color: blue;">systemctl set-default multi-user.target</span></i></b><br />
<br />
Then, you may have some issues with kmod packages, like those for <a href="https://www.virtualbox.org/">VirtualBox</a>, or deprecated packages. Simply uninstall them for now, keep them in mind (or on a paper) and reinstall them in the target distribution.<br />
<br />
There is some situation where there are conflicts between packages because they have been fully replaced. For instance it's the case with <b><i>mariadb</i></b> and <b><i>mariadb-server</i></b> packages which replaced <b><i>mysql</i></b> and <b><i>mysql-server</i></b> ones.<br />
<br />
It may be interesting to keep several kernel versions in case you need to switch back to a previous version to fix/manage some hardware issues (I faced none with my <a href="http://bertrandbenoit.blogspot.fr/2011/07/manage-intel-raid-under-gnulinux-using.html">RAID managed with mdadm</a> - but only 2 resync for which I paused the upgrade process till the end, for stability & data security reason).<br />
For that, you can update the <b><i><span style="color: blue;">installonly_limit</span></i></b> parameter of your package manager configuration file (<b><i><span style="color: blue;">/etc/dnf/dnf.conf</span></i></b> or <i><b><span style="color: blue;">/etc/yum.conf</span></b></i>).<br />
<br />
You can then prepare the upgrade process, launching fedup:<br />
<b><i><span style="color: blue;">dnf install fedup</span></i></b><br />
<b><i><span style="color: blue;">fedup --network 22 --nogpgcheck</span></i></b><br />
<br />
If anything goes wrong, you should consider fixing the issue before keeping on.<br />
<br />
When everything is OK, you can then reboot, and select the <b><i>new fedup option</i></b> in the Boot Menu.<br />
After booting like usual, the system will then upgrade all the packages one after the other (like we used to see with yum upgrade). Check <a href="https://fedoraproject.org/wiki/FedUp#How_Can_I_Upgrade_My_System_with_FedUp.3F">this page</a> for more information.<br />
<br />
Before rebooting, you should ensure system is OK.<br />
To check the services which failed to start:<br />
<b><i><span style="color: blue;">systemctl --failed</span></i></b><br />
<br />
To get status of specific failing service (e.g. kdump):<br />
<b><i><span style="color: blue;">systemctl status kdump</span></i></b><br />
<br />
To get full log with enhanced information:<br />
<b><i><span style="color: blue;">journalctl -x</span></i></b><br />
<div>
<br /></div>
<div>
Ensure, there is no <a href="http://bertrandbenoit.blogspot.fr/2007/11/upgrade-gnulinux-fedora-from-7-to-8.html">dependencies problem</a>.</div>
<div>
<br /></div>
<div>
And like usual, check and merge the new configuration files with '<b><i>rpmnew</i></b>' suffix (which can now easily be performed with <a href="https://github.com/xsuchy/rpmconf">rpmconf tool</a>).</div>
<div>
<br /></div>
After having fixed everything, you can switch back to graphical mode as default:<br />
<b><i><span style="color: blue;">systemctl set-default graphical.target</span></i></b><br />
<br />
Finally reboot and enjoy your upgraded Fedora - remember to reinstall things if you removed them before upgrading process (like VirtualBox).</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-68808921400501162952016-03-27T21:53:00.000+02:002016-03-27T22:04:56.552+02:00Upgrade GNU/Linux Fedora from 14 to 15, 16, 17 and eventually 18 (with yum)<div dir="ltr" style="text-align: left;" trbidi="on">
To upgrade GNU/Linux Fedora from 14 to 15, 16, 17 and eventually 18 with yum, there is no problem; you can follow the same instructions from<br />
<a name='more'></a><br />
<a href="http://bertrandbenoit.blogspot.fr/2011/03/upgrade-gnulinux-fedora-from-10-to-11.html">this post</a>.<br />
<br />
The yum options <b><i>--releasever</i></b> and <b><i>--distro-sync</i></b> introduced in Fedora 12 are very useful.<br />
<br />
You can explore the <a href="https://fedoraproject.org/wiki/Upgrading_Fedora_using_package_manager?rd=Upgrading_Fedora_using_yum#Update_yum_to_latest_version_available_in_your_Fedora_version">Fedora documentation</a> to get a modus operandi, and still find interesting instructions on <a href="http://bertrandbenoit.blogspot.fr/2009/01/upgrade-gnulinux-fedora-from-8-to-9.html">this post</a>.<br />
<br />
Don't forget to import (and check !) the GPG key of the target distribution:<br />
- for Fedora repositories, check <a href="https://getfedora.org/fr/keys/">this page</a><br />
- for RPM Fusion repositories, check <a href="http://rpmfusion.org/keys">this one</a><br />
<br />
For instance, to upgrade from Fedora 17 to 18:<br />
<i><span style="color: blue;"><b>rpm --import <a href="https://fedoraproject.org/static/DE7F38BD.txt">https://fedoraproject.org/static/DE7F38BD.txt</a></b></span></i><br />
<div>
<i><span style="color: blue;"><br /></span></i></div>
And like after any Fedora upgrade:<br />
- ensure there is no dependencies problem like explained into <a href="http://bertrandbenoit.blogspot.fr/2007/11/upgrade-gnulinux-fedora-from-7-to-8.html">this post</a>.<br />
- perform a great configuration files merging campaign to ensure having the up to date features while keeping your own specific configuration (globally the XXX.conf and XXX.conf.rpmnew files).<br />
<br />
For next upgrade, I'll post article about:<br />
- Fedora upgrade from 18 to 22 with <a href="https://fedoraproject.org/wiki/FedUp">fedup</a><br />
- Fedora upgrade from 22 to 23 with <a href="https://fedoraproject.org/wiki/Features/DNF">dnf</a><br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-63293437750194867512016-03-24T08:56:00.000+01:002016-03-24T08:57:36.661+01:00I'll be back<div dir="ltr" style="text-align: left;" trbidi="on">
Hi everyone,<br />
<br />
I'm pleased to announce I'm now out of few cryonics years ...<br />
I was somehow <a href="https://en.wikipedia.org/wiki/Sliders">sliding between parallel universes</a> and eventually find back the good one ...<br />
blah blah blah ...<br />
<br />
<br />
In coming weeks, be ready to read some exciting articles about 3D Printing, Raspberry Pi 3, Domotics, and some more interesting topics!</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-18472881608161030812013-12-30T11:48:00.001+01:002013-12-30T11:49:24.539+01:00UEFI secure boot and Kernel modules load<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface">UEFI</a> is increasingly widespread in recent years.<br />
More recently, the <a href="http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_boot">Secure Boot</a> is becoming <br />
<a name='more'></a>a standard.<br />
Although it is a very wonderful protection against lots of trouble under Windows, it can unfortunately become disadvantageous under GNU/Linux when using some software whose kernel modules are NOT signed.<br />
For instance, it is the case of VirtualBox modules.<br />
<br />
There is 2 solutions to fix that:<br />
- sign all kernel modules with your own key<br />
- disable Secure Boot in UEFI boot options<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-22958067729998071182013-07-31T18:53:00.003+02:002013-07-31T18:54:14.864+02:00Setup local DNS server to bind ALL subdomains<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
There is various situation where binding ALL subdomains to a specific applications (local or intranet) can be needed; for instance <br />
<a name='more'></a>working with <a href="http://tomcat.apache.org/">Tomcat</a>.<br />
<br />
Let's say:<br />
- you want to create a main domain <b><i><span style="color: blue;">tomcatserver.test</span></i></b> (IMPORTANT: avoid .local subdomain which is NOT compatible with some system)<br />
- bind all subdomains<br />
- your Internet Provider DNS are 212.27.40.240 and 212.27.40.241<br />
- computers are all on <b><i><span style="color: blue;">network 192.168.0/24</span></i></b><br />
- the <b><i><span style="color: blue;">@IP of the server computer is 192.168.0.2</span></i></b><br />
- your Tomcat applications can be reached via <b><i><span style="color: blue;">http://192.168.0.2:8080/MyApplication</span></i></b><br />
<br />
<h3 style="text-align: left;">
Install and configure DNS server</h3>
- install bind, for instance under GNU/Linux Fedora :<br />
<b><i><span style="color: blue;">yum install bind</span></i></b><br />
<br />
- define configuration of bind (the following option allows use of only IPv4), editing file <b><i>/etc/sysconfig/named</i></b><br />
<span style="color: blue;">OPTIONS="-4"</span><br />
<br />
- edit the main configuration file <b><i>/etc/named.conf</i></b>, and update the following lines to allow access for all computers on network (adapt @IP)<br />
<span style="color: blue;"> listen-on port 53 { 192.168.0.2; };</span><br />
<span style="color: blue;"> allow-query { 192.168.0/24; };</span><br />
<br />
- add this line at the end of the same file<br />
<span style="color: blue;">include "/etc/named.conf.tomcatserver.test";</span><br />
<br />
- create the domain configuration file <b><i>/etc/named.conf.tomcatserver.test</i></b><br />
<span style="color: blue;">zone "tomcatserver.test" IN {</span><br />
<span style="color: blue;">type master;</span><br />
<span style="color: blue;">file "/etc/named.conf.tomcatserver.test.zone";</span><br />
<span style="color: blue;">};</span><br />
<br />
- create the zone file <i style="font-weight: bold;">/etc/named.conf.tomcatserver.local.zone</i> (adapt @IP of your server and DNS)<br />
<span style="color: blue;">$TTL 3H</span><br />
<span style="color: blue;">@ IN SOA @ ns.tomcatserver.test. (</span><br />
<span style="color: blue;"> 9 ; serial</span><br />
<span style="color: blue;"> 1D ; refresh</span><br />
<span style="color: blue;"> 1H ; retry</span><br />
<span style="color: blue;"> 1W ; expire</span><br />
<span style="color: blue;"> 3H ) ; minimum</span><br />
<span style="color: blue;">* IN A 192.168.0.2</span><br />
<span style="color: blue;">@ IN NS 212.27.40.240</span><br />
<span style="color: blue;">@ IN NS 212.27.40.241</span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;">@ IN A 192.168.0.2</span><br />
<span style="color: blue;">www IN A 192.168.0.2</span><br />
<span style="color: blue;">* IN A 192.168.0.2</span><br />
<br />
- you can add several others information like MX (Mail eXchange) ...<br />
<br />
- register your local DNS server adding this line at begining of <b><i>/etc/resolv.conf</i></b> (adapt @IP)<br />
<span style="color: blue;">nameserver 192.168.0.2</span><br />
<br />
- [re]start the DNS server<br />
<span style="color: blue;">service named restart</span><br />
<br />
<h3 style="text-align: left;">
Update rules of your Firewall</h3>
You must update your Firewall to allow computers of the network to use this DNS server (port 53).<br />
<br />
<h3 style="text-align: left;">
Added a new VirtualHost</h3>
Eventually, create a VirtualHost with Proxy mod allowing to 'redirect' request from just created domain, to the Tomcat application.<br />
- create the file <b><i>/etc/httpd/conf.d/myTomcatApplication.conf</i></b><br />
<span style="color: blue;"><virtualhost tomcatserver.test:80=""></virtualhost></span><br />
<span style="color: blue;"> ServerName tomcatserver.test</span><br />
<span style="color: blue;"> ServerAlias *.tomcatserver.test</span><br />
<span style="color: blue;"> ProxyRequests Off</span><br />
<span style="color: blue;"> ProxyPreserveHost On</span><br />
<span style="color: blue;"> <proxy></proxy></span><br />
<span style="color: blue;"> Order deny,allow</span><br />
<span style="color: blue;"> Allow from all</span><br />
<span style="color: blue;"> </span></div>
<span style="color: blue;"> ProxyPass / http://192.168.0.2:8080/MyApplication/</span><br />
<span style="color: blue;"> ProxyPassReverse / http://192.168.0.2:8080/MyApplication/</span><br />
<span style="color: blue;"></span><br />
<br />
- restart your HTTP server<br />
<span style="color: blue;"><b><i>service httpd restart</i></b></span><br />
<br />
<br />
That's it !<br />
Any computers on local network can now access tomcatserver.test and any *.tomcatserver.test subdomains to reach your Tomcat application, usually available under http://192.168.0.2:8080/MyApplication/.<br />
<br />
<br />
<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-56990004634009793762013-05-02T19:19:00.005+02:002013-05-02T19:20:44.572+02:00Disable users login during server Maintenance<div dir="ltr" style="text-align: left;" trbidi="on">
In some situations, when performing server maintenance, it is needed to ensure no user can login to avoid data loss or interference.<br />
It can be easily done by <br />
<a name='more'></a>updating <a href="http://en.wikipedia.org/wiki/Pluggable_authentication_module">PAM</a> configuration.<br />
<br />
For instance for SSH (there is lots of other type):<br />
- check <span style="color: blue;"><b>/etc/pam.d/sshd</b></span> file, and add - if needed - the following line<br />
<b><i>account required pam_nologin.so</i></b><br />
<br />
- create the following empty file<br />
<b><i><span style="color: blue;">touch /etc/nologin</span></i></b><br />
<br />
It's done, and it takes effect immediately.<br />
Only root can now login.<br />
<br />
When Maintenance is done, do not forget to restore user login by removing the file:<br />
<b><i><span style="color: blue;">rm /etc/nologin</span></i></b><br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-91743727832791737792013-04-26T14:06:00.002+02:002013-04-26T14:07:36.441+02:00MySQL Innodb disaster recovery<div dir="ltr" style="text-align: left;" trbidi="on">
After crash, disk failure ... some MySQL part can be broken.<br />
According to the corruption, there is some solution to recover data.<br />
<a name='more'></a><br />
Instructions:<br />
<br />
<ul style="text-align: left;">
<li>stop server (if it is still running)</li>
<li>backup existing meta-data (usually in <b><i>/usr/lib/mysql</i></b>)</li>
<li>update server configuration (<b><i>/etc/mysql/my.cnf</i></b>), adding following line under <b><i>[mysqld]</i></b></li>
</ul>
<br />
<b><i><span style="color: blue;">innodb_force_recovery = 4</span></i></b><br />
<br />
<ul style="text-align: left;">
<li>launch this command (WARNING: you will lose some MySQL Meta-data, like permissions, but NO data)</li>
</ul>
<br />
<b><i><span style="color: blue;">mysql_install_db</span></i></b><br />
<br />
You can then start MySQL server, ever with service or manually:<br />
<b><i><span style="color: blue;">/usr/bin/mysqld_safe</span></i></b><br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-24736476116817842062013-04-26T13:53:00.002+02:002013-04-26T13:54:04.050+02:00Google-Chrome extension allowing to ensure autocomplete (and password registration option)<div dir="ltr" style="text-align: left;" trbidi="on">
In some situation, according to Web Site configuration, Google-Chrome password management can <br />
<a name='more'></a>be 'disabled'.<br />
<br />
This tiny extension is very interesting to ensure <b>autocomplete</b> system is on: <a href="https://chrome.google.com/webstore/detail/autocomplete-on/ecpgkdflcnofdbbkiggklcfmgbnbabhh/details">Autocomplete = on</a>.</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-46261909976863466152013-04-18T23:37:00.001+02:002013-04-18T23:38:07.129+02:00Fix issue with Google +1 button in Google-Chrome Web browser<div dir="ltr" style="text-align: left;" trbidi="on">
While using Google-Chrome Web browser, if <a href="https://developers.google.com/+/web/+1button/">+1 button</a> does not work when you move mouse hover it, or even when you click on it, it is surely because of <br />
<a name='more'></a>your configuration on third-party cookies block system.<br />
<br />
You can easily fix it, adding exceptions (in confidentiality settings) for following URL:<br />
<ul style="text-align: left;">
<li>apis.google.com</li>
<li>plusone.google.com</li>
<li>clients6.google.com</li>
<li>gstatic.com</li>
</ul>
<br />
<br /></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-45287754571536356272013-04-03T15:44:00.001+02:002013-04-03T15:44:50.842+02:00Split And Merge PDF Files<div dir="ltr" style="text-align: left;" trbidi="on">
There is various situation where manipulating PDF files <br />
<a name='more'></a>can be needed.<br />
<a href="http://sourceforge.net/projects/pdfshuffler/">PDF-Shuffler</a> is a little but powerful tool allowing to merge or split PDF files.<br />
Merging can be interesting to create an unique document from several ones.<br />
Splitting/Cropping can be interesting to split PDF A2 to multiple A4 documents.<br />
<br />
This latter can be easily done in two steps:<br />
<br />
<ul style="text-align: left;">
<li>open the PDF files, crop 50% of the right part, save</li>
<li>open the PDF files, crop 50% of the left part, save</li>
</ul>
<div>
More information can be found <a href="http://sourceforge.net/projects/pdfshuffler/">here</a>, and <a href="http://www.linuxinsider.com/story/72288.html">here</a>.</div>
</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-28229367143948461992013-03-31T23:59:00.003+02:002013-04-01T00:01:14.089+02:00Fix php memory issue<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
In some situation, some software (base on <b>PHP</b>) may require more memory (e.g. <b>phpMyAdmin</b>).<br />
<br />
It can be fixed by <a name='more'></a>leveling up memory limit of php, in <b><i><span style="color: blue;"> /etc/php.ini</span></i></b><br />
<br />
<span style="color: blue;"><i><b>memory_limit = 256M</b></i></span></div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0tag:blogger.com,1999:blog-8547845480464472138.post-71220727214018287192013-03-29T00:04:00.000+01:002013-03-29T00:06:45.073+01:00How to define CMake options<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
The most time, defining (and exporting) <b><i>CFLAGS</i></b> and <b><i>CXXFLAGS</i></b> options <br />
<a name='more'></a>before using cmake is enough.<br />
<br />
For UNIX Makefiles generation/use, cmake options can be specified in cmake/compiler/ directory files.<br />
For instance for GCC, options can be defined in file:<br />
<span style="color: blue;"><b><i>cmake/compiler/gcc/settings.cmake</i></b></span><br />
<br />
When using in Eclipse CDT, options can be updated/adapted in file which is produced in same time of Eclipse project Metadata files:<br />
<i><b><span style="color: blue;">CMakeCache.txt</span></b></i><br />
<br />
For instance, it is then possible to add options to gcc with <b><i>CMAKE_CXX_FLAGS:STRING</i></b> and <b><i>CMAKE_C_FLAGS:STRING</i></b>.</div>
Bertrand BENOIThttp://www.blogger.com/profile/02926938448334038552noreply@blogger.com0