<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Linux on tech.notes</title>
    <link>https://newblog.utzer.de/tags/linux/</link>
    <description>Recent content in Linux on tech.notes</description>
    <generator>Hugo</generator>
    <language>de</language>
    <lastBuildDate>Fri, 08 Dec 2023 07:16:52 +0000</lastBuildDate>
    <atom:link href="https://newblog.utzer.de/tags/linux/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Debian Bluetooth headset problem</title>
      <link>https://newblog.utzer.de/2023/12/08/debian-bluetooth-headset-problem/</link>
      <pubDate>Fri, 08 Dec 2023 07:16:52 +0000</pubDate>
       <guid isPermaLink="false">https://tech.utzer.de/?p=167</guid> 
      <description>&lt;p&gt;I had some problems to get my Bluetooth headset working with my Debian, the fault was kind of non informative.&lt;/p&gt;
&lt;p&gt;In the end I found in some forum that it needs the following lib.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;libspa-0.2-bluetooth
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I found this &lt;a href=&#34;https://forums.debian.net/viewtopic.php?t=155520&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Connection Failed: br-connection-profile-unavailable&lt;/p&gt;
&lt;p&gt;This was the only fault shown in the GUI.&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Linux cp command with reflink</title>
      <link>https://newblog.utzer.de/2023/07/11/linux-cp-command-with-reflink/</link>
      <pubDate>Tue, 11 Jul 2023 09:36:53 +0000</pubDate>
       <guid isPermaLink="false">https://tech.utzer.de/?p=152</guid> 
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp -pRv --reflink=auto /source/folder /destination/folder
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;copy files and directories&lt;br&gt;
-p same as &amp;ndash;preserve=mode,ownership,timestamps&lt;br&gt;
-R, -r, &amp;ndash;recursive&lt;br&gt;
copy directories recursively&lt;br&gt;
-v verbose, show what is going on.&lt;/p&gt;
&lt;p&gt;&amp;ndash;reflink[=WHEN]&lt;br&gt;
control clone/CoW copies.&lt;/p&gt;
&lt;p&gt;This just copied 169GB of files in 20 seconds. This only works on supported filesystems, so for example by &amp;ldquo;#Btrfs, #CIFS, #NFS 4.2, #OCFS2, #overlayfs, and #XFS&amp;rdquo;. See &lt;a href=&#34;https://unix.stackexchange.com/a/631238&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Explainshell tells you &lt;a href=&#34;https://explainshell.com/explain?cmd=cp+-pRv+--reflink%3Dauto+%2Fsource%2Ffolder%2Ffile+%2Fdestination%2Ffolder%2Ffile&#34;&gt;this&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix error &#34;Failed to start DHCP Client Daemon&#34; after upgrade to &#34;Bullseye&#34; on RaspberryPI</title>
      <link>https://newblog.utzer.de/2023/06/04/fix-error-failed-to-start-dhcp-client-daemon-after-upgrade-to-bullseye-on-raspberrypi/</link>
      <pubDate>Sun, 04 Jun 2023 10:45:14 +0000</pubDate>
       <guid isPermaLink="false">https://tech.utzer.de/?p=141</guid> 
      <description>&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This fix can be applied before the reboot after the upgrade from Buster to Bullseye, if you missed it you need a MicroSD card reader and some Linux computer (another RaspberryPI would do) to edit the file.&lt;/p&gt;
