<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Emil CHERICHES</title>
	<atom:link href="https://cheriches.com/feed" rel="self" type="application/rss+xml" />
	<link>https://cheriches.com</link>
	<description>computer passionate, electrician, handyman</description>
	<lastBuildDate>Fri, 12 Sep 2025 07:24:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://cheriches.com/wp-content/uploads/2019/03/Emil_ei_logo-150x150.jpg</url>
	<title>Emil CHERICHES</title>
	<link>https://cheriches.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Disable AI bullshit from Firefox</title>
		<link>https://cheriches.com/tips-and-tricks/2025-09-12-disable-ai-bullshit-from-firefox.html</link>
					<comments>https://cheriches.com/tips-and-tricks/2025-09-12-disable-ai-bullshit-from-firefox.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Fri, 12 Sep 2025 07:23:03 +0000</pubDate>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Firefox]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=835</guid>

					<description><![CDATA[It&#8217;s quite simple: open a new tab, type: Accept that you&#8217;re in advanced settings mode, then type: That&#8217;s quite all&#8230;.]]></description>
										<content:encoded><![CDATA[
<p>It&#8217;s quite simple: open a new tab, type:</p>



<pre class="wp-block-code"><code>about:config</code></pre>



<p>Accept that you&#8217;re in advanced settings mode, then type:</p>



<pre class="wp-block-code"><code>browser.ml.*enable</code></pre>



<p>That&#8217;s quite all&#8230;.</p>



<figure class="wp-block-image size-full"><a href="https://cheriches.com/wp-content/uploads/2025/09/Capture-decran-du-2025-09-12-09-22-30.png"><img fetchpriority="high" decoding="async" width="794" height="524" src="https://cheriches.com/wp-content/uploads/2025/09/Capture-decran-du-2025-09-12-09-22-30.png" alt="" class="wp-image-837" srcset="https://cheriches.com/wp-content/uploads/2025/09/Capture-decran-du-2025-09-12-09-22-30.png 794w, https://cheriches.com/wp-content/uploads/2025/09/Capture-decran-du-2025-09-12-09-22-30-300x198.png 300w, https://cheriches.com/wp-content/uploads/2025/09/Capture-decran-du-2025-09-12-09-22-30-768x507.png 768w" sizes="(max-width: 794px) 100vw, 794px" /></a></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/tips-and-tricks/2025-09-12-disable-ai-bullshit-from-firefox.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>liquidprompt on nixos</title>
		<link>https://cheriches.com/tips-and-tricks/2025-08-18-liquidprompt-on-nixos.html</link>
					<comments>https://cheriches.com/tips-and-tricks/2025-08-18-liquidprompt-on-nixos.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Mon, 18 Aug 2025 10:01:55 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[NixOS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=829</guid>

					<description><![CDATA[First we make sure the liquidprompt package is installed: and then make it active on bash]]></description>
										<content:encoded><![CDATA[
<p>First we make sure the <a href="https://github.com/liquidprompt/liquidprompt">liquidprompt</a> package is installed:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>  environment.systemPackages = with pkgs; &#91;
    liquidprompt
  &#93;;
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9FF">  </span><span style="color: #D8DEE9">environment</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">systemPackages</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">with</span><span style="color: #D8DEE9FF"> </span><span style="color: #D8DEE9">pkgs</span><span style="color: #81A1C1">;</span><span style="color: #D8DEE9FF"> &#91;</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #D8DEE9">liquidprompt</span></span>
<span class="line"><span style="color: #D8DEE9FF">  &#93;</span><span style="color: #81A1C1">;</span></span>
<span class="line"></span></code></pre></div>



<p>and then make it active on bash</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#d8dee9ff;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>environment.etc."bashrc.local"= {
    text = ''
      if [&#91; -r ${pkgs.liquidprompt}/bin/liquidprompt &#93;]; then
         . ${pkgs.liquidprompt}/bin/liquidprompt
      fi
    '';
 };
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki nord" style="background-color: #2e3440ff" tabindex="0"><code><span class="line"><span style="color: #D8DEE9">environment</span><span style="color: #ECEFF4">.</span><span style="color: #D8DEE9">etc</span><span style="color: #ECEFF4">.</span><span style="color: #ECEFF4">&quot;</span><span style="color: #A3BE8C">bashrc.local</span><span style="color: #ECEFF4">&quot;</span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">{</span></span>
<span class="line"><span style="color: #D8DEE9FF">    </span><span style="color: #D8DEE9">text</span><span style="color: #D8DEE9FF"> </span><span style="color: #81A1C1">=</span><span style="color: #D8DEE9FF"> </span><span style="color: #ECEFF4">&#39;&#39;</span></span>
<span class="line"><span style="color: #D8DEE9FF">      if </span><span style="color: #88C0D0">[&#91; </span><span style="color: #81A1C1">-</span><span style="color: #D8DEE9">r</span><span style="color: #88C0D0"> </span><span style="color: #D8DEE9">$</span><span style="color: #ECEFF4">{</span><span style="color: #88C0D0">pkgs.</span><span style="color: #D8DEE9">liquidprompt</span><span style="color: #ECEFF4">}</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">bin</span><span style="color: #81A1C1">/</span><span style="color: #D8DEE9">liquidprompt</span><span style="color: #88C0D0"> &#93;]; then</span></span>
<span class="line"><span style="color: #88C0D0">         . ${pkgs.liquidprompt}/bin/liquidprompt</span></span>
<span class="line"><span style="color: #88C0D0">      fi</span></span>
<span class="line"><span style="color: #88C0D0">    &#39;&#39;;</span></span>
<span class="line"><span style="color: #88C0D0"> };</span></span>
<span class="line"></span></code></pre></div>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/tips-and-tricks/2025-08-18-liquidprompt-on-nixos.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Debian on BTRFS with subvolumes</title>
		<link>https://cheriches.com/linux/2025-01-05-debian-on-btrfs-with-subvolumes.html</link>
					<comments>https://cheriches.com/linux/2025-01-05-debian-on-btrfs-with-subvolumes.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Sun, 05 Jan 2025 17:38:06 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[BTRFS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[UEFI]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=815</guid>

					<description><![CDATA[This install method is not only usefull for this case but also when you need to install a remote system where the person running the install physically is not well versed in linux system installs. First of all we need to download a Debian Live ISO. I prefer the amd64-standard.iso,&#8230;]]></description>
										<content:encoded><![CDATA[
<p id="block-d894406a-18bc-437c-8ceb-34b1845bd12a">This install method is not only usefull for this case but also when you need to install a remote system where the person running the install physically is not well versed in linux system installs.</p>



<p>First of all we need to download a <a href="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/" data-type="link" data-id="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/">Debian Live ISO</a>. I prefer the amd64-standard.iso, the one with graphical GUI might go into stand-by when nobody touches the actual physical machine.</p>



<p>The next step is to boot the ISO, either like me in a virtual machine or write it down to a physical medium and boot a real PC/Server. What we also want in this step is to enable remote SSH access. </p>



<pre class="wp-block-code"><code>apt update
apt install openssh-server net-tools
curl https://ssh.cheriches.eu -o .ssh/authorized_keys</code></pre>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-09-09.png"><img decoding="async" width="911" height="682" data-id="817" src="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-09-09.png" alt="" class="wp-image-817" srcset="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-09-09.png 911w, https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-09-09-300x225.png 300w, https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-09-09-768x575.png 768w" sizes="(max-width: 911px) 100vw, 911px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-10-39.png"><img decoding="async" width="911" height="682" data-id="818" src="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-10-39.png" alt="" class="wp-image-818" srcset="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-10-39.png 911w, https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-10-39-300x225.png 300w, https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-10-39-768x575.png 768w" sizes="(max-width: 911px) 100vw, 911px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-11-05.png"><img loading="lazy" decoding="async" width="901" height="702" data-id="819" src="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-11-05.png" alt="" class="wp-image-819" srcset="https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-11-05.png 901w, https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-11-05-300x234.png 300w, https://cheriches.com/wp-content/uploads/2025/01/Capture-decran-du-2025-01-05-17-11-05-768x598.png 768w" sizes="auto, (max-width: 901px) 100vw, 901px" /></a></figure>
</figure>



<p>Once we have the IP address using ifconfig we can remotely connect to the machine and start by installing some basic tools:</p>



<pre class="wp-block-code"><code>apt install dosfstools btrfs-progs gdisk debootstrap</code></pre>



<p>Next we need to partition the disk. In my case I don&#8217;t need swap but you might. You can use some other tool to achieve the same result. The important part of the layout is to have a EFI partition and at least one partition for the rest of the system marked as Linux File System.</p>



<pre class="wp-block-code"><code>export DISK=/dev/vda<br>sgdisk --zap-all $DISK<br>sgdisk -n1:1M:+512M -t1:EF00 $DISK<br>sgdisk -n2:0:0 -t2:8300 $DISK</code></pre>



<p>Format the newly created partitions, the EFI one with FAT32 and the other one as BTRFS. </p>



<pre class="wp-block-code"><code>mkfs.vfat -F32 /dev/vda1 
mkfs.btrfs /dev/vda2</code></pre>



<p>First mount of the BTRFS partition in order to create the subvolumes. </p>



<pre class="wp-block-code"><code>mount /dev/vda2 /mnt/
cd /mnt/
btrfs subvolume create @
btrfs subvolume create @home
btrfs subvolume create @var
cd /
umount /mnt/</code></pre>



<p>And a remount for the final layout:</p>



<pre class="wp-block-code"><code>mount /dev/vda2 /mnt -o subvol=@
cd /mnt/
mkdir boot var home
mount /dev/vda1 boot/
mount /dev/vda2 home/ -o subvol=@home 
mount /dev/vda2 var/ -o subvol=@var </code></pre>



<p>Install the base filesystem:</p>



<pre class="wp-block-code"><code>debootstrap stable /mnt  https://deb.debian.org/debian/</code></pre>



<p>Chroot and mount the pseudo-filesystems:</p>



<pre class="wp-block-code"><code>chroot /mnt /bin/bash

mount -t proc proc /proc
mount -t devtmpfs udev /dev
mount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
mount -t efivarfs efivarfs /sys/firmware/efi/efivars</code></pre>



<p>Some basic tools installation:</p>



<pre class="wp-block-code"><code>apt update
apt install vim-nox wget btrfs-progs dosfstools openssh-server net-tools</code></pre>



<p>Create the fstab, get the partition IDs and replace the entries in the fstab. You can do this by hand or with sed, don&#8217;t forget to use your actual ID.</p>



<pre class="wp-block-code"><code>cp /etc/mtab /etc/fstab 

blkid

sed -i 's#/dev/vda1#UUID="A06A-6D17"#' /etc/fstab
sed -i 's#/dev/vda2#UUID="3cb21173-e298-4704-a3e2-f6a9561acdec"#' /etc/fstab</code></pre>



<p>Install the boot loader. Debian usually uses grub, in this case I use Systemd-Boot. The choice is yours!</p>



<pre class="wp-block-code"><code>apt install systemd-boot
apt install linux-image-amd64
cd /boot/loader/entries
ls</code></pre>



<p>If you do like me you&#8217;ll find in /boot/loader/entries a file, mine is called 595ff83ce3e34be4bb3456a6b2ee6213-6.1.0-27-amd64.conf that you need to edit, something like this:</p>



<pre class="wp-block-code"><code>title      Debian GNU/Linux 12 (bookworm)
version    6.1.0-27-amd64
options	   root=UUID="1e22d882-bf0b-4039-8c52-df38e0c6d43b" rootflags=subvol=@ rw rootfstype=btrfs quiet splash 
linux      /595ff83ce3e34be4bb3456a6b2ee6213/6.1.0-27-amd64/linux
initrd     /595ff83ce3e34be4bb3456a6b2ee6213/6.1.0-27-amd64/initrd.img-6.1.0-27-amd64</code></pre>



<p>Network configuration. The simplest way in Debian is to edit /etc/network/interfaces to have something like:</p>



<pre class="wp-block-code"><code>source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

allow-hotplug enp1s0
iface enp1s0 inet dhcp</code></pre>



<p>Change the root password and add your SSH key </p>



<pre class="wp-block-code"><code>passwd
curl https://ssh.cheriches.eu -o  /root/.ssh/authorized_keys</code></pre>



<p>Exit form the chroot and reboot the system</p>



<pre class="wp-block-code"><code>exit
reboot</code></pre>



<p>Login back via SSH and add make some further configurations. Edit /etc/apt/sources.list to have something like:</p>



<pre class="wp-block-code"><code>deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware

deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free-firmware</code></pre>



<pre class="wp-block-code"><code>apt update &amp;&amp; apt dist-upgrade</code></pre>



<p>Now check  /boot/loader/entries  for a new file reflecting your newly installed kernel if it generates correctly.</p>



<p>Optional</p>



<pre class="wp-block-code"><code>apt install sudo chrony bash-completion</code></pre>



<pre class="wp-block-code"><code>hostnamectl hostname debian12</code></pre>



<p>Optional: Docker install:</p>



<pre class="wp-block-code"><code>apt-get install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb &#91;arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release &amp;&amp; echo "$VERSION_CODENAME") stable" | \
  tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update</code></pre>



<pre class="wp-block-code"><code>apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/linux/2025-01-05-debian-on-btrfs-with-subvolumes.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>NixOS TIP: OTP in Gnome login screen</title>
		<link>https://cheriches.com/tips-and-tricks/2024-12-13-nixos-tip-otp-in-gnome-login-screen.html</link>
					<comments>https://cheriches.com/tips-and-tricks/2024-12-13-nixos-tip-otp-in-gnome-login-screen.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Fri, 13 Dec 2024 10:07:35 +0000</pubDate>
				<category><![CDATA[NixOS]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Google Authenticator]]></category>
		<category><![CDATA[OTP]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=810</guid>

					<description><![CDATA[Add to your configuration.nix Then do a And from the user shell]]></description>
										<content:encoded><![CDATA[
<p>Add to your configuration.nix</p>



<pre class="wp-block-code"><code>  security.pam.services.&lt;user>.googleAuthenticator.enable = true;
  security.pam.services.gdm-password.text = ''
    auth      required      ${pkgs.google-authenticator}/lib/security/pam_google_authenticator.so
  '';</code></pre>



<p>Then do a </p>



<pre class="wp-block-code"><code>nixos-rebuild switch</code></pre>



<p>And from the user shell</p>



<pre class="wp-block-code"><code>google-authenticator</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/tips-and-tricks/2024-12-13-nixos-tip-otp-in-gnome-login-screen.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Arch to Manjaro &#8211; the dirty way</title>
		<link>https://cheriches.com/tips-and-tricks/2024-07-24-arch-to-manjaro-the-dirty-way.html</link>
					<comments>https://cheriches.com/tips-and-tricks/2024-07-24-arch-to-manjaro-the-dirty-way.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Wed, 24 Jul 2024 22:07:12 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Arch]]></category>
		<category><![CDATA[Manjaro]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=800</guid>

					<description><![CDATA[In my lab I&#8217;ve been running arch on a NFS server and the filesystem used is ZFS. I think you already know that in Arch the zfs packages are located in AUR. There are several options like zfs-linux and zfs-dkms. Sadly both are problematic during kernel updates. One solution I&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In my lab I&#8217;ve been running arch on a NFS server and the filesystem used is ZFS. I think you already know that in Arch the zfs packages are located in AUR. </p>



<p>There are several options like zfs-linux and zfs-dkms. Sadly both are problematic during kernel updates. One solution I found to make these problems go away is to use Manjaro instead of Arch.</p>



<p>In Manjaro the zfs packages are in the repositories. Every kernel you use like linux610 also has a package called linux610-zfs.</p>



<p>First we make sure that everything is up to date</p>



<pre class="wp-block-code"><code>pacman -Syyuu</code></pre>



<p>Then we change the content of the file /etc/pacman.d/mirrorlist to point to Manjaro packages</p>



<pre class="wp-block-code"><code>Server = https://manjaro.ynh.ovh/stable/$repo/$arch</code></pre>



<p>I only put one mirror, feel free to chose your favorite from <a href="https://repo.manjaro.org/">repo.manjaro.org</a></p>



<p>Because we will have some issues with the package signatures we temporarily disable the signature check. We edit the file /etc/pacman.conf by commenting one line and adding another</p>



<pre class="wp-block-code"><code># SigLevel    = Required DatabaseOptional<code>SigLevel = Optional TrustAll</code></code></pre>



<p>Now we install the Manjaro specific keys:</p>



<pre class="wp-block-code"><code>pacman -Syy
pacman -S manjaro-keyring</code></pre>



<p>Then populate the keys thru the system</p>



<pre class="wp-block-code"><code>pacman-key --init
pacman-key --populate archlinux manjaro</code></pre>



<p>Now we can revert the key verification options in /etc/pacman.conf</p>



<pre class="wp-block-code"><code><code>SigLevel    = Required DatabaseOptional
# SigLevel = Optional TrustAll</code></code></pre>



<p>Remove the Arch kernel and install the Manjaro one</p>



<pre class="wp-block-code"><code>pacman -Runs linux
pacman -S linux610</code></pre>



<p>And reinstall all packages that are allready installed.</p>



<pre class="wp-block-code"><code> pacman -Qqn |pacman -S - </code></pre>



<p>The next step is to reconfigure the boot manager. In my case I use systemd-boot</p>



<pre class="wp-block-code"><code>pacman -S systemd-boot-manager
bootctl update
sdboot-manage gen</code></pre>



<p>Reconfigure the Mirrors</p>



<pre class="wp-block-code"><code>pacman -S pacman-mirrors
pacman-mirrors -c France,Germany</code></pre>



<p>Manage the .pacnew files</p>



<pre class="wp-block-code"><code>find /etc/ -name *.pacnew</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/tips-and-tricks/2024-07-24-arch-to-manjaro-the-dirty-way.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The anatomy of a smart bulb</title>
		<link>https://cheriches.com/smart-home/2023-10-07-the-anatomy-of-a-smart-bulb.html</link>
					<comments>https://cheriches.com/smart-home/2023-10-07-the-anatomy-of-a-smart-bulb.html#comments</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Sat, 07 Oct 2023 22:35:30 +0000</pubDate>
				<category><![CDATA[Smart Home]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[flashing]]></category>
		<category><![CDATA[OpenBeken]]></category>
		<category><![CDATA[OpenBK7231T]]></category>
		<category><![CDATA[Tuya]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=725</guid>

					<description><![CDATA[I&#8217;ve been having some troubles with Zigbee. Yes, at our airbnb we have a rather big dining room where I&#8217;ve put 7 Zigbee RGBWW Smart bulbs. The problem is that each time I try to turn all 7 on or off there&#8217;s either a lag or some of them just&#8230;]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve been having some troubles with Zigbee. Yes, at our airbnb we have a rather big dining room where I&#8217;ve put 7 Zigbee RGBWW Smart bulbs. The problem is that each time I try to turn all 7 on or off there&#8217;s either a lag or some of them just won&#8217;t switch on or off. The controller is a Sonoff Zigbee 3.0 USB dongle, yes the one with the antenna. But between these bulbs and the controller is a fairly big distance, one concreete and one stone wall.</p>



<p>You&#8217;re probably going to tell me that if I put some other non battery operated devices in between the problem should solve itself. Believe me I tried, I have an IKEA TRADFRI LED driver, an Aqara Smart Plug and a SilverCrest  Smart Plug between the controller and the devices and the problem persists. </p>



<p>So I decided to go back to what I knew and works better, <strong>WiFi</strong>. And so I ordered<a href="https://www.aliexpress.com/item/1005005481268886.html"> a bunch of smart bulbs on AliExpress</a>, on the cheap side. I know these bulbs come with a proprietary firmware that wants to connect to a Chinese cloud so I was sure of flashing them even before the order.</p>



<p>The package arrived and this is what I got:</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/geco_smart_bulb-1.jpg"><img loading="lazy" decoding="async" width="768" height="1024" data-id="735" src="https://cheriches.com/wp-content/uploads/2023/10/geco_smart_bulb-1-768x1024.jpg" alt="" class="wp-image-735" srcset="https://cheriches.com/wp-content/uploads/2023/10/geco_smart_bulb-1-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/geco_smart_bulb-1-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/geco_smart_bulb-1-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/geco_smart_bulb-1.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>
</figure>



<p>I&#8217;d like to present you some tools I used:<br>&#8211; a heat resisting mat<br>&#8211; a lamp to help me see better and connect the newly flashed bulb<br>&#8211; a flashing jig / USB TTL Converter<br>&#8211; soldering Iron, low temperature melting solder and flux<br>&#8211; pliers to remove the cap<br>&#8211; scalpel<br>&#8211; isopropyl alcohool and an oid toothbrush</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/heat_mat.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="738" src="https://cheriches.com/wp-content/uploads/2023/10/heat_mat-1024x768.jpg" alt="" class="wp-image-738" srcset="https://cheriches.com/wp-content/uploads/2023/10/heat_mat-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/heat_mat-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/heat_mat-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/heat_mat-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/heat_mat.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/lamp.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="739" src="https://cheriches.com/wp-content/uploads/2023/10/lamp-1024x768.jpg" alt="" class="wp-image-739" srcset="https://cheriches.com/wp-content/uploads/2023/10/lamp-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/lamp-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/lamp-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/lamp-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/lamp.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/jig.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="743" src="https://cheriches.com/wp-content/uploads/2023/10/jig-1024x768.jpg" alt="" class="wp-image-743" srcset="https://cheriches.com/wp-content/uploads/2023/10/jig-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/jig-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/jig-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/jig-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/jig.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/solder.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="741" src="https://cheriches.com/wp-content/uploads/2023/10/solder-1024x768.jpg" alt="" class="wp-image-741" srcset="https://cheriches.com/wp-content/uploads/2023/10/solder-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/solder-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/solder-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/solder-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/solder.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="737" src="https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron-1024x768.jpg" alt="" class="wp-image-737" srcset="https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/soldering_Iron.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/pliers.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="742" src="https://cheriches.com/wp-content/uploads/2023/10/pliers-1024x768.jpg" alt="" class="wp-image-742" srcset="https://cheriches.com/wp-content/uploads/2023/10/pliers-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/pliers-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/pliers-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/pliers-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/pliers.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/scalpel.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="740" src="https://cheriches.com/wp-content/uploads/2023/10/scalpel-1024x768.jpg" alt="" class="wp-image-740" srcset="https://cheriches.com/wp-content/uploads/2023/10/scalpel-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/scalpel-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/scalpel-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/scalpel-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/scalpel.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<p>Let&#8217;s start opening it. First the foot contact, then the metal cap, the plastic bulb and then the internals.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-4 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/foot_contact.jpg"><img loading="lazy" decoding="async" width="768" height="1024" data-id="728" src="https://cheriches.com/wp-content/uploads/2023/10/foot_contact-768x1024.jpg" alt="" class="wp-image-728" srcset="https://cheriches.com/wp-content/uploads/2023/10/foot_contact-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/foot_contact-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/foot_contact-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/foot_contact.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/cap.jpg"><img loading="lazy" decoding="async" width="768" height="1024" data-id="731" src="https://cheriches.com/wp-content/uploads/2023/10/cap-768x1024.jpg" alt="" class="wp-image-731" srcset="https://cheriches.com/wp-content/uploads/2023/10/cap-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/cap-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/cap-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/cap.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="733" src="https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap-1024x768.jpg" alt="" class="wp-image-733" srcset="https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/bulb_without_cap.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/plastic_bulb_removal.jpg"><img loading="lazy" decoding="async" width="768" height="1024" data-id="729" src="https://cheriches.com/wp-content/uploads/2023/10/plastic_bulb_removal-768x1024.jpg" alt="" class="wp-image-729" srcset="https://cheriches.com/wp-content/uploads/2023/10/plastic_bulb_removal-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/plastic_bulb_removal-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/plastic_bulb_removal-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/plastic_bulb_removal.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/adhesive_removal.jpg"><img loading="lazy" decoding="async" width="768" height="1024" data-id="732" src="https://cheriches.com/wp-content/uploads/2023/10/adhesive_removal-768x1024.jpg" alt="" class="wp-image-732" srcset="https://cheriches.com/wp-content/uploads/2023/10/adhesive_removal-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/adhesive_removal-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/adhesive_removal-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/adhesive_removal.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/almost_there.jpg"><img loading="lazy" decoding="async" width="1024" height="768" data-id="734" src="https://cheriches.com/wp-content/uploads/2023/10/almost_there-1024x768.jpg" alt="" class="wp-image-734" srcset="https://cheriches.com/wp-content/uploads/2023/10/almost_there-1024x768.jpg 1024w, https://cheriches.com/wp-content/uploads/2023/10/almost_there-300x225.jpg 300w, https://cheriches.com/wp-content/uploads/2023/10/almost_there-768x576.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/almost_there-1536x1152.jpg 1536w, https://cheriches.com/wp-content/uploads/2023/10/almost_there.jpg 1920w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/bulb_motherboard.jpg"><img loading="lazy" decoding="async" width="768" height="1024" data-id="730" src="https://cheriches.com/wp-content/uploads/2023/10/bulb_motherboard-768x1024.jpg" alt="" class="wp-image-730" srcset="https://cheriches.com/wp-content/uploads/2023/10/bulb_motherboard-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/bulb_motherboard-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/bulb_motherboard-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/bulb_motherboard.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>
</figure>



<p>As you could probably tell my particular bulb is ran by a CB2L Module. The CPU of this module is a BK7231N chip. Also from the photos you can se that there&#8217;s no IC on the LED board, which means that in the open source firmware there&#8217;s no need to load any specific driver, all of the light controls is handled thru PWMs.</p>



<p>The module itself has 7 pins soldered to the motherboard. Ground and VCC allows the module to be powered and the other ones allow the control of the PWMs. From the spec sheet these are P8, P7, P6, P26 and P24. </p>



<p>The firmware i&#8217;m installing is called OpenBK7231T or simple OpenBeken. </p>



<p>Because i&#8217;m on linux I will be using the<a href="https://github.com/OpenBekenIOT/hid_download_py"> command line UART program</a> even if they say it&#8217;s &#8220;obsolete&#8221;. To use this it&#8217;s as simple as cloning the repo and using uartprogram.</p>



<p>Next step is to download the <a href="https://github.com/openshwprojects/OpenBK7231T_App/releases">latest release of OpenBeken</a>. From the download links chose BK7231N and UART Flash binary.</p>



<p>The first dangerous part is the de-solder of the module from the motherboard. In order to do this low temperature solder must be applied to the 7 contacts and heated one after the other while gently prying the module from the motherboard with the scalpel. After the module is lifted the same procedure is being used to separate the module entirely. </p>



<p>I found this very interesting video about how to desolder a module:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy" title="How to desolder SMD WiFi module (WB3S/CB3S/TYWE3S/WR3/ESP12) without hot air? Simple method" width="700" height="394" src="https://www.youtube.com/embed/fSbeKwCCMHM?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div></figure>



<p>On the back side of this module there are some pads. The one we are interested in are RX1, TX1 and CEN. Also we need to locate the ground pad GND and vcc 3V3. We need to temporary solder some wires on these pins. To do this the easiest method is to apply some flux on the pads then heat them with the iron and apply a tiny bit of solder on each pad. Then make sure the wires are saturated with solder. Once ready heat both the pad and the wire.  There&#8217;s no need for a perfect solder just a connection to last for a few minutes while flashing.</p>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/CB2L-rx-tx-1.jpg"><img loading="lazy" decoding="async" width="768" height="1024" src="https://cheriches.com/wp-content/uploads/2023/10/CB2L-rx-tx-1-768x1024.jpg" alt="" class="wp-image-769" srcset="https://cheriches.com/wp-content/uploads/2023/10/CB2L-rx-tx-1-768x1024.jpg 768w, https://cheriches.com/wp-content/uploads/2023/10/CB2L-rx-tx-1-225x300.jpg 225w, https://cheriches.com/wp-content/uploads/2023/10/CB2L-rx-tx-1-1152x1536.jpg 1152w, https://cheriches.com/wp-content/uploads/2023/10/CB2L-rx-tx-1.jpg 1440w" sizes="auto, (max-width: 768px) 100vw, 768px" /></a></figure>



<p>Now just check the wires GND goes to GND 3.3V goes to 3V3 RX goes to RX1 and TX goes to TX1. We also need a loose wire connected on one side to GND that we need to touch to CEN pad for les than a second once the uartprogram is launched.  Connect to the computer and flash.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-5 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-44-56.png"><img loading="lazy" decoding="async" width="1024" height="412" data-id="748" src="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-44-56-1024x412.png" alt="" class="wp-image-748" srcset="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-44-56-1024x412.png 1024w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-44-56-300x121.png 300w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-44-56-768x309.png 768w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-44-56.png 1056w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-42.png"><img loading="lazy" decoding="async" width="1024" height="412" data-id="750" src="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-42-1024x412.png" alt="" class="wp-image-750" srcset="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-42-1024x412.png 1024w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-42-300x121.png 300w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-42-768x309.png 768w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-42.png 1056w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-45.png"><img loading="lazy" decoding="async" width="1024" height="412" data-id="749" src="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-45-1024x412.png" alt="" class="wp-image-749" srcset="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-45-1024x412.png 1024w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-45-300x121.png 300w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-45-768x309.png 768w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-43-45.png 1056w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</figure>



<p>The command to run is:</p>



<pre class="wp-block-preformatted">./uartprogram -u -s 0x0 -w OpenBK7231N_QIO_1.17.268.bin</pre>



<p>Once you se &#8220;getting bus&#8221; you need to touch the CEN pad.</p>



<p>In a few seconds after the flashing is done we can se a new open Wifi network called OpenBK7231N_Some_Random_String. This means the flashing is successful and we can disconnect from the computer and resolder the module to the bulb&#8217;s motherboard.</p>



<figure class="wp-block-image size-large is-resized"><a href="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-53-55.png"><img loading="lazy" decoding="async" src="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-53-55-1024x697.png" alt="" class="wp-image-753" style="width:699px;height:476px" width="699" height="476" srcset="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-53-55-1024x697.png 1024w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-53-55-300x204.png 300w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-53-55-768x523.png 768w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-07-23-53-55.png 1048w" sizes="auto, (max-width: 699px) 100vw, 699px" /></a></figure>



<p>Once the bulb is reassembled we can connect it to power, wait a few seconds for the Wifi network to reappear and connect to it. Open a browser and go to http://192.168.4.1 </p>



<p>From the main interface we go to config, configure module and set up the pins.  P6 is of type PWM number 3, P7  is of type PWM number 2, P8 is of type PWM number 1, P24 is also of type PWM number 5 and P26 is of type PWM number 4.</p>



<figure class="wp-block-image size-large"><a href="https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config.png"><img loading="lazy" decoding="async" width="631" height="1024" src="https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config-631x1024.png" alt="" class="wp-image-755" srcset="https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config-631x1024.png 631w, https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config-185x300.png 185w, https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config-768x1246.png 768w, https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config-947x1536.png 947w, https://cheriches.com/wp-content/uploads/2023/10/Screenshot-2023-10-06-at-18-42-25-OpenBK7231N_B9F21135-Pin-config.png 1223w" sizes="auto, (max-width: 631px) 100vw, 631px" /></a></figure>



<p>Click save, return to cfg and configure general/flags. Make sure flags 1,10and 12 are set. Click on submit, return to cfg, return to menu. Now you should be able to switch on the light. Click on Toggle Light. </p>



<p>You should now click on restart to make sure all the settings are well saved. </p>



<p>If for some reason the colors aren&#8217;t right, there&#8217;s a way to fix it. From the main menu launch the web appication and go to status. Switch on and off every channel.  1 should be Red, 2 should be Green, 3 should be Blue, 4 should be Cold White and 5 Worm White.  If it does not match switch PWM numbers accordingly.</p>



<figure class="wp-block-image size-full"><a href="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-08-00-20-26.png"><img loading="lazy" decoding="async" width="1025" height="967" src="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-08-00-20-26.png" alt="" class="wp-image-764" srcset="https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-08-00-20-26.png 1025w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-08-00-20-26-300x283.png 300w, https://cheriches.com/wp-content/uploads/2023/10/Capture-decran-du-2023-10-08-00-20-26-768x725.png 768w" sizes="auto, (max-width: 1025px) 100vw, 1025px" /></a></figure>



<p>Se you soon!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/smart-home/2023-10-07-the-anatomy-of-a-smart-bulb.html/feed</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>OpenVPN on 443</title>
		<link>https://cheriches.com/security/2023-10-04-openvpn-on-443.html</link>
					<comments>https://cheriches.com/security/2023-10-04-openvpn-on-443.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Wed, 04 Oct 2023 11:51:04 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[VPN]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=713</guid>

					<description><![CDATA[SSL VPN? Lately I&#8217;ve been working on a project where security is very important. In order to connect to the hosting provider I needed to use a specific VPN provided by FortiNet. What&#8217;s interesting about this VPN solution is that apparently it uses HTTPS. this gave me the idea to&#8230;]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">SSL VPN? </h2>



<p>Lately I&#8217;ve been working on a project where security is very important. In order to connect to the hosting provider I needed to use a specific VPN provided by FortiNet. What&#8217;s interesting about this VPN solution is that apparently it uses HTTPS. this gave me the idea to look for a solution like this for me as well, but I did not want to rent another public IP just for a VPN.</p>



<p>On some articles I read that OpenVPN would be capable to &#8220;share&#8221; the port 443 with the web server/reverse proxy, etc. Truth be told it&#8217;s actually OpenVPN listening on 443 and forwarding all the requests that it does not understand to the web server wich is actually made to listen on another port.</p>



<p>And it works fine, after setting it up Qualy&#8217;s <a href="https://www.ssllabs.com/ssltest/">SSL test</a> is still validating my web server as A+.<br>The next step is to test the VPN solution from behind a very restrictive firewall. I hope to be able to test it as one of my clients is behind such a firewall and I plan to pay him a visit.</p>



<p>And here&#8217;s the detail on how to obtain this:</p>



<p>I&#8217;m running my reverse proxy on Debian 12 bookworm. Installing OpenVPN is one command away:</p>



<pre class="wp-block-preformatted">apt install openvpn</pre>



<h2 class="wp-block-heading">Certificates</h2>



<p>I prefer to keep my vpn certificates and private keys on another computer than the vpn server. This time I even generated them on this computer. To do this I use&nbsp;<a rel="noreferrer noopener" href="https://github.com/OpenVPN/easy-rsa-old/tree/master/easy-rsa/2.0" target="_blank">this</a>&nbsp;specific folder from easy-rsa-old repository.</p>



<p>First you need to edit the vars file to match your certificate names. Then load theese variables and generate the cetificates:</p>



<pre class="wp-block-preformatted">source ./vars
./clean-all
./build-ca
./build-key-server servername
./build-key client1
./build-key client2
etc.

./build-dh</pre>



<h2 class="wp-block-heading">Server config</h2>



<pre class="wp-block-preformatted">port 443
port-share 127.0.0.1 1443

proto tcp
proto tcp6
dev tun

ca ca.crt
cert servername.crt
key servername.key

topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
push "route 192.168.100.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"

keepalive 10 120
tls-auth ta.key 0 # This file is secret

cipher  AES-256-GCM

persist-key
persist-tun

status /var/log/openvpn/openvpn-status.log

verb 3</pre>



<p>copy ca.crt servername.crt and servername.key from the machine the certificate was generated.<br>Also to generate ta.key you should run:</p>



<pre class="wp-block-preformatted">openvpn --genkey tls-auth ta.key</pre>



<p>Save this file&#8217;s contents for the client config. My reverse proxy is haproxy. In my config file I had to change something like:</p>



<pre class="wp-block-preformatted">bind :1443 v4v6 ssl crt /etc/haproxy/haproxy.pem alpn h2,http/1.1
bind :::1443 v4v6 ssl crt /etc/haproxy/haproxy.pem alpn h2,http/1.1</pre>



<p>Then start/restart daemons:</p>



<pre class="wp-block-preformatted">systemctl restart haproxy.service
systemctl enable --now openvpn@servername.service</pre>



<p>Then to se what happens</p>



<pre class="wp-block-preformatted">journalctl -fu -n 100 openvpn@servername</pre>



<h2 class="wp-block-heading">Client config</h2>



<pre class="wp-block-preformatted">client

dev tun

proto tcp
proto tcp6

remote servername.com 443

resolv-retry infinite
nobind
persist-key
persist-tun

&lt;ca>
-----BEGIN CERTIFICATE-----
# here we put the contents of ca.crt
-----END CERTIFICATE-----
&lt;/ca>

&lt;cert>
-----BEGIN CERTIFICATE-----
# contents of client1.crt
-----END CERTIFICATE-----
&lt;/cert>

&lt;key>
-----BEGIN PRIVATE KEY-----
# contents of client1.key
-----END PRIVATE KEY-----
&lt;/key>

remote-cert-tls server
key-direction 1
tls-cipher "DEFAULT:@SECLEVEL=0"

&lt;tls-auth>
-----BEGIN OpenVPN Static key V1-----
# contents of ta.key
-----END OpenVPN Static key V1-----
&lt;/tls-auth>

cipher AES-256-GCM

verb 3</pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/security/2023-10-04-openvpn-on-443.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>DokuWiki a simple solution to sorting documentation</title>
		<link>https://cheriches.com/tips-and-tricks/2020-07-06-dokuwiki-a-simple-solution-to-sorting-documentation.html</link>
					<comments>https://cheriches.com/tips-and-tricks/2020-07-06-dokuwiki-a-simple-solution-to-sorting-documentation.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Mon, 06 Jul 2020 11:21:49 +0000</pubDate>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=628</guid>

					<description><![CDATA[In the IT world you can&#8217;t just remember everything you ever do, so you need a way to set a trail of what you do. Some people write journals and some (me included) write their documentation in a wiki. Wiki today means Wikipedia, Wikipedia runs MediaWiki software which is a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In the IT world you can&#8217;t just remember everything you ever do, so you need a way to set a trail of what you do. Some people write journals and some (me included) write their documentation in a wiki.</p>



<p>Wiki today means Wikipedia, Wikipedia runs MediaWiki software which is a huge piece of software. In order to run it you need a database server and maintenance from time to time. </p>



<p>What I propose you today is docuwiki which is a small footprint wiki.  I suppose you already have a webserver with a running php instance. </p>



<p>Installation is very easy, just download your wiki software: </p>



<pre class="wp-block-preformatted">wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-rc.tgz</pre>



<p>and unpack it:</p>



<pre class="wp-block-preformatted">tar xzvf dokuwiki-rc.tgz
mv dokuwiki-rc-2020-06-09/ dokuwiki</pre>



<p>Then point your browser to the folder you unpacked it into and run the installer</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="928" height="753" src="https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130824-928x753-1.png" alt="" class="wp-image-630" srcset="https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130824-928x753-1.png 928w, https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130824-928x753-1-300x243.png 300w, https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130824-928x753-1-768x623.png 768w" sizes="auto, (max-width: 928px) 100vw, 928px" /></figure>



<p>Your new wiki is ready. You can start writing your pages</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="883" height="758" src="https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130907-883x758-1.png" alt="" class="wp-image-631" srcset="https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130907-883x758-1.png 883w, https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130907-883x758-1-300x258.png 300w, https://cheriches.com/wp-content/uploads/2020/07/Capture-20200706130907-883x758-1-768x659.png 768w" sizes="auto, (max-width: 883px) 100vw, 883px" /></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/tips-and-tricks/2020-07-06-dokuwiki-a-simple-solution-to-sorting-documentation.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>High Availability Load Balancer</title>
		<link>https://cheriches.com/linux/2015-08-12-high-availability-load-balancer.html</link>
					<comments>https://cheriches.com/linux/2015-08-12-high-availability-load-balancer.html#comments</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Wed, 12 Aug 2015 21:05:27 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[VRRP]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=557</guid>

					<description><![CDATA[Suppose you really need a highly available service. Normally you would put a load balancer in front of a server farm. But what happens when the load balancer fails? Well, we could have to load balancers, one which is actually active and the second one kicking in when first one&#8230;]]></description>
										<content:encoded><![CDATA[<p>Suppose you really need a highly available service. Normally you would put a load balancer in front of a server farm. But what happens when the load balancer fails? Well, we could have to load balancers, one which is actually active and the second one kicking in when first one fails.<span id="more-557"></span></p>
<p>We could have two servers or two VMs that are in the same VLAN, they both have their own IP, they are able to communicate/broadcast to each other and there&#8217;s a third IP that is shared between the two servers/VMs. One of them is MASTER the other one is BACKUP.</p>
<p>For a test setup I used CentOS 7, you could use your own favorite distro. I&#8217;ve set-up on my test machines with 192.168.6.110/24 and 192.168.6.120/24 as the machine&#8217;s IPs. I&#8217;m going to set two clustered/highly available IPs 192.168.7.100/24 and 192.168.7.110/24. Notice they&#8217;re from different classes, machine&#8217;s IPs could be anything as long as the two machines can communicate with each other. The default gateway on the two machines should be the one for the clustered IP.</p>
<p>I first installed some basic tools, on both machines</p>
<p><strong>yum install net-tools wget vim mtr</strong></p>
<p>Then, on both I installed the daemon that handles the IP sharing/changing.</p>
<p><strong>yum install keepalived</strong></p>
<p>You could use any software you prefer as a load balancer, it could either be nginx, haproxy, pound etc. In order for your preferred load balancer software to be able to bind/listen to the shared IP you need some kernel configuration. For this we add to /etc/sysctl.conf the folowing line</p>
<pre>net.ipv4.ip_nonlocal_bind=1</pre>
<p>then &#8220;<strong>sysctl -p&#8221;</strong>  will activate the setting.</p>
<p>For the demonstration sake I just stopped and disabled firewalld, though, for production machines you should consider implementing a firewall (honestly I prefer the classic iptables-services for CentOS 7).</p>
<p>Then we need to configure the keepalived daemon. On the first machine &#8220;/etc/keepalived/keepalived.conf&#8221; file looks like this:</p>
<pre>global_defs {
   router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 52
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.7.100/24
        192.168.7.101/24
    }

    virtual_routes {
        default via 192.168.7.1 dev eth0
        }
}</pre>
<p>on the second:</p>
<pre>global_defs {
   router_id LVS_DEVEL
}

vrrp_instance VI_1 {
    state BACKUP
    interface eth0
    virtual_router_id 52
    priority 99
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.7.100/24
        192.168.7.101/24
    }

    virtual_routes {
        default via 192.168.7.1 dev eth0
        }
}</pre>
<p>then on both machines we need to enable and start the daemon:</p>
<p><strong>systemctl enable keepalived.service</strong><br />
<strong>systemctl start keepalived.service</strong></p>
<p>Now we can ping one of the clustered IP, it&#8217;s alive.</p>
<p>To further check ip addr show would like this on the first machine:</p>
<pre>2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:62:b1:58 brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.110/24 brd 192.168.6.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.7.100/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet 192.168.7.101/24 scope global secondary eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe62:b158/64 scope link
       valid_lft forever preferred_lft forever</pre>
<p>and like this, on the second one:</p>
<pre>2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:02:88:bd brd ff:ff:ff:ff:ff:ff
    inet 192.168.6.120/24 brd 192.168.6.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe02:88bd/64 scope link
       valid_lft forever preferred_lft forever</pre>
<p>Then <strong>ip route show</strong> would look like this, on the active node:</p>
<pre>default via 192.168.7.1 dev eth0  proto static  metric 100
192.168.6.0/24 dev eth0  proto kernel  scope link  src 192.168.6.110  metric 100
192.168.7.0/24 dev eth0  proto kernel  scope link  src 192.168.7.100</pre>
<p>and like this on the second one:</p>
<pre>192.168.6.0/24 dev eth0  proto kernel  scope link  src 192.168.6.120  metric 100</pre>
<p>a tail of /var/log/messages would look like this:</p>
<pre>Aug 12 21:17:41 KA1 systemd: Started LVS and VRRP High Availability Monitor.
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Netlink reflector reports IP 192.168.6.110 added
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Netlink reflector reports IP fe80::5054:ff:fe62:b158 added
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Netlink reflector reports IP 192.168.6.110 added
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Registering Kernel netlink reflector
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Netlink reflector reports IP fe80::5054:ff:fe62:b158 added
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Registering Kernel netlink reflector
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Registering Kernel netlink command channel
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Registering gratuitous ARP shared channel
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Opening file '/etc/keepalived/keepalived.conf'.
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Configuration is using : 62972 Bytes
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: Using LinkWatch kernel netlink reflector...
Aug 12 21:17:41 KA1 Keepalived_vrrp[2010]: VRRP sockpool: [ifindex(2), proto(112), unicast(0), fd(10,11)]
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Registering Kernel netlink command channel
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Opening file '/etc/keepalived/keepalived.conf'.
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Configuration is using : 6203 Bytes
Aug 12 21:17:41 KA1 Keepalived_healthcheckers[2009]: Using LinkWatch kernel netlink reflector...
Aug 12 21:17:42 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Transition to MASTER STATE
Aug 12 21:17:42 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Aug 12 21:17:43 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Entering MASTER STATE
Aug 12 21:17:43 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) setting protocol VIPs.
Aug 12 21:17:43 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) setting protocol Virtual Routes
Aug 12 21:17:43 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.7.100
Aug 12 21:17:43 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.7.101
Aug 12 21:17:43 KA1 Keepalived_healthcheckers[2009]: Netlink reflector reports IP 192.168.7.100 added
Aug 12 21:17:43 KA1 Keepalived_healthcheckers[2009]: Netlink reflector reports IP 192.168.7.101 added
Aug 12 21:17:43 KA1 NetworkManager[436]: &lt;info&gt;  Policy set 'eth0' (eth0) as default for IPv4 routing and DNS.
Aug 12 21:17:48 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.7.100
Aug 12 21:17:48 KA1 Keepalived_vrrp[2010]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.7.101</pre>
<p>There you have it, not that hard <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>If you switch off the first machine you&#8217;ll notice that the clustered IP will be raised automatically by the second node. When the first machine comes back online it goes back to it.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/linux/2015-08-12-high-availability-load-balancer.html/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Chasing Ads</title>
		<link>https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html</link>
					<comments>https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html#respond</comments>
		
		<dc:creator><![CDATA[Emil C]]></dc:creator>
		<pubDate>Thu, 29 Jan 2015 10:11:08 +0000</pubDate>
				<category><![CDATA[Phones & Tablets]]></category>
		<category><![CDATA[adb]]></category>
		<category><![CDATA[ADS]]></category>
		<category><![CDATA[Android]]></category>
		<guid isPermaLink="false">https://cheriches.com/?p=522</guid>

					<description><![CDATA[I hate ads. Don&#8217;t get me wrong, I understand why they&#8217;re here, I understand how the system works, I just hate when ads get in your way. For Chrismas, Santa and my Piggy Bank decided to make me have a Galaxy S5 Duos (Duos stands for Dual SIM). It all&#8230;]]></description>
										<content:encoded><![CDATA[<p>I hate ads. Don&#8217;t get me wrong, I understand why they&#8217;re here, I understand how the system works, I just hate when ads get in your way.</p>
<p>For Chrismas, Santa and my Piggy Bank decided to make me have a <a title="Samsung Galaxy S5 Duos" href="http://www.gsmarena.com/samsung_galaxy_s5_duos-6272.php" target="_blank">Galaxy S5 Duos</a> (Duos stands for Dual SIM). It all went well, short after the new year the first Lollipop ROM could be found for the device. The upgrade went well, phone works as expected.</p>
<p>Several days now, it started to show me ads. Every morning and several times a day it would show me ads in full screen. In task manager it would not show so I could not tell which app is showing me the ads.</p>
<p>I started to remove one app per day, but the advancement would be really slow. New ads were coming. Some of them had even sound (would show me a video).</p>
<p>After doing some research online, I found <a title="stackoverflow.com android adb" href="http://stackoverflow.com/a/13212310/1232717" target="_blank">this answer</a> on how to see which app/activity is on screen for the time being.</p>
<p>The first step is to have android SDK tools installed. Download the package from <a title="Android SDK Tools" href="http://developer.android.com/sdk/index.html#Other" target="_blank">here</a>. Install, then set the proper path. To do that search for &#8220;Advanced System Properties&#8221;, chose &#8220;Advanced&#8221; tab and click on &#8220;Enviroment Variables&#8221;, double click on &#8220;PATH&#8221; and add &#8220;<strong>;C:\Program Files (x86)\Android\android-sdk\platform-tools</strong>&#8221; at the end of the line. Click OK, OK OK.</p>
<p>
<a href='https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html/attachment/capture_003_29012015_104557'><img loading="lazy" decoding="async" width="150" height="150" src="https://cheriches.com/wp-content/uploads/2015/01/capture_003_29012015_104557-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://cheriches.com/wp-content/uploads/2015/01/capture_003_29012015_104557-150x150.jpg 150w, https://cheriches.com/wp-content/uploads/2015/01/capture_003_29012015_104557-50x50.jpg 50w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a>
<a href='https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html/attachment/capture_002_29012015_103756'><img loading="lazy" decoding="async" width="150" height="150" src="https://cheriches.com/wp-content/uploads/2015/01/capture_002_29012015_103756-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://cheriches.com/wp-content/uploads/2015/01/capture_002_29012015_103756-150x150.jpg 150w, https://cheriches.com/wp-content/uploads/2015/01/capture_002_29012015_103756-50x50.jpg 50w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a>
<a href='https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html/attachment/capture_004_29012015_104603'><img loading="lazy" decoding="async" width="150" height="150" src="https://cheriches.com/wp-content/uploads/2015/01/capture_004_29012015_104603-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://cheriches.com/wp-content/uploads/2015/01/capture_004_29012015_104603-150x150.jpg 150w, https://cheriches.com/wp-content/uploads/2015/01/capture_004_29012015_104603-50x50.jpg 50w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a>
</p>
<p><a title="Enable developper mode" href="http://www.androidcentral.com/how-enable-samsung-galaxy-s5-developer-options" target="_blank">Enable developer options</a> on your phone and check &#8220;USB debugging&#8221;</p>
<p>Then connect the phone, open a command prompt, and type</p>
<pre>adb devices</pre>
<p>Phone will ask you for the computer authorization and your command prompt window should show your attached phone.</p>
<p>
<a href='https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html/attachment/capture_006_29012015_110250'><img loading="lazy" decoding="async" width="150" height="150" src="https://cheriches.com/wp-content/uploads/2015/01/capture_006_29012015_110250-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://cheriches.com/wp-content/uploads/2015/01/capture_006_29012015_110250-150x150.jpg 150w, https://cheriches.com/wp-content/uploads/2015/01/capture_006_29012015_110250-50x50.jpg 50w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a>
<a href='https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html/attachment/screenshot_2015-01-29-10-57-26'><img loading="lazy" decoding="async" width="150" height="150" src="https://cheriches.com/wp-content/uploads/2015/01/Screenshot_2015-01-29-10-57-26-150x150.png" class="attachment-thumbnail size-thumbnail" alt="" srcset="https://cheriches.com/wp-content/uploads/2015/01/Screenshot_2015-01-29-10-57-26-150x150.png 150w, https://cheriches.com/wp-content/uploads/2015/01/Screenshot_2015-01-29-10-57-26-50x50.png 50w" sizes="auto, (max-width: 150px) 100vw, 150px" /></a>
</p>
<p>Then you want to type</p>
<pre>adb shell</pre>
<p>in the shell type</p>
<pre>dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'</pre>
<p>This should show you the current app/activity.</p>
<p>When your ad shows, connect phone to your PC, type the command and&#8230;. Got ya!</p>
<p><a href="https://cheriches.com/wp-content/uploads/2015/01/capture_001_29012015_084030.jpg" rel="lightbox"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-535" src="https://cheriches.com/wp-content/uploads/2015/01/capture_001_29012015_084030.jpg" alt="capture_001_29012015_084030" width="677" height="343" srcset="https://cheriches.com/wp-content/uploads/2015/01/capture_001_29012015_084030.jpg 677w, https://cheriches.com/wp-content/uploads/2015/01/capture_001_29012015_084030-300x152.jpg 300w" sizes="auto, (max-width: 677px) 100vw, 677px" /></a></p>
<p><a href="https://play.google.com/store/apps/details?id=com.ilicit.bucharest.metro.hd" target="_blank" rel="nofollow">Shame on you</a> Bucharest Metro Map!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://cheriches.com/phones-tablets/2015-01-29-chasing-ads.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
