Linux http://drupal8.ovh/en/tags/linux en Avoid email send by Php/Drupal mark as spam http://drupal8.ovh/en/tutoriels/291/avoid-email-send-by-php-drupal-mark-as-spam <span class="field field--name-title field--type-string field--label-hidden">Avoid email send by Php/Drupal mark as spam</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to avoid an email send with drupal php mark as a junk mail ?</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mon, 02/13/2017 - 12:19</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>An email is classified as spam or not spam on the receiving end, not the sending end. But you can improve</p> <p> Use email authentication methods, such as SPF, and DKIM to prove that your emails and your domain name belong together, and to prevent spoofing of your domain name. The SPF website includes a wizard to generate the DNS information for your site.</p> <p>Check your reverse DNS to make sure the IP address of your mail server points to the domain name that you use for sending mail.</p> <p>Make sure that the IP-address that you're using is not on a blacklist</p> <p>Make sure that the reply-to address is a valid, existing address.</p> <p>Use the full, real name of the addressee in the To field, not just the email-address (e.g. "John Smith" &lt;john@yourdomain.com&gt; ).</p> <p>Monitor your abuse accounts, such as abuse@yourdomain.com and postmaster@yourdomain.com. That means - make sure that these accounts exist, read what's sent to them, and act on complaints.</p> <p>Finally, make it really easy to unsubscribe. Otherwise, your users will unsubscribe by pressing the spam button, and that will affect your reputation.</p> <p>That said, getting Hotmail to accept your emails remains a black art.</p> <p> Add DKIM on Postfix / ubuntu</p> <p>Tutorial : https://help.ubuntu.com/community/Postfix/DKIM</p> <p> Tips for a server using Debian/Ubuntu and Virtualmin.</p> <p>Add DKIM (DomainKeys Identified Mail) from Virtualmin</p> <p>Active / Install DomainKeys Identified Mail (DKIM) from virtualmin<br />     Virtualmin -&gt; Email messages -&gt; DomainKeys Identified Mail<br />     - Install if not already done.<br />     - Set 'Selector for DKIM record name' Example : 'email'<br />     - Add or Exclude domains<br />     - Then add public key shown on 'DNS records for additional domains' to your DNS.</p> <p> Configure the domain to use in outbound mail (Postfix Mail Server)</p> <p>- If you want to use a single domain name for all virtual servers, set it on  /etc/mailname<br /> - Configure domain on:<br />     Webmin -&gt; Servers -&gt; Postfix Mail Server -&gt; General Options</p> <p>Configure DNS for DKIM</p> <p>Selector : Example :  selector._domainkey.yourdomain.com</p> <p> </p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/php" hreflang="en">PHP</a></li> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=291&amp;2=comment&amp;3=comment" token="3dc3448d"></drupal-render-placeholder> </section> Mon, 13 Feb 2017 11:19:58 +0000 editor 291 at http://drupal8.ovh Create interactive shell script. Prompt for Yes / No input http://drupal8.ovh/en/tutoriels/287/create-interactive-shell-script-prompt-for-yes-no-input <span class="field field--name-title field--type-string field--label-hidden">Create interactive shell script. Prompt for Yes / No input</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How do I prompt for Yes/No/Cancel input in a Linux shell / bash script ?<br /> Ask question / input value.</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Thu, 02/09/2017 - 15:55</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2>Prompt for Yes/No/Cancel input in a Linux shell / bash script</h2> <p>Example:</p> <p><code>#!/bin/bash</code></p> <p><code>echo "This script will ask a question.";</code></p> <p><code>while true; do<br />     read -p "Do you want to continue ?" yn<br />     case $yn in<br />         [Yy]* ) break;;<br />         [Nn]* ) exit;;<br />         * ) echo "Please answer yes or no.";;<br />     esac<br /> done</code></p> <p><code>echo "Your answer is 'YES'";</code></p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> <li><a href="/en/tags/shell" hreflang="en">Shell</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=287&amp;2=comment&amp;3=comment" token="0aa7a490"></drupal-render-placeholder> </section> Thu, 09 Feb 2017 14:55:36 +0000 editor 287 at http://drupal8.ovh Notify When SSH connection success http://drupal8.ovh/en/tutoriels/274/notify-when-ssh-connection-success <span class="field field--name-title field--type-string field--label-hidden">Notify When SSH connection success</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to notify by email, url, SMS ... When SSH connection success ?</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Fri, 12/16/2016 - 13:45</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2>Method 1. Call Url</h2> <p> You can use this method to call a Custom php script, Custom module, Databaselog .... for example.</p> <p>1. Create a script (here, notify_login_url.sh)</p> <p><code>#Example 1.<br /> #!/bin/sh<br /> # Configure your Url:<br /> URL="http://www.yoursite.com/yourscript.php?var=1";<br /> wget $URL &gt; /dev/null 2&gt;&amp;1</code></p> <p><code>#Or Example 2.</code><br /><code>#!/bin/sh</code><br /><code># Configure your Url:<br /> HOST="`hostname`";<br /> NOW=$(date +"%Y-%m-%d:%H:%M:%S");<br /> URL="http://domain.net/mail/notify.php?c=notifyme&amp;t=Connection/Dis++On:+VPS++$PAM_USER++$PAM_RHOST+on+$HOST++$NOW";<br /> curl $URL &amp;&gt;/dev/null;</code></p> <p> </p> <p>2. Make the script executable<br /><code>chmod +x notify_login_url.sh</code></p> <p>3. Add the script to /etc/pam.d/sshd<br /> session optional pam_exec.so seteuid /path/to/notify_login_url.sh</p> <p> NOTE 1 : This will also call on disconnection</p> <p>NOTE 2 :<br /> Set "optional" If you want to still log in if the execution fails.<br /> CAUTION : Set "required" Only After you made sure that it works and if your are sure about what you are doing . login won't be possible unless the execution of your hook script is successful.</p> <h2>Method 2. Send e-Mail using mailx</h2> <p>1. Create a script (here, notify_login_mailx.sh) and make it make it executable (chmod +x notify_login_mailx.sh).</p> <p><code>#!/bin/sh<br /> # Configure your email address:<br /> sender="sender-address@example.com"<br /> recepient="notify-address@example.com"</code></p> <p><code>if [ "$PAM_TYPE" != "close_session" ]; then<br />     host="`hostname`"<br />     subject="SSH Login: $PAM_USER from $PAM_RHOST on $host"<br />     # Message to send, e.g. the current environment variables.<br />     message="`env`"<br />     echo "$message" | mailx -s "$subject" "$recepient"<br />     #OR#echo "$message" | mailx -r "$sender" -s "$subject" "$recepient"<br /> fi</code></p> <p>2. Add the script to /etc/pam.d/sshd<br /> session optional pam_exec.so seteuid /path/to/notify_login_mailx.sh</p> <p> </p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/drupal-8" hreflang="en">Drupal 8</a></li> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=274&amp;2=comment&amp;3=comment" token="699a5458"></drupal-render-placeholder> </section> Fri, 16 Dec 2016 12:45:38 +0000 editor 274 at http://drupal8.ovh Install Solr Search API http://drupal8.ovh/en/tutoriels/272/install-solr-search-api <span class="field field--name-title field--type-string field--label-hidden"> Install Solr Search API</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to <span>Install Solr 5.4.1 on Linux ?</span></p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Tue, 12/13/2016 - 09:58</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><h2><span>Install Solr 5.4.1 on Debian Linux</span></h2> <p> </p> <h3>Step 1. Install JAVA 7 (In not already installed)</h3> <p><code>sudo apt-get install openjdk-7-jdk</code></p> <h3>Step 2. Download the tgz version of SOLR 5.4.1</h3> <p>Drupal need atlest Solr 5.4.1 you may install the latest version. Save solr on <strong>/opt</strong> (/opt for this example, you can also use any other location)<br /><code>sudo wget -O /opt/solr-5.4.1.tgz https://archive.apache.org/dist/lucene/solr/5.4.1/solr-5.4.1.tgz</code></p> <h3>Step 3. Unpack the downloaded tgz file.</h3> <p>Unpack solr into /opt/solr-5.4.1<br /><code>sudo tar zxf solr-5.4.1.tgz</code></p> <h3> </h3> <h2>Solr Server commands</h2> <h3>Start solr</h3> <p><code>sudo bin/solr start<br /> #OR# $ sudo /opt/solr-5.4.1/bin/solr start</code></p> <h3>Stop solr</h3> <p><code>sudo bin/solr stop<br /> #OR# $ sudo /opt/solr-5.4.1/bin/solr stop</code></p> <h3>Open Solr on browser.</h3> <p>SOLR server running at the background. You can browse "http://localhost:8983/solr".</p> <p> </p> <p> </p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> <li><a href="/en/tags/webservice" hreflang="en">WebService</a></li> </ul> </div> <div class="field field--name-field-related-contents field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/en/tutoriels/273/solr-configuration-for-drupal" hreflang="en">Solr Configuration for Drupal</a></div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=272&amp;2=comment&amp;3=comment" token="19ed42be"></drupal-render-placeholder> </section> Tue, 13 Dec 2016 08:58:41 +0000 editor 272 at http://drupal8.ovh IP Failover http://drupal8.ovh/en/tutoriels/267/ip-failover <span class="field field--name-title field--type-string field--label-hidden">IP Failover</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Fri, 11/25/2016 - 13:09</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Example : on Debian / Ubuntu / Mint ...</p> <p>File :  /etc/network/interfaces</p> <p>Edit interface file<br /><code>vim  /etc/network/interfaces</code></p> <p>Add / Edit like this (Here FO ip address is 123.147.159.132)</p> <p><code># The primary network interface<br /> auto eth0<br /> iface eth0 inet dhcp</code></p> <p><code>auto eth0:0<br /> iface eth0:0 inet static<br /> address 123.147.159.132<br /> netmask 255.255.255.255</code></p> <p> </p> <p>If the Failover IP does not respond try :</p> <p><code>ifup eth0:0</code></p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=267&amp;2=comment&amp;3=comment" token="16b229d0"></drupal-render-placeholder> </section> Fri, 25 Nov 2016 12:09:05 +0000 editor 267 at http://drupal8.ovh Install Apache 2 with SSL On Debian based Linux http://drupal8.ovh/en/tutoriels/258/install-apache-2-ssl-on-debian-based-linux <span class="field field--name-title field--type-string field--label-hidden">Install Apache 2 with SSL On Debian based Linux</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to install apache2 with SSL on <span>On Debian based Linux ?</span></p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 10/30/2016 - 13:08</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Install Apache <a href="/en/tutoriels/177/install-lamp-on-debian-based-linux">following this tutorial</a></p> <h2>Activate SSL Module</h2> <p><code>sudo a2enmod ssl<br /> sudo service apache2 force-reload<br /> #Or sudo /etc/init.d/apache2 force-reload</code></p> <h2>Create Certificate</h2> <p>Install SSL packages<br /><code>sudo apt-get install ssl-cert</code></p> <p>Create self signed certification (Or you can also use Let's Encrypt)<br /><code>sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/localhost.pem<br /> sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out /etc/apache2/server.crt -keyout /etc/apache2/server.key<br /> sudo chmod o-rw /etc/apache2/server.key</code></p> <h2> </h2> <h2>Configure Apache</h2> <p><strong>Methode 1</strong><br /><code>cd /etc/apache2/sites-available/<br /> sudo cp default-ssl ssl<br /> sudo sed -i '1,2s/\*:80/*:443/' ssl<br /> sudo sed -i "3a\\\tSSLEngine On\n\tSSLCertificateFile /etc/ssl/private/localhost.pem" ssl</code></p> <p>Activate the ssl site<br /><code>sudo a2ensite ssl</code></p> <p> </p> <p><strong>Methode 2</strong></p> <p>Edit  <strong>/etc/apache2/ports.conf</strong> and add<br /> Listen 443</p> <p>Edit your Host/VirtualHost file and add<br /><code>&lt;VirtualHost 192.168.0.2:443&gt;<br />     ServerName domainname.com<br />     DocumentRoot /var/www/domainname</code></p> <p><code>    SSLEngine on<br />     SSLCertificateFile /etc/apache2/server.crt<br />     SSLCertificateKeyFile /etc/apache2/server.key<br /> &lt;/VirtualHost&gt;</code></p> <p> </p> <p><strong>Reload apache</strong></p> <p><code>sudo service apache2 reload<br /> #Or sudo /etc/init.d/apache2 reload</code></p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <div class="field field--name-field-related-contents field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/en/tutoriels/177/install-lamp-on-debian-based-linux" hreflang="en">Install LAMP On Debian based Linux</a></div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=258&amp;2=comment&amp;3=comment" token="07539462"></drupal-render-placeholder> </section> Sun, 30 Oct 2016 12:08:32 +0000 editor 258 at http://drupal8.ovh Virtualmin Tips http://drupal8.ovh/en/tutoriels/253/virtualmin-tips <span class="field field--name-title field--type-string field--label-hidden">Virtualmin Tips</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Fri, 10/21/2016 - 09:45</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>1. How to regain access to Webmin with IP Access Control enabled</p> <p>Edit : /etc/webmin/miniserv.conf<br /> Add your IP to : "allow"<br /> Example :<br /> allow=12.34.56.78 98.76.54.32</p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <div class="field field--name-field-related-contents field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/en/tutoriels/222/drupal-8-clean-urls-on-virtualmin" hreflang="en">Drupal 8 clean URLs on Virtualmin</a></div> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=253&amp;2=comment&amp;3=comment" token="36f32ba6"></drupal-render-placeholder> </section> Fri, 21 Oct 2016 07:45:33 +0000 editor 253 at http://drupal8.ovh Perl warning Setting locale failed http://drupal8.ovh/en/tutoriels/226/perl-warning-setting-locale-failed <span class="field field--name-title field--type-string field--label-hidden">Perl warning Setting locale failed</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>I have following error message when installing perl package, how to resolve this probleme ?</p> <p><code>perl: warning: Setting locale failed.<br /> perl: warning: Please check that your locale settings:<br />     LANGUAGE = "en_GB:en",<br />     LC_ALL = (unset),<br />     LC_PAPER = "fr_FR.UTF-8",<br />     LC_ADDRESS = "fr_FR.UTF-8",<br />     LC_MONETARY = "fr_FR.UTF-8",<br />     LC_NUMERIC = "fr_FR.UTF-8",<br />     LC_TELEPHONE = "fr_FR.UTF-8",<br />     LC_IDENTIFICATION = "fr_FR.UTF-8",<br />     LC_MEASUREMENT = "fr_FR.UTF-8",<br />     LC_NAME = "fr_FR.UTF-8",<br />     LANG = "en_GB.UTF-8"<br />     are supported and installed on your system.<br /> perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").<br /> locale: Cannot set LC_ALL to default locale: No such file or directory</code></p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sat, 08/27/2016 - 09:37</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><strong>For that, regenerate locals and setup locale settings.</strong></p> <h2>Generate locals</h2> <p>Ex:# <code>locale-gen en_US.UTF-8</code><br /> Or :# <code>locale-gen fr_FR.UTF-8</code></p> <p>An also you can use # <code>localedef -i en_US -f UTF-8 en_US.UTF-8</code></p> <h2>Setup local settings</h2> <p>Example:<br /><code>export LANGUAGE=en_US.UTF-8<br /> export LANG=en_US.UTF-8<br /> export LC_ALL=en_US.UTF-8<br /> locale-gen en_US.UTF-8<br /> dpkg-reconfigure locales</code></p> <p>Note : The <strong><code>dpkg-reconfigure locales</code></strong> command will open a dialog under Debian for selecting the desired locale. This dialog will not appear under Ubuntu.</p> <p>If you have a warning like:</p> <p><code>update-locale: Warning: LANGUAGE (en_GB:en) is not compatible with LANG (C.UTF-8). Disabling it.</code></p> <p>Solution : Select another language Ex : 'en_GB.UTF-8' as default system language (<code>dpkg-reconfigure locale</code>)</p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/server" hreflang="en">Server</a></li> <li><a href="/en/tags/shell" hreflang="en">Shell</a></li> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=226&amp;2=comment&amp;3=comment" token="70b57093"></drupal-render-placeholder> </section> Sat, 27 Aug 2016 07:37:09 +0000 editor 226 at http://drupal8.ovh Repair grub2 EFI and BIOS mode http://drupal8.ovh/en/tutoriels/212/repair-grub2-efi-and-bios-mode <span class="field field--name-title field--type-string field--label-hidden">Repair grub2 EFI and BIOS mode</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>How to repair a broken grub2 EFI (uEfi) mode and BIOS mode ?</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 07/31/2016 - 16:51</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>To repair a broken grub boot from a linux live CD/DVD/USB. For the grub2 EFI boot from uEFI mode and BIOS for BIOS mode.</p> <p>Then install boot-repair tool from PPA</p> <p>#Add PPA<br /> sudo add-apt-repository ppa:yannubuntu/boot-repair</p> <p>#Update apt<br /> sudo apt-get update</p> <p>#Install boot-repair<br /> sudo apt-get install -y boot-repair</p> <p>#Run boot-repair as sudo<br /> sudo boot-repair</p> <p>The use the automatic repair (recommended) mode if you are a beginner.</p> <p> </p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=212&amp;2=comment&amp;3=comment" token="50f472e5"></drupal-render-placeholder> </section> Sun, 31 Jul 2016 14:51:50 +0000 editor 212 at http://drupal8.ovh http://drupal8.ovh/en/tutoriels/212/repair-grub2-efi-and-bios-mode#comments Mount a LUKS Encrypted partition on Linux boot http://drupal8.ovh/en/tutoriels/211/mount-a-luks-encrypted-partition-on-linux-boot <span class="field field--name-title field--type-string field--label-hidden">Mount a LUKS Encrypted partition on Linux boot</span> <div class="clearfix text-formatted field field--name-field-question field--type-text-long field--label-above"> <div class="field__label">Question</div> <div class="field__item"><p>On Linux (Debian, Mint ...), how to mount a LUKS Encrypted partition on boot ?</p> </div> </div> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/en/users/editor" typeof="schema:Person" property="schema:name" datatype="">editor</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 07/31/2016 - 16:33</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>1. get THE UUID from blkid</p> <p>Ex    /dev/mapper/encrypted-partition: UUID="d62cb037-e5ba-4f49-a92a-69705e4bae2b" TYPE="crypto_LUKS"<br /> not    /dev/mapper/luks-d62cb037-e5ba-4f49-a92a-69705e4bae2b: UUID="f6d930b6-b75b-440c-9b41-67ed538bdd75" TYPE="ext4"</p> <p> 2. qdd napper name to /etc/crypttab<br /> The partition will appear as a device in /dev/mapper/&lt;mapper name&gt;.<br /> Entries in /etc/crypttab are of the form<br /> &lt;mapper name&gt; UUID=&lt;UUID&gt;</p> <p>Example 1:<br /> decrypted-partition UUID=d62cb037-e5ba-4f49-a92a-69705e4bae2b<br /> Example 2:<br /> decrypted-partition UUID=d62cb037-e5ba-4f49-a92a-69705e4bae2b none luks</p> <p>For more information on /etc/crypttab, see $ man crypttab.</p> <p>3.Edit /etc/fstab and add<br /> Example 1.<br /><code>/dev/mapper/decrypted-partition /media/ext-hdd ext4 defaults 1 2</code><br /> Example 2.<br /><code>/dev/mapper/decrypted-partition /media/ext-hdd ext4 defaults,x-gvfs-name=ENC 1 2</code><br /> Example 3<br /><code>decrypted-partition UUID=d62cb037-e5ba-4f49-a92a-69705e4bae2b none luks</code></p> <p>4. Reboot</p> <p>Note<br /> The next time you boot your system you will be prompted for the passphrase and the partition will be mounted to the given mount point. The output of $ blkid should now contain</p> <p><code>/dev/mapper/encrypted-partition: UUID="d62cb037-e5ba-4f49-a92a-69705e4bae2b" TYPE="crypto_LUKS"<br /> /dev/mapper/decrypted-partition: UUID="93f9bbf4-4e4f-4647-85f3-4fbba7d7a21f" TYPE="ext4"</code></p> <p> </p> <p>Tips</p> <p>Change UUID of LUKS encrypted partition.</p> <p>1. Generate new uuid using <strong>uuidgen</strong><br /> 2. cryptsetup luksUUID /dev/sda1 --uuid "THE-NEW-UUID"</p> <p>Set / Change UUID of a partition<br /> sudo tune2fs /dev/sde5 -U 507fe741-bf59-40f4-8cef-6b0803f11f30</p> <p> </p> </div> <div class="field field--name-field-tags field--type-entity-reference field--label-inline clearfix"> <h3 class="field__label inline">Tags</h3> <ul class="links field__items"> <li><a href="/en/tags/linux" hreflang="en">Linux</a></li> </ul> </div> <section class="field field--name-comment field--type-comment field--label-above comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=211&amp;2=comment&amp;3=comment" token="68cff996"></drupal-render-placeholder> </section> Sun, 31 Jul 2016 14:33:56 +0000 editor 211 at http://drupal8.ovh http://drupal8.ovh/en/tutoriels/211/mount-a-luks-encrypted-partition-on-linux-boot#comments