&lt;p&gt;In the file&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/systemd/system/dhcpcd.service.d/wait.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;there is a wrong path for the dhcpd, it has to be changed.&lt;/p&gt;
&lt;p&gt;wrong (from buster):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/usr/lib/dhcpcd5/dhcpcd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;correct and new on Bullseye:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/usr/sbin/dhcpcd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So you need to do this before the reboot, otherwise the RaspberryPi will not have a working WIFI or Ethernet connection after the reboot and will not allow you to login from remote by SSH.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrade Raspberry Pi OS from Buster to Bullseye</title>
      <link>https://newblog.utzer.de/2023/05/11/upgrade-raspberry-pi-raspbian-from-buster-to-bullseye/</link>
      <pubDate>Thu, 11 May 2023 13:07:58 +0000</pubDate>
       <guid isPermaLink="false">https://tech.utzer.de/?p=131</guid> 
      <description>&lt;p&gt;So to upgrade Raspbian, as it was previously called, from Buster to Bullseye went smooth an easy, I tried this with some Pi2B (armhf 32Bit) and with a Pi4. These two are headless systems, so I don&amp;rsquo;t know if this works well for any systems with window managers.&lt;/p&gt;
&lt;p&gt;Better run these commands in screen, so when the SSH connection is interrupted you can reconnect and resume your work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: For the update there is a culprit, it will cause a problem with dhcpd, so before the reboot 13. (was point 12. before I added the remark below) please &lt;a href=&#34;https://newblog.utzer.de/?p=141&#34;&gt;check this post&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adding Debian Buster Backports repo to RaspberryPi for tor</title>
      <link>https://newblog.utzer.de/2021/02/05/adding-debian-buster-backports-repo-to-raspberrypi-for-tor/</link>
      <pubDate>Fri, 05 Feb 2021 22:05:47 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=123</guid> 
      <description>&lt;ol&gt;
&lt;li&gt;Add key&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-gdscript3&#34; data-lang=&#34;gdscript3&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl https:&lt;span style=&#34;color:#f92672&#34;&gt;//&lt;/span&gt;ftp&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;master&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;debian&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;org&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;keys&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;archive&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;key&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;10.&lt;/span&gt;asc &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; gpg &lt;span style=&#34;color:#f92672&#34;&gt;--&lt;/span&gt;import
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gpg &lt;span style=&#34;color:#f92672&#34;&gt;--&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;export&lt;/span&gt; DC30D7C23CBBABEE &lt;span style=&#34;color:#f92672&#34;&gt;|&lt;/span&gt; apt&lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;key add &lt;span style=&#34;color:#f92672&#34;&gt;-&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The fingerprint (DC30D7C23CBBABEE) given is the one that the first command outputs, which is the fingerprint of the key downloaded by curl.&lt;/p&gt;
&lt;p&gt;2. Add repo&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &amp;#34;deb http://deb.debian.org/debian buster-backports main&amp;#34; |sudo tee /etc/apt/sources.list.d/deb_buster_backports.list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;run apt update/upgrade&lt;/li&gt;
&lt;li&gt;Install tor, I did this by:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt-get install -o Dpkg::Options::=&amp;#34;--force-confold&amp;#34; -y tor
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Debian for Raspberry Pi</title>
      <link>https://newblog.utzer.de/2021/02/05/debian-for-raspberry-pi/</link>
      <pubDate>Fri, 05 Feb 2021 21:59:23 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=120</guid> 
      <description>&lt;p&gt;Just some info, because the last time when I flashed an SD card I took #Raspbian only because I could not find the #Debian images as quick.&lt;/p&gt;
&lt;p&gt;Infos about Debian for #Pi are here:&lt;br&gt;
&lt;a href=&#34;https://wiki.debian.org/RaspberryPi&#34;&gt;https://wiki.debian.org/RaspberryPi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Images:&lt;br&gt;
&lt;a href=&#34;https://raspi.debian.net/tested-images/&#34;&gt;https://raspi.debian.net/tested-images/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some tips for settings, like #SSH on first boot (you need to add a key):&lt;br&gt;
&lt;a href=&#34;https://raspi.debian.net/defaults-and-settings/&#34;&gt;https://raspi.debian.net/defaults-and-settings/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux swap with dphys-swapfile</title>
      <link>https://newblog.utzer.de/2020/04/20/linux-swap-with-dphys-swapfile/</link>
      <pubDate>Mon, 20 Apr 2020 10:29:10 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=105</guid> 
      <description>&lt;p&gt;This is a solution for a #RaspberryPi, some #VPS without swap of some machine setup without swap where you need swap for something without wanting to fiddle with the drive partitions or so.&lt;/p&gt;
&lt;p&gt;This is a quick and dirty &amp;ldquo;short manual&amp;rdquo; for #Debian based #Systemd environments (such as #Ubuntu, #Mint or #Raspbian).&lt;/p&gt;
&lt;p&gt;First run this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat &amp;gt; dphys-swap.sh &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;lt;&amp;lt; EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;#~/up
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;apt-get install dphys-swapfile
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;echo &amp;#34;CONF_SWAPSIZE=2048&amp;#34;|tee -a /etc/dphys-swapfile
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;dphys-swapfile setup
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;dphys-swapfile swapon
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;systemctl restart dphys-swapfile.service
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;systemctl status dphys-swapfile.service
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;free -h
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will just create a short #bash #script with the needed commands to run to get #dphys setup and running. Please alter the number 2048 to your need, it is the size of the swap memory that will be setup. The size of the swap should most likely by equal to the real memory installed, sometimes twice the size seems to be a good choice too.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debian based full updates in one command</title>
      <link>https://newblog.utzer.de/2020/04/20/debian-based-full-updates-in-one-command/</link>
      <pubDate>Mon, 20 Apr 2020 10:24:40 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=107</guid> 
      <description>&lt;p&gt;I have this small script deployed on any of my #Debian based systems, it just does all the update, upgrade, dist-upgrade, autoremove and autoclean in one run.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt; $# -eq &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  sudo sh -c &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;apt-get update &amp;amp;&amp;amp; apt-get upgrade &amp;amp;&amp;amp; apt-get dist-upgrade &amp;amp;&amp;amp; apt-get update &amp;amp;&amp;amp; apt-get autoremove &amp;amp;&amp;amp; apt-get autoclean&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  sudo sh -c &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;apt-get update &amp;amp;&amp;amp; apt-get upgrade &amp;amp;&amp;amp; apt-get dist-upgrade &amp;amp;&amp;amp; apt-get update &amp;amp;&amp;amp; apt-get install &lt;/span&gt;$@&lt;span style=&#34;color:#e6db74&#34;&gt; &amp;amp;&amp;amp; apt-get autoremove &amp;amp;&amp;amp; apt-get autoclean&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I have this script deployed in a lazy manner, I just have it sitting in my users home folder and called it &amp;ldquo;up&amp;rdquo;, I did do a &amp;ldquo;chmod +x up&amp;rdquo; and just start it like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create Linux dm-crypt BTRFS RAID 1</title>
      <link>https://newblog.utzer.de/2020/02/12/create-linux-dm-crypt-btrfs-raid-1/</link>
      <pubDate>Wed, 12 Feb 2020 08:35:36 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=98</guid> 
      <description>&lt;p&gt;To do this you need two empty drives, with the guide below all data on the drive will be lost if it is not empty!&lt;/p&gt;
&lt;h4 id=&#34;1-install-cryptsetup&#34;&gt;1. Install cryptsetup&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;apt-get install cryptsetup
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;2-create-the-dm-crypt&#34;&gt;2. Create the dm-crypt&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cryptsetup -y -v luksFormat /dev/sdb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cryptsetup -y -v luksFormat /dev/sdc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(Make sure to use the correct device. To show available devices use &amp;ldquo;lsblk&amp;rdquo;.)&lt;/p&gt;
&lt;h4 id=&#34;3-mount-the-cryptsetup-disk&#34;&gt;3. Mount the cryptsetup disk&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cryptsetup luksOpen /dev/sdb disk1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cryptsetup luksOpen /dev/sdc disk2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;4-check-if-this-was-successful&#34;&gt;4. Check if this was successful&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ls -l /dev/mapper/disk*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;or
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo cryptsetup -v status disk1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo cryptsetup -v status disk2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;5-create-btrfs-volume-raid-1-this-means-all-data-and-meta-data-is-mirrored-which-means-if-you-use-2-drives-with-ie-4tb-each-you-can-only-use-4tg-over-all-in-the-btrfs-mounted-volume&#34;&gt;5. Create BTRFS volume RAID 1, this means all data and meta-data is mirrored, which means if you use 2 drives with i.e. 4TB each you can only use 4TG over all in the BTRFS mounted volume.&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkfs.btrfs -m raid1 -d raid1 /dev/mapper/disk1 /dev/mapper/disk2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You could list more than two drive, for example to increase redundancy, but if you want to use more drive to increase storage you would have to use a different Raid level.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to add a swap drive to your system</title>
      <link>https://newblog.utzer.de/2019/10/02/how-to-add-a-swap-drive-to-your-system/</link>
      <pubDate>Wed, 02 Oct 2019 08:04:57 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=84</guid> 
      <description>&lt;p&gt;How to add a swap drive to your system, in this case I did this for a virtual machine (qemu) running &lt;a href=&#34;https://wiki.archlinux.org/index.php/Swap&#34;&gt;Arch Linux&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;See at the bottom for information about the virtual drive for qemu.&lt;/p&gt;
&lt;p&gt;List current available to system disks:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo blkid
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;List all disks:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo lsblk
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Format as swap:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo mkswap /dev/vdb
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;gives back the UUID&lt;/p&gt;
&lt;p&gt;Now the new swap disk will be shown when executing this again:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo blkid
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(also give the UUID)&lt;/p&gt;</description>
    </item>
    <item>
      <title>SSH config, ssh via jumphost and autossh (ssh to Tor hidden service)</title>
      <link>https://newblog.utzer.de/2019/04/14/ssh-config-ssh-via-jumphost-and-autossh-ssh-to-tor-hidden-service/</link>
      <pubDate>Sun, 14 Apr 2019 20:03:29 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=62</guid> 
      <description>&lt;p&gt;This will be a short post about the above mentioned parts, lets start right away.&lt;/p&gt;
&lt;h3 id=&#34;ssh-config&#34;&gt;SSH config&lt;/h3&gt;
&lt;p&gt;Every user can have a SSH client configuration file, it is located in ~/.ssh/config (where &lt;strong&gt;config&lt;/strong&gt; ist the filename).&lt;br&gt;
My SSH config file, I guess as many other users file, grew over time. Lets start with some things from my file.&lt;/p&gt;
&lt;p&gt;There is the &lt;strong&gt;Host&lt;/strong&gt; part, it usually contains the name you want to assign to the host to use it later on. Tipp, use some short and of course unique name.&lt;/p&gt;</description>
    </item>
    <item>
      <title>explainshell.com</title>
      <link>https://newblog.utzer.de/2019/03/16/explainshell/</link>
      <pubDate>Sat, 16 Mar 2019 21:09:38 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=40</guid> 
      <description>&lt;p&gt;Did you know &lt;a href=&#34;https://explainshell.com/&#34;&gt;explainshell.com&lt;/a&gt; yet? Try it, for example with that command from &lt;a href=&#34;https://newblog.utzer.de/2019/03/15/lsof-local-open-ports/&#34;&gt;last time&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo lsof -i -P -n | grep LISTEN
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;this is an amazing web site I use often so see what commands do that I find somewhere. Try it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>disable vim visual mode</title>
      <link>https://newblog.utzer.de/2019/03/16/disable-vim-visual-mode/</link>
      <pubDate>Sat, 16 Mar 2019 20:52:31 +0000</pubDate>
       <guid isPermaLink="false">http://tech.utzer.de/?p=33</guid> 
      <description>&lt;p&gt;It drives me nuts that I cannot copy something from a ssh terminal when I use vim. I have no clue what this visual mode is meant to do besides anoying my.&lt;/p&gt;
&lt;p&gt;My solution:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &amp;#34;set mouse-=a&amp;#34; &amp;gt;&amp;gt; ~/.vimrc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;no more visual mode -&amp;gt; marking and copying text from vim by using the mouse works again.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
