<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>blog&#39;o&#39;less</title>
    <link>https://freeshell.de/less/</link>
    <description>Recent content on blog&#39;o&#39;less</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 24 Aug 2022 09:12:00 +0100</lastBuildDate>
    
        <atom:link href="https://freeshell.de/less/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>About</title>
      <link>https://freeshell.de/less/about/</link>
      <pubDate>Thu, 15 Mar 2018 21:38:52 +0800</pubDate>
      
      <guid>https://freeshell.de/less/about/</guid>
      
        <description>&lt;p&gt;I&amp;rsquo;m not a great blogger, I&amp;rsquo;m not a real geek, I don&amp;rsquo;t like social media and my English sucks.&lt;/p&gt;
&lt;p&gt;More about me &lt;a href=&#34;https://fedoraproject.org/wiki/User:Alciregi&#34;&gt;https://fedoraproject.org/wiki/User:Alciregi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here you can find my old blog &lt;a href=&#34;https://blogoless.blogspot.it/&#34;&gt;https://blogoless.blogspot.it/&lt;/a&gt;&lt;/p&gt;
</description>
      
    </item>
    
    <item>
      <title>Fedora Silverblue on the Raspberry Pi</title>
      <link>https://freeshell.de/less/post/silverbluerpi/</link>
      <pubDate>Wed, 24 Aug 2022 09:12:00 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/silverbluerpi/</guid>
      
        <description>&lt;p&gt;As of today there is not a raw Silverblue image to flash on an SD card, despite the fact that Silverblue is available for aarch64 architectures.&lt;/p&gt;
&lt;p&gt;In order to install Fedora Silverblue on the Raspberry Pi, there are various guides where you need to prepare the SD card adding UEFI and some other tricks.&lt;/p&gt;
&lt;p&gt;So, why not install Fedora IoT, then rebase to Fedora Silverblue? The power of ostree.&lt;/p&gt;
&lt;p&gt;Install Fedora IoT: follow this guide &lt;a href=&#34;https://docs.fedoraproject.org/en-US/iot/physical-device-setup/&#34;&gt;https://docs.fedoraproject.org/en-US/iot/physical-device-setup/&lt;/a&gt; or this one &lt;a href=&#34;https://www.redhat.com/sysadmin/fedora-iot-raspberry-pi&#34;&gt;https://www.redhat.com/sysadmin/fedora-iot-raspberry-pi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When ready, log in, then add these remote repositories (the ones you can find on a freshly installed Silverblue):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ostree remote add --set=contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist --set=gpgkeypath=/etc/pki/rpm-gpg/ fedora  https://ostree.fedoraproject.org
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ostree remote add --set=gpgkeypath=/etc/pki/rpm-gpg/ fedora-compose https://kojipkgs.fedoraproject.org/compose/ostree/repo/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Info: &lt;a href=&#34;https://docs.fedoraproject.org/en-US/iot/rebasing/&#34;&gt;https://docs.fedoraproject.org/en-US/iot/rebasing/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then, rebase to Fedora Silverblue.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;rpm-ostree rebase fedora:fedora/39/aarch64/silverblue
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Reboot.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl reboot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Et voilà.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Unorthodox way to install Fedora IoT (and FCOS)</title>
      <link>https://freeshell.de/less/post/fedoraiotunortodox/</link>
      <pubDate>Thu, 04 Feb 2021 22:02:39 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/fedoraiotunortodox/</guid>
      
        <description>&lt;p&gt;In a &lt;a href=&#34;https://fedoramagazine.org/start-a-fedora-29-installation-from-the-grub-menu/&#34;&gt;Fedora Magazine article&lt;/a&gt;,
I was facing the &lt;em&gt;problem&lt;/em&gt; that some VPS providers don&amp;rsquo;t offer Fedora as an option.&lt;/p&gt;
&lt;p&gt;Many of them offer a set of images (usually limited to CentOS, Debian and Ubuntu),
and there is no way to upload and use an ISO or an image of your choice.
In other words you can&amp;rsquo;t install a distribution of your choice.&lt;/p&gt;
&lt;p&gt;So. What if you want to install and use &lt;a href=&#34;https://docs.fedoraproject.org/en-US/iot/&#34;&gt;Fedora IoT&lt;/a&gt;
on a VPS?&lt;/p&gt;
&lt;h1 id=&#34;the-unorthodox-way&#34;&gt;The unorthodox way&lt;/h1&gt;
&lt;p&gt;Fedora IoT comes as an &lt;a href=&#34;https://getfedora.org/en/iot/download/&#34;&gt;ISO or as
a Raw image&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s suppose that you have a VPS running CentOS (or whatever). Well, a VPS that
is not running any service, and you want to convert to Fedora IoT.&lt;/p&gt;
&lt;p&gt;This is the command to issue:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -s -o - -L \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;https://download.fedoraproject.org/pub/alt/iot/33/IoT/x86_64/images/Fedora-IoT-33-20201215.0.x86_64.raw.xz \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;| xzcat | sudo dd status=progress bs=4M of=/dev/vda
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;As soon as finished, reboot the system.&lt;/p&gt;
&lt;p&gt;Please take into account that Fedora IoT need a DHCP server and it doesn&amp;rsquo;t provide
a default user/password to log in.&lt;/p&gt;
&lt;p&gt;Once rebooted. Log in and expand the file system.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;22
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;23
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;24
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;25
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fdisk /dev/vda
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Command (m for help): d
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Partition number (1,2, default 2): 2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Partition 2 has been deleted.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Command (m for help): n
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Partition type
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   p   primary (1 primary, 0 extended, 3 free)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   e   extended (container for logical partitions)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Select (default p): p
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Partition number (2-4, default 2): 2
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;First sector (2099200-56943039, default 2099200): 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Last sector, +/-sectors or +/-size{K,M,G,T,P} (2099200-56943039, default 56943039): 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Created a new partition 2 of type &amp;#39;Linux&amp;#39; and of size 26.2 GiB.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Partition #2 contains a ext4 signature.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Do you want to remove the signature? [Y]es/[N]o: n
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Command (m for help): w
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;The partition table has been altered.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Syncing disks.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then, extend the filesystem.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;resize2fs /dev/vda2&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;what-about-fedora-core-os&#34;&gt;What about Fedora Core OS?&lt;/h1&gt;
&lt;p&gt;Same thing. Also for a &lt;a href=&#34;https://docs.fedoraproject.org/en-US/fedora-coreos/&#34;&gt;FCOS&lt;/a&gt; a &lt;a href=&#34;https://getfedora.org/en/coreos/download?tab=metal_virtualized&amp;amp;stream=stable&#34;&gt;raw image&lt;/a&gt; is provided. So:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -s -o - -L \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/33.20210117.3.2/x86_64/fedora-coreos-33.20210117.3.2-metal.x86_64.raw.xz \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;| xzcat | sudo dd status=progress bs=4M of=/dev/vda
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Reboot. And edit the kernel line on GRUB, adding &lt;code&gt;ignition.firstboot&lt;/code&gt; and
&lt;code&gt;ignition.config.url=&lt;/code&gt; pointing to an &lt;a href=&#34;https://docs.fedoraproject.org/en-US/fedora-coreos/producing-ign/&#34;&gt;ignition file&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id=&#34;final-advice&#34;&gt;Final advice&lt;/h1&gt;
&lt;p&gt;Please read your provider&amp;rsquo;s TOS if this operation is explicitly disallowed.&lt;/p&gt;
</description>
      
    </item>
    
    <item>
      <title>Tansaction failed converting CentOS to CentOS Stream</title>
      <link>https://freeshell.de/less/post/centos-stream-transaction-failed/</link>
      <pubDate>Mon, 21 Dec 2020 20:34:14 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/centos-stream-transaction-failed/</guid>
      
        <description>&lt;p&gt;Just for test, I was converting from CentOS Linux to CentOS Stream inside a Podman
container. But something has gone wrong.&lt;/p&gt;
&lt;p&gt;Instructions to convert from the CentOS Linux 8 distribution to CentOS Stream 8
are published at &lt;a href=&#34;https://www.centos.org/centos-stream/&#34;&gt;https://www.centos.org/centos-stream/&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@centos-linux# dnf install centos-release-stream
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@centos-linux# dnf swap centos-{linux,stream}-repos
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@centos-linux# dnf distro-sync
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@centos-stream# cat /etc/centos-release
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;What happens inside a container (Podman in this case, but also in an LXC container on Proxmox), is
that DNF throws an error:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Failed:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  filesystem-3.8-3.el8.x86_64	filesystem-3.8-4.el8.x86_64                                                                               
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Error: Transaction failed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Indeed.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;root@centos-stream# dnf update filesystem
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Running transaction test
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Transaction test succeeded.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Running transaction
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Running scriptlet: filesystem-3.8-4.el8.x86_64                                                                                                                                                                    1/1 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Preparing        :                                                                                                                                                                                                1/1 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Upgrading        : filesystem-3.8-4.el8.x86_64                                                                                                                                                                    1/2 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Error unpacking rpm package filesystem-3.8-4.el8.x86_64
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Verifying        : filesystem-3.8-4.el8.x86_64                                                                                                                                                                    1/2 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Verifying        : filesystem-3.8-3.el8.x86_64                                                                                                                                                                    2/2 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Failed:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  filesystem-3.8-3.el8.x86_64                                                                                filesystem-3.8-4.el8.x86_64                                                                               
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Error: Transaction failed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I think that it is normal, since this pakcage tries to change permissions on some
directories that are read only inside a container.&lt;/p&gt;
&lt;p&gt;To solve:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;echo &amp;quot;%_netsharedpath /sys:/proc&amp;quot; &amp;gt;&amp;gt; /etc/rpm/macros.dist; dnf -y update&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Reference: &lt;a href=&#34;https://bugzilla.redhat.com/show_bug.cgi?id=1589968&#34;&gt;https://bugzilla.redhat.com/show_bug.cgi?id=1589968&lt;/a&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Autofs instead of fstab</title>
      <link>https://freeshell.de/less/post/autofs/</link>
      <pubDate>Wed, 16 Dec 2020 22:56:43 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/autofs/</guid>
      
        <description>&lt;p&gt;There is an inefficient way to mount external storage (local or remote). An
hard to die habit: &lt;code&gt;fstab&lt;/code&gt;. Let&amp;rsquo;s try &lt;code&gt;autofs&lt;/code&gt;.&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;h1 id=&#34;the-issue-with-fstab&#34;&gt;The issue with fstab&lt;/h1&gt;
&lt;p&gt;Ok, maybe fstab is a simple way, and the most immediate way to mount resources
at boot. And we are used to it. But if this external storage (i.e. a CIFS/SAMBA
share, an sshfs filesystem) is not available during boot, or if the connection
get lost while mounted, it could lead to undesired behaviours.&lt;/p&gt;
&lt;h1 id=&#34;using-autofs&#34;&gt;Using autofs&lt;/h1&gt;
&lt;h2 id=&#34;install-autofs&#34;&gt;Install autofs&lt;/h2&gt;
&lt;p&gt;If it isn&amp;rsquo;t already installed&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo dnf install autofs&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;mount-an-usb-disk&#34;&gt;Mount an USB disk&lt;/h2&gt;
&lt;h3 id=&#34;using-the-disk-label-instead-of-devsdx&#34;&gt;Using the disk label instead of /dev/sdX&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s suppose that you have a BTRFS filesystem on the USB disk. Let&amp;rsquo;s label it
(in this way we will not use the classical /dev/sdX since it is unpredictable, and
we don&amp;rsquo;t have to deal with esoteric UUIDs).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo btrfs filesystem label /dev/sda1 btrfs300&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(For ext4 there are the &lt;code&gt;e2label&lt;/code&gt; and &lt;code&gt;tune2fs&lt;/code&gt; commands).&lt;/p&gt;
&lt;h3 id=&#34;configure-autofs&#34;&gt;Configure autofs&lt;/h3&gt;
&lt;p&gt;Create a file like &lt;code&gt;/etc/auto.master.d/trecento.autofs&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/media/   /etc/auto.ext-usb --timeout=300,defaults,user,exec
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Timeoud should umount the disk after 5 minutes, so in theory putting it to
sleep.&lt;/p&gt;
&lt;p&gt;Create the &lt;code&gt;/etc/auto.ext-usb&lt;/code&gt; file containing&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;trecento -fstype=auto           :/dev/disk/by-label/btrfs300
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;As you can see, we are using the disk label to point the BTRFS partition.&lt;/p&gt;
&lt;h3 id=&#34;enable-and-start-the-autofs-service&#34;&gt;Enable and start the autofs service&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl enable autofs --now&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&#34;done&#34;&gt;Done&lt;/h3&gt;
&lt;p&gt;Issuing the &lt;code&gt;mount&lt;/code&gt; command&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/etc/auto.ext-usb on /media type autofs (rw,relatime,fd=24,pgrp=320148,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=2153302)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;You see that the USB disk is not mounted.&lt;!-- raw HTML omitted --&gt;
Listing or accessing the defined directory will automatically mount it&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ll /media/trecento&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mount&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/etc/auto.ext-usb on /media type autofs (rw,relatime,fd=24,pgrp=320148,timeout=300,minproto=5,maxproto=5,indirect,pipe_ino=2153302)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/dev/sdd1 on /media/trecento type btrfs (rw,nosuid,nodev,relatime,seclabel,space_cache,subvolid=5,subvol=/,user)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;sshfs&#34;&gt;sshfs&lt;/h2&gt;
&lt;p&gt;Install the &lt;code&gt;sshfs&lt;/code&gt; package.&lt;/p&gt;
&lt;p&gt;Create the &lt;code&gt;/etc/auto.master.d/conta.autofs&lt;/code&gt; file.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Create the &lt;code&gt;/etc/auto.sshfs&lt;/code&gt; file.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;remote -fstype=fuse,rw,nodev,noatime,allow_other,max_read=65536 :sshfs\#user@remote.host\:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Of course you have to configure ssh keys in order to log in without a password.&lt;/p&gt;
&lt;h2 id=&#34;cifssamba&#34;&gt;CIFS/SAMBA&lt;/h2&gt;
&lt;p&gt;Same steps. Create a &lt;code&gt;/etc/auto.master.d/cifs.autofs&lt;/code&gt; file&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;/samba       /etc/auto.samba
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then &lt;code&gt;/etc/auto.samba&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;remote -fstype=cifs,rw,credentials=/etc/.credentials/windows,uid=1000,sec=ntlm,noserverino ://windows.lan/share
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;You can create a &lt;code&gt;/etc/.credentials/&lt;/code&gt; directory and then a file containing the
credentials, &lt;code&gt;/etc/.credentials/windows&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;username=shareuser
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;password=sharepassword
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;reload-the-changes&#34;&gt;Reload the changes&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl restart autofs&lt;/code&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>resolved and FallbackDNS</title>
      <link>https://freeshell.de/less/post/dnsfallback/</link>
      <pubDate>Wed, 16 Sep 2020 09:42:22 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/dnsfallback/</guid>
      
        <description>&lt;p&gt;Fedora 33 will &lt;a href=&#34;https://fedoraproject.org/wiki/Changes/systemd-resolved&#34;&gt;switch to systemd-resolved&lt;/a&gt;
for name resolution.&lt;/p&gt;
&lt;p&gt;Resolved has a bundled list of DNS used in case of network settings misconfiguration,
i.e. the DHCP doesn&amp;rsquo;t provide the DNS address and probably other cases, for instance
when you don&amp;rsquo;t intentionally set a DNS address in the network configuration.&lt;/p&gt;
&lt;p&gt;These DNS are called FallbackDNS. You can see them with this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ systemd-resolve --status
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Global
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       LLMNR setting: resolve             
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;MulticastDNS setting: no                  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  DNSOverTLS setting: no                  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      DNSSEC setting: no                  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    DNSSEC supported: no                  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Fallback DNS Servers: 1.1.1.1             
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      8.8.8.8             
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      1.0.0.1             
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      8.8.4.4             
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      2606:4700:4700::1111
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      2001:4860:4860::8888
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      2606:4700:4700::1001
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      2001:4860:4860::8844
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;As you can see, these addresses are the ones owned by &lt;strong&gt;Google&lt;/strong&gt; and &lt;strong&gt;Cloudflare&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The fact has raised some concerns. The &lt;a href=&#34;https://github.com/systemd/systemd/issues/8782&#34;&gt;systemd developers&lt;/a&gt;
as well as the &lt;a href=&#34;https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Z7GFECXKNOSA5P7K5W3FDFU63DRF3JZE/&#34;&gt;Fedora maintainer&lt;/a&gt;
seems unwilling to change this default behavior.&lt;!-- raw HTML omitted --&gt;
After all these are the most reliable publicy accessible DNS addresses, and a
fallback DNS is better than resolution errors.&lt;/p&gt;
&lt;p&gt;In normal circumstances you will probably contact these fallback DNS
only in some edge cases. Hovewer a DNS is always configured even if you intentionally
leaved the corresponding field blank in the network configuration.&lt;/p&gt;
&lt;p&gt;Anyway you would like to &lt;strong&gt;avoid the eventuality to contact Google and Cloudflare&lt;/strong&gt;
for all the valid reasons you could have, but that I will not discuss in this post.&lt;/p&gt;
&lt;h2 id=&#34;how-to-change-the-bundled-fallbackdns-addresses&#34;&gt;How to change the bundled FallbackDNS addresses&lt;/h2&gt;
&lt;p&gt;It is pretty easy to change the default FallbackDNS values.
Edit the &lt;em&gt;resolved.conf&lt;/em&gt; file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo $EDITOR /etc/systemd/resolved.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Uncomment and edit the &lt;em&gt;FallbackDNS&lt;/em&gt; option.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;FallbackDNS=
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;You can leave it empty. Or you can add some addresses you trust&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;FallbackDNS=91.239.100.100 84.200.69.80 84.200.70.40
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then restart the &lt;em&gt;resolved&lt;/em&gt; service.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo systemctl restart systemd-resolved.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Check the result:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ systemd-resolve --status
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Global
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       LLMNR setting: resolve       
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;MulticastDNS setting: no            
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  DNSOverTLS setting: no            
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      DNSSEC setting: no            
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    DNSSEC supported: no            
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Fallback DNS Servers: 91.239.100.100
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      84.200.69.80  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                      84.200.70.40  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
      
    </item>
    
    <item>
      <title>OpenBSD install screen problem</title>
      <link>https://freeshell.de/less/post/openbsdinstall/</link>
      <pubDate>Thu, 13 Feb 2020 18:49:24 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/openbsdinstall/</guid>
      
        <description>&lt;p&gt;I never installed any *BSD before.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t even know why I&amp;rsquo;ve installed it. Just to try.&lt;/p&gt;
&lt;p&gt;I found the following problem as soon as started the installer. Good start! :-)&lt;/p&gt;
&lt;p&gt;A bunch of blue lines on the laptop display.&lt;/p&gt;
&lt;p&gt;Solution: &lt;code&gt;machine gop 3&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://freeshell.de/less/img/openbsdblu.png&#34; alt=&#34;blue lines&#34;&gt;&lt;/p&gt;
</description>
      
    </item>
    
    <item>
      <title>LineageOS on Huawei Y6II</title>
      <link>https://freeshell.de/less/post/y6ii/</link>
      <pubDate>Mon, 30 Dec 2019 23:53:24 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/y6ii/</guid>
      
        <description>&lt;p&gt;LineageOS on the Huwaei Y6II (CAM-L21)&lt;/p&gt;
&lt;h1 id=&#34;background&#34;&gt;Background&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;m not a smartphone geek. I never bought a smartphone for myself :-)&lt;/p&gt;
&lt;p&gt;During the last holidays I&amp;rsquo;ve inherited a Huawei Y6II from a family member.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t like stock ROMs, they are full of bloatware and they aren&amp;rsquo;t customizable (and I like the option to have root privileges on my machines). I&amp;rsquo;ve always installed LineageOS (CyanogenMod in the past) on the few smartphones I got.&lt;/p&gt;
&lt;h1 id=&#34;background-2&#34;&gt;Background 2&lt;/h1&gt;
&lt;p&gt;The first thing to do in order to flash a custom ROM, and even before a custom recovery image, you need to unlock the bootloader.&lt;!-- raw HTML omitted --&gt;
Huawei doesn&amp;rsquo;t provide &lt;a href=&#34;https://www.xda-developers.com/huawei-honor-unlock-bootloader-fee/&#34;&gt;a way to unlock it&lt;/a&gt; anymore (some time ago it was possible to ask for the unlock code registering on their web site).
So there are some paid services that provide such code. The price varies from 20 to 60 euros (or a more affordable price, see below). And some of these services look suspicious.
BTW I haven&amp;rsquo;t found a free way (I found a not trivial &lt;a href=&#34;https://forum.xda-developers.com/p8lite/general/guide-unlock-bootloader-root-device-t3977067&#34;&gt;method for the P8 Lite&lt;/a&gt; some time after), so I opted for the service provided by dc-unlocker: 4 euros to get the code. It worked. Maybe it would have been better to spend such money for something else (donate them to a FOSS project?), but hey, let&amp;rsquo;s consider them as 4 euros spent for a new smartphone.&lt;/p&gt;
&lt;h1 id=&#34;and-now&#34;&gt;And now?&lt;/h1&gt;
&lt;p&gt;There aren&amp;rsquo;t ROMs or custom recovery images for the Huawei Y6II&amp;hellip;&lt;/p&gt;
&lt;p&gt;But Huawei Y6II, as far as I can understand, has the same hardware of the Huawei P8 Lite.&lt;/p&gt;
&lt;p&gt;So hey, there is the TWRP recovery image for P8 Lite:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://forum.xda-developers.com/p8lite/orig-development/twrp-t3583180&#34;&gt;XDA Thread about TWRP 3.1.1 for the P8 Lite&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And there is an unofficial and maintaned build of LineageOS with OTA updates (I haven&amp;rsquo;t had the chance to test this yet), thanks to DarkJoker360:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://forum.xda-developers.com/p8lite/development/rom-lineageos-14-1-p8-lite-t3824247&#34;&gt;XDA Thread related to LineageOS 14.1 on P8 Lite&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sourceforge.net/projects/darkjoker360-developements/files/Huawei/P8%20Lite/&#34;&gt;Sourceforge repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As far as I have read, any custom ROM for the P8 Lite, also works on the Y6II.&lt;/p&gt;
&lt;h1 id=&#34;it-works&#34;&gt;It works&lt;/h1&gt;
&lt;p&gt;There is also LineageOS 15.1 (Android Oreo) maintained by DarkJoker360, but it isn&amp;rsquo;t usable (the maintainer consider it as beta): SIM isn&amp;rsquo;t always detected; PIN of the second SIM is asked even if not inserted; the torch doesn&amp;rsquo;t work; the phone hangs; no way to use the camera; etc.&lt;/p&gt;
&lt;p&gt;Instead, LineageOS 14.1 (Android Nougat) works pretty well.&lt;/p&gt;
&lt;p&gt;The stock camera app doesn&amp;rsquo;t work, but you can install another app, like Footej Camera. Sometimes the interface doesn&amp;rsquo;t look fluid while scrolling pages or switching between apps, but you can improve that a little bit by enabling &lt;em&gt;Force GPU rendering&lt;/em&gt; and by lowering &lt;em&gt;Window animation scale&lt;/em&gt;, &lt;em&gt;Transition animation scale&lt;/em&gt; and &lt;em&gt;Animator duration scale&lt;/em&gt; in the developer options.&lt;!-- raw HTML omitted --&gt;
For the rest, it seems OK: screen rotation works, WiFi works, Bluetooth maybe (I didn&amp;rsquo;t tested it), and I can make phone calls :-)&lt;/p&gt;
&lt;p&gt;Sadly, such phone doesn&amp;rsquo;t support OTG.&lt;/p&gt;
&lt;p&gt;Conclusion: if in the future I need to buy a smartphone, I will avoid Huawei.&lt;/p&gt;
&lt;p&gt;P.S.: thanks to DarkJoker360.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Using a Raspberry Pi Zero to automate Fedora installation</title>
      <link>https://freeshell.de/less/post/automatickeyboard/</link>
      <pubDate>Mon, 23 Dec 2019 23:13:15 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/automatickeyboard/</guid>
      
        <description>&lt;p&gt;The Raspberry Pi Zero can be used as an USB device, like a keyboard. One usecase could be: automation.&lt;/p&gt;
&lt;h1 id=&#34;usb-gadgets&#34;&gt;USB Gadgets&lt;/h1&gt;
&lt;p&gt;The Raspberry Pi Zero can be turned in a series of USB devices: a mouse, an &lt;a href=&#34;https://fedoramagazine.org/raspberry-pi-zero-gpio-fedora/&#34;&gt;external GPIO expander&lt;/a&gt;, a serial port, an Ethernet device, a MIDI audio device, and so on.&lt;/p&gt;
&lt;p&gt;If you search on the web, you can find a bunch of information, like here &lt;a href=&#34;https://www.isticktoit.net/?p=1383&#34;&gt;https://www.isticktoit.net/?p=1383&lt;/a&gt; and here &lt;a href=&#34;https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/&#34;&gt;https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;testing-fedora-release-candidates&#34;&gt;Testing Fedora release candidates&lt;/h1&gt;
&lt;p&gt;A lot of validation testing in Fedora is &lt;a href=&#34;https://openqa.fedoraproject.org/&#34;&gt;automated&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is still highly useful to download a &lt;a href=&#34;https://fedoraproject.org/wiki/QA:SOP_compose_request#Release_candidates&#34;&gt;candidate compose&lt;/a&gt; ISO, burn it on an USB stick and install the system on a bare metal (laptop/desktop) machine.&lt;/p&gt;
&lt;p&gt;Obviously this is a lot of manual and repetitive work, especially when we are around the beta and final release.&lt;/p&gt;
&lt;p&gt;As said, a lot of validation testing in Fedora is automated, but it is performed inside virtual machines. &lt;em&gt;&lt;a href=&#34;https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org/message/AXZL6AEM5IST73UJHHB53VF375K74KDJ/&#34;&gt;However, openQA does actually have the capacity to run tests in other environments&lt;/a&gt;&lt;/em&gt;. But it is a lot of effort for a simple user that want to perform a test.&lt;/p&gt;
&lt;p&gt;So, what about automating the keyboard strokes?&lt;/p&gt;
&lt;h1 id=&#34;the-handcraft-automated-keyboard&#34;&gt;The handcraft automated keyboard&lt;/h1&gt;
&lt;p&gt;&lt;img src=&#34;https://freeshell.de/less/img/rpizero.png&#34; alt=&#34;RaspberryPiZero&#34;&gt;&lt;/p&gt;
&lt;p&gt;Searching the web you can find many tutorials talking about how to turn a Raspberry Pi Zero into a USB Keyboard (HID), like this one: &lt;a href=&#34;https://randomnerdtutorials.com/raspberry-pi-zero-usb-keyboard-hid/&#34;&gt;https://randomnerdtutorials.com/raspberry-pi-zero-usb-keyboard-hid/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The idea was to build a Python script, like the one in the last link, but I found that it doesn&amp;rsquo;t perform very well (uppercase strokes appears like lowercase, I didn&amp;rsquo;t find a way to hit the Super key, missed keystrokes), so I pivoted to a series of bash scripts invoking this program &lt;a href=&#34;https://github.com/aagallag/hid_gadget_test&#34;&gt;https://github.com/aagallag/hid_gadget_test&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Still a bit of manual work (mainly in order to write down the initial keystrokes sequence and timing), but even a home user without too many knowledge about testing automation, programming languages and so on, can still play the game.&lt;/p&gt;
&lt;p&gt;So the process is roughly this: you connect the Raspberry Pi Zero to the machine you want to install, you boot the USB stick with the release candidate, you connect via SSH to the RPi e you launch the script.&lt;/p&gt;
&lt;h1 id=&#34;example-script&#34;&gt;Example script&lt;/h1&gt;
&lt;p&gt;This is only an example (an excerpt).&lt;/p&gt;
&lt;p&gt;This one configure the network with a static address.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;</description>
      
    </item>
    
    <item>
      <title>More about using systemd timers: reboot</title>
      <link>https://freeshell.de/less/post/systemd-cron0/</link>
      <pubDate>Sat, 23 Feb 2019 14:05:38 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/systemd-cron0/</guid>
      
        <description>&lt;p&gt;In the previous &lt;a href=&#34;https://freeshell.de/less/post/systemd-cron/&#34;&gt;post&lt;/a&gt; I wrote about systemd timers.&lt;!-- raw HTML omitted --&gt;
The problem with such configuration is that, upon reboot, timers are not started automatically.&lt;/p&gt;
&lt;p&gt;Obviously, like other services, we need to specify in which case start the systemd unit (&lt;code&gt;WantedBy=&lt;/code&gt;) and we need to enable it.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Then&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo vi /etc/systemd/system/test.timer&lt;/code&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;And finally enable the timer:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl enable test.timer&lt;/code&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Using systemd timers instead of cron</title>
      <link>https://freeshell.de/less/post/systemd-cron/</link>
      <pubDate>Thu, 14 Feb 2019 00:05:38 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/systemd-cron/</guid>
      
        <description>&lt;p&gt;Cron is not part of Fedora Silverblue (as well as Atomic Host).&lt;!-- raw HTML omitted --&gt;
You can install (overlay) it with rpm-ostree. But it is better to avoid as much as possible to overlay packages in such systems.&lt;!-- raw HTML omitted --&gt;
So, how to take advantage of systemd instead of cron?&lt;/p&gt;
&lt;h1 id=&#34;systemd-timers&#34;&gt;Systemd timers&lt;/h1&gt;
&lt;p&gt;You can use systemd timers to schedule tasks.&lt;/p&gt;
&lt;h2 id=&#34;using-sudo&#34;&gt;Using sudo&lt;/h2&gt;
&lt;p&gt;Create a &lt;code&gt;.service&lt;/code&gt; and a &lt;code&gt;.timer&lt;/code&gt; file&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo vi /etc/systemd/system/test.service&lt;/code&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;code&gt;sudo vi /etc/systemd/system/test.timer&lt;/code&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Then start the timer:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo systemctl start test.timer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s see the active timers and their status:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;systemctl list-timers&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You should see your timer:&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;To disable a timer:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;systemctl stop test.timer&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;timers-for-unprivileged-users&#34;&gt;Timers for unprivileged users&lt;/h2&gt;
&lt;p&gt;With crontab you can create tasks for an individual user. You can do that with systemd as well, without using sudo.&lt;/p&gt;
&lt;p&gt;You should create this directory&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mkdir -p .config/systemd/user/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And place here the &lt;code&gt;.service&lt;/code&gt; and &lt;code&gt;.timer&lt;/code&gt; files described in the previous paragraph.&lt;!-- raw HTML omitted --&gt;
Then use the &lt;code&gt;--user&lt;/code&gt; option.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;h2 id=&#34;scheduling-syntax&#34;&gt;Scheduling syntax&lt;/h2&gt;
&lt;p&gt;Every 10 minutes (at 0, 10, 20 etc. of each hour):&lt;!-- raw HTML omitted --&gt;
&lt;code&gt;OnCalendar=*:0/10&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Every 2 hours (at 12 am, 2 am, 4 am, etc.):
&lt;code&gt;OnCalendar=0/2:00:00&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Every 30 minutes starting from when the timer was enabled:
&lt;code&gt;OnUnitActiveSec=30m&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;p&gt;Systemd timers man page: &lt;a href=&#34;https://www.freedesktop.org/software/systemd/man/systemd.timer.html&#34;&gt;https://www.freedesktop.org/software/systemd/man/systemd.timer.html&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;
Systemd time and date specification: &lt;a href=&#34;https://www.freedesktop.org/software/systemd/man/systemd.time.html&#34;&gt;https://www.freedesktop.org/software/systemd/man/systemd.time.html&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;update&#34;&gt;Update&lt;/h2&gt;
&lt;p&gt;Update: &lt;a href=&#34;https://freeshell.de/less/post/systemd-cron0/&#34;&gt;More about using systemd timers: reboot&lt;/a&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Fedora on Raspberry Pi: camera module</title>
      <link>https://freeshell.de/less/post/fedorarpicamera/</link>
      <pubDate>Tue, 04 Dec 2018 20:56:06 +0100</pubDate>
      
      <guid>https://freeshell.de/less/post/fedorarpicamera/</guid>
      
        <description>&lt;p&gt;How to use the camera module on a Raspberry Pi 3 running Fedora 29?&lt;/p&gt;
&lt;p&gt;Pretty simple. Upgrade the system.&lt;/p&gt;
&lt;p&gt;Enable the camera module by adding this line in &lt;code&gt;/boot/efi/config.txt&lt;/code&gt;, then reboot.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Once rebooted, load this module&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Check if the device is in place.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;You can load the module at boot time (need improvement)&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Include your user in the video group, in order to avoid root or sudo&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Let&amp;rsquo;s install some software (please note: there are a lot of dependencies here)&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;In order to test the camera, we can take a picture with &lt;strong&gt;fswebcam&lt;/strong&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;In order to test streaming, we can use &lt;strong&gt;gstreamer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On the Raspberry Pi&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;And on your PC (the &lt;em&gt;DST_IP&lt;/em&gt;)&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Last note: I didn&amp;rsquo;t use an official RPi camera, but a camera bought for less than 10 euros on a famous e-commerce web site. However also the official camera was reported to work.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Remote control LibreOffice slides with a micro:bit</title>
      <link>https://freeshell.de/less/post/microbitremote/</link>
      <pubDate>Wed, 22 Aug 2018 20:40:45 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/microbitremote/</guid>
      
        <description>&lt;p&gt;LibreOffice Impress, has a feature useful to switch presentation slides using an &lt;a href=&#34;https://help.libreoffice.org/6.0/he/text/simpress/guide/impress_remote.html&#34;&gt;Android app&lt;/a&gt;.
It is a very nice feature, but the last time I used it (on version 5) it was a little unreliable.&lt;/p&gt;
&lt;p&gt;So, what about an handmade solution? Just for fun. You need a micro:bit and a Linux (Fedora) workstation (equipped with Bluetooth).&lt;/p&gt;
&lt;p&gt;So we will use Bluetooth, Python (3), &lt;code&gt;evemu-event&lt;/code&gt; command line tool (read &lt;a href=&#34;https://fedoramagazine.org/simulate-device-input-evemu/&#34;&gt;this post on Fedora Magazine&lt;/a&gt;) and a micro:bit.
The micro:bit buttons will be used to switch between the slides (button B go to the next one, button A return back to the previous slide).&lt;/p&gt;
&lt;p&gt;You can read &lt;a href=&#34;https://github.com/alcir/microbit-ble&#34;&gt;here on github&lt;/a&gt; some basic information I wrote some time ago about micro:bit Bluetooth and Linux.&lt;/p&gt;
&lt;h2 id=&#34;install-bluepy-python-module&#34;&gt;Install bluepy Python module&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s install bluepy module for your user (or system wide as you wish).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pip3 install bluepy --user&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you get compilation problems, install glib2-devel.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;dnf install glib2-devel&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;install-evemu&#34;&gt;Install evemu&lt;/h2&gt;
&lt;p&gt;Like xdotool, evemu tools are useful to simulate keyboard input and mouse activity. So you can scripting keystrokes. Why using evemu instead of xdotool? Because the former works also on Wayland.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo dnf install evemu&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;By using evemu tools you can record keystrokes, save them to a file, and replay them. But this goes beyond this post scope.&lt;/p&gt;
&lt;h3 id=&#34;try-evemu&#34;&gt;Try evemu&lt;/h3&gt;
&lt;p&gt;First of all you have to locate your keyboard&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ls /dev/input/by-path/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Or&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo evemu-describe&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can see which key you press using this command (where &lt;code&gt;/dev/input/by-path/pci-0000\:39\:00.0-usb-0\:1.6\:1.0-event-kbd&lt;/code&gt; is the keyboard device).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo evemu-record /dev/input/by-path/pci-0000\:39\:00.0-usb-0\:1.6\:1.0-event-kbd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;evemu-event&lt;/code&gt; command you can simulate a keystroke. Note that value 1 means key pressed, and 0 key released.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;evemu-event /dev/input/by-path/pci-0000\:39\:00.0-usb-0\:1.6\:1.0-event-kbd --type EV_KEY --code KEY_LEFTMETA --value 1 --sync \&lt;/code&gt;&lt;!-- raw HTML omitted --&gt;
&lt;code&gt;evemu-event /dev/input/by-path/pci-0000\:39\:00.0-usb-0\:1.6\:1.0-event-kbd --type EV_KEY --code KEY_LEFTMETA --value 0 --sync&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You have pressed the SUPER key (win key), so, if you are on GNOME, the activities overview should appear.&lt;/p&gt;
&lt;h2 id=&#34;programming-the-microbit&#34;&gt;Programming the micro:bit&lt;/h2&gt;
&lt;p&gt;Simply use these &lt;a href=&#34;https://makecode.microbit.org/&#34;&gt;makecode&lt;/a&gt; blocks.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://freeshell.de/less/img/microbitremote.png&#34; alt=&#34;makecode blocks&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;the-python-code&#34;&gt;The Python code&lt;/h2&gt;
&lt;p&gt;You can find an example &lt;a href=&#34;https://github.com/alcir/microbit-ble/blob/master/python/remotemicrobit.py&#34;&gt;here on github&lt;/a&gt; (remember: i&amp;rsquo;m not a Python developer).&lt;/p&gt;
&lt;p&gt;Once paired the micro:bit with your PC, launch the Python script (using &lt;code&gt;sudo&lt;/code&gt;), start LibreOffice Impress, open a presentation, put it in full screen and voila: you can show your slides using the micro:bit buttons.&lt;/p&gt;
&lt;p&gt;Look it in action &lt;a href=&#34;https://twitter.com/alciregi/status/1026928848997371909&#34;&gt;here on Twitter&lt;/a&gt;&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Fedora &#43; RPi: how to read a 1wire temperature sensor</title>
      <link>https://freeshell.de/less/post/fedorarpi1wire/</link>
      <pubDate>Mon, 20 Aug 2018 21:17:00 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/fedorarpi1wire/</guid>
      
        <description>&lt;p&gt;Continuing to explore the GPIO and the devices and sensors we can use with Fedora installed on a Raspberry Pi 3, in this post I will describe how to use a 1wire temperature sensor, in this case a DS18B20.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I’m not an engineer nor a kernel developer. This post comes from try and fail tasks, googling for info, observations, etc. Pay attention when working with the GPIO pins and the electricity. I&amp;rsquo;m still alive and my RPi still works pretty well, but damages to your RPi coming from tasks here described cannot be attributed to me :-) As usual, forgive my English. &lt;strong&gt;The purpose of this post is for test and tinkering&lt;/strong&gt;.&lt;!-- raw HTML omitted --&gt;
Tested on on F28.&lt;/p&gt;
&lt;h1 id=&#34;device-tree&#34;&gt;Device Tree&lt;/h1&gt;
&lt;p&gt;1wire is not available by default.&lt;!-- raw HTML omitted --&gt;
The simple way should be to enable it in the device tree as an overlay in the &lt;code&gt;config.txt&lt;/code&gt; file.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Unfortunately dtoverlay still doesn&amp;rsquo;t work on Fedora.&lt;/p&gt;
&lt;p&gt;We need to put the content of the overlay file directly on the main DTB file.&lt;!-- raw HTML omitted --&gt;
To do this we can follow the same instructions used for &lt;a href=&#34;https://freeshell.de/less/post/fedorarpispi/&#34;&gt;SPI&lt;/a&gt;, but applying &lt;a href=&#34;https://alciregi.fedorapeople.org/dts/bcm283x-1wire.patch&#34;&gt;this patch&lt;/a&gt; to the &lt;code&gt;bcm283x.dtsi&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;Once replaced &lt;code&gt;/boot/dtb/bcm2837-rpi-3-b.dtb&lt;/code&gt; with the new one, reboot the Raspberry.&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;h1 id=&#34;wire-w1_gpio-and-w1_therm-modules&#34;&gt;wire, w1_gpio and w1_therm modules&lt;/h1&gt;
&lt;p&gt;If you issue the &lt;code&gt;lsmod |grep wire&lt;/code&gt; command, you should see that &lt;code&gt;wire&lt;/code&gt; and &lt;code&gt;w1_gpio&lt;/code&gt; modules are loaded.&lt;/p&gt;
&lt;p&gt;In order to read the DS18B20 themperature sensor, we need also the &lt;code&gt;w1_therm&lt;/code&gt; module, that we can find in the kernel-modules-extra RPM.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;We can now load it using &lt;code&gt;modprobe&lt;/code&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;At this point we can find the sensor in &lt;code&gt;/sys/bus/w1/devices/28-xxxxxxxxxx&lt;/code&gt;, in my case &lt;code&gt;28-03168cad32ff&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s read the temperature:&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Ok, &lt;code&gt;t=26000&lt;/code&gt;, that is 26°C&lt;/p&gt;
&lt;h1 id=&#34;wiring&#34;&gt;Wiring&lt;/h1&gt;
&lt;p&gt;Note, I&amp;rsquo;m not sure, but since I have a resistor between data and v+ pins of the sensor, I used the content of the w1-gpio-pullup-overlay (definitions for w1-gpio module with external pullup, maybe if you want to enable the RPi internal pullup you have to use the content of the w1-gpio overlay?).&lt;/p&gt;
&lt;p&gt;The gpio pin to use with the sensor data pin is BCM4 (&lt;a href=&#34;https://pinout.xyz&#34;&gt;https://pinout.xyz&lt;/a&gt;).&lt;/p&gt;
&lt;h1 id=&#34;kernel-updates&#34;&gt;kernel updates&lt;/h1&gt;
&lt;p&gt;Remember that the /boot/dtb is a link to a directory related to the current kernel and it will be changed at every kernel update, so the &lt;code&gt;bcm2837-rpi-3-b.dtb&lt;/code&gt; loaded at boot will be replaced.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>SPI on Fedora, or how to use a Nokia 5110 display</title>
      <link>https://freeshell.de/less/post/fedorarpispi/</link>
      <pubDate>Thu, 16 Aug 2018 19:56:06 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/fedorarpispi/</guid>
      
        <description>&lt;p&gt;As opposed to &lt;a href=&#34;https://fedoraproject.org/wiki/Architectures/ARM/i2c#OLED_display_on_the_Raspberry_Pi_3&#34;&gt;I2C&lt;/a&gt;, SPI on Fedora ARM doesn&amp;rsquo;t work out of the box.
In this post I will describe what I did in order to use a Nokia 5110 LCD display on a Raspberry Pi 3 running Fedora 28 (Fedora-Minimal-armhfp-28).&lt;/p&gt;
&lt;p&gt;This is due to the fact that the device tree definition file shipped with the upstream kernel doesn&amp;rsquo;t include all the necessary bits. And some other thing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://freeshell.de/less/img/spilcd.png&#34; alt=&#34;Fedora LCD display&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I’m not an engineer nor a kernel developer. This post comes from try and fail tasks, googling for info, observations, etc. Pay attention when working with the GPIO pins and the electricity. I&amp;rsquo;m still alive and my RPi still works pretty well, but damages to your RPi coming from tasks here described cannot be attributed to me :-) As usual, forgive my English. &lt;strong&gt;The purpose of this post is for test and tinkering&lt;/strong&gt;.&lt;/p&gt;
&lt;h1 id=&#34;how-to-add-the-required-bits&#34;&gt;How to add the required bits&lt;/h1&gt;
&lt;h2 id=&#34;look-into-a-dtb-file&#34;&gt;Look into a DTB file&lt;/h2&gt;
&lt;p&gt;Fedora on the Raspberry Pi 3 load the bcm2837-rpi-3-b dtb located in &lt;code&gt;/boot/dtb/bcm2837-rpi-3-b.dtb&lt;/code&gt;.
Since this file is &lt;em&gt;compiled&lt;/em&gt; you have to use some command line tool to read the content. The human readable format is DTS (Device Tree Source Format), more info &lt;a href=&#34;https://elinux.org/Device_Tree_Reference&#34;&gt;here&lt;/a&gt;. You can compile and decompile them using the &lt;code&gt;dtc&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo fdtdump /boot/dtb/bcm2837-rpi-3-b.dtb&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To get a specific value:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo fdtget /boot/dtb/bcm2837-rpi-3-b.dtb /soc/spi@7e204000 status&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You will see that the spi status is disabled. You could use &lt;code&gt;fdtput&lt;/code&gt; to enable it, but it is not sufficient.&lt;/p&gt;
&lt;h2 id=&#34;install-some-rpm-packages&#34;&gt;Install some RPM packages&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s install some packages.
Maybe there are other ways to put the necessary bits in place. But I was unable to do it better.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf update
sudo systemcl reboot  # if there are kernel updates
sudo dnf install -y rpmdevtools
sudo dnf builddep -y kernel
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;messing-with-the-kernel-sources&#34;&gt;Messing with the kernel sources&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s install the kernel source.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install -y rpmdevtools
sudo dnf builddep -y kernel

dnf download --source kernel
rpm -i kernel-*.src.rpm
cd rpmbuild
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Run &amp;ldquo;rpmbuild -bp&amp;rdquo; for extracting source tree.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rpmbuild -bp SPECS/kernel.spec&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now go to the arm dts directory&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cd ~/rpmbuild/BUILD/kernel-4.17.fc28/linux-4.17.14-202.fc28.armv7hl/arch/arm/boot/dts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Download and apply these &lt;em&gt;patches&lt;/em&gt;. The involved files are: &lt;code&gt;bcm2837-rpi-3-b.dts&lt;/code&gt;, &lt;code&gt;bcm283x.dtsi&lt;/code&gt; and &lt;code&gt;bcm2835-rpi.dtsi&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://alciregi.fedorapeople.org/dts/bcm2837-rpi-3-b.dts.patch&#34;&gt;bcm2837-rpi-3-b.dts.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://alciregi.fedorapeople.org/dts/bcm283x.dtsi.patch&#34;&gt;bcm283x.dtsi.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://alciregi.fedorapeople.org/dts/bcm2835-rpi.dtsi.patch&#34;&gt;bcm2835-rpi.dtsi.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The last one contains the &lt;code&gt;gpiomem&lt;/code&gt; descriptor, that as far as I can understand, it is needed by various python libraries.&lt;/p&gt;
&lt;p&gt;Now compile the final dtb file&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cpp -I../../../../include -E -P -x assembler-with-cpp bcm2837-rpi-3-b.dts | dtc -I dts -O dtb -o bcm2837-rpi-3-b.dtb -
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the previous step we didn&amp;rsquo;t enable the spi device, we can do that using th &lt;code&gt;fdtput&lt;/code&gt; command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;fdtput --type s bcm2837-rpi-3-b.dtb /soc/spi@7e204000 status okay
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At this point we can copy the file to the final destination and reboot the Raspberry.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo cp /boot/dtb/bcm2837-rpi-3-b.dtb /boot/dtb/bcm2837-rpi-3-b.dtb.ORIG

sudo cp ./bcm2837-rpi-3-b.dtb /boot/dtb/bcm2837-rpi-3-b.dtb

sudo systemctl reboot
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If everything seems to be all right, you should see the devices under &lt;code&gt;/dev&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ls -la /dev/spidev*
crw-------. 1 root root 153, 0 May 11 12:26 /dev/spidev0.0
crw-------. 1 root root 153, 1 May 11 12:26 /dev/spidev0.1
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;test-the-spi-interface&#34;&gt;Test the SPI interface&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s use a tool included in the kernel sources.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd ~/rpmbuild/BUILD/kernel-4.17.fc28/linux-4.17.14-202.fc28.armv7hl/tools/spi/
make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running this program&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo ./spidev_fdx /dev/spidev0.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/dev/spidev0.0: spi mode 0x0, 8 bits per word, 125000000 Hz max`
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Running this other program&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo ./spidev_test -D /dev/spidev0.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This should be the result:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;gpiomem&#34;&gt;gpiomem&lt;/h2&gt;
&lt;p&gt;Stuff like Adafruit_Nokia_LCD, and many drivers and libraries require the existence of &lt;code&gt;/dev/gpiomem&lt;/code&gt;, as far as I can understand.
But the &lt;strong&gt;bcm2835-gpiomem&lt;/strong&gt; kernel module is not upstream, so you need to download and compile it.&lt;/p&gt;
&lt;p&gt;Again: maybe there are better ways to achieve this task.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install kernel-devel
mkdir /var/tmp/bcm2835-gpiomem
cd /var/tmp/bcm2835-gpiomem
curl -O https://raw.githubusercontent.com/raspberrypi/linux/rpi-4.17.y/drivers/char/broadcom/bcm2835-gpiomem.c
vi Makefile
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In the Makefile put these lines:&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Note: before $(MAKE) there is a &lt;em&gt;TAB&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s compile the module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;make -C /lib/modules/`uname -r`/build M=`pwd` modules

sudo make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And let&amp;rsquo;s try to load it:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo modprobe bcm2835-gpiomem&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Verify that &lt;code&gt;/dev/gpiomem&lt;/code&gt; is in place.&lt;/p&gt;
&lt;h1 id=&#34;lets-try-the-lcd-display&#34;&gt;Let&amp;rsquo;s try the LCD DISPLAY&lt;/h1&gt;
&lt;h2 id=&#34;wiring&#34;&gt;Wiring&lt;/h2&gt;
&lt;p&gt;Follow some better guide related to how to wire the Nokia 5110 LDC display to the RPi.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;RPi Physical pin&lt;/th&gt;
&lt;th&gt;RPi pin&lt;/th&gt;
&lt;th&gt;LCD pin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;GPIO 24&lt;/td&gt;
&lt;td&gt;RST&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;td&gt;CE0&lt;/td&gt;
&lt;td&gt;CE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;GPIO 23&lt;/td&gt;
&lt;td&gt;DC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;MOSI&lt;/td&gt;
&lt;td&gt;DIN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;SCLK&lt;/td&gt;
&lt;td&gt;CLK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;3.3V&lt;/td&gt;
&lt;td&gt;VCC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;GPIO 17&lt;/td&gt;
&lt;td&gt;BL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;using-the-adafruit-nokia-lcd-python-library&#34;&gt;Using the Adafruit Nokia LCD Python library&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;sudo dnf install python3-devel python3-pillow python3-RPi.GPIO

git clone https://github.com/adafruit/Adafruit_Nokia_LCD.git
cd Adafruit_Nokia_LCD
sudo python3 setup.py install
cd examples
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Run some example code.&lt;/p&gt;
&lt;h1 id=&#34;kernel-updates&#34;&gt;kernel updates&lt;/h1&gt;
&lt;p&gt;Remember that the /boot/dtb is a link to a directory related to the current kernel and it will be changed at every kernel update, so the &lt;code&gt;bcm2837-rpi-3-b.dtb&lt;/code&gt; loaded at boot will be replaced.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>GPIO on Fedora, or how to turn on an LED</title>
      <link>https://freeshell.de/less/post/fedorarpigpio/</link>
      <pubDate>Wed, 15 Aug 2018 21:21:06 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/fedorarpigpio/</guid>
      
        <description>&lt;p&gt;GPIO sysfs interface is deprecated, and in the future it will be removed from the kernel. So in Fedora the kernel is compiled without such flag. As a consequence we don&amp;rsquo;t have the &lt;code&gt;/sys/class/gpio&lt;/code&gt; path. We have instead the &lt;code&gt;/dev/gpiochipN&lt;/code&gt; character device.&lt;/p&gt;
&lt;p&gt;This means that the piles of examples you can find on the web are unuseful on Fedora in order to drive, for instance a LED from the command line (&lt;code&gt;echo 22 &amp;gt; /sys/class/gpio/export&lt;/code&gt; and stuff like this doesn&amp;rsquo;t work). This also means that many Python modules don&amp;rsquo;t work and that, probably, even kernel modules doen’t work anymore (&lt;!-- raw HTML omitted --&gt;at least I was unable to use sensors based on the &lt;em&gt;1wire&lt;/em&gt; protocol&lt;!-- raw HTML omitted --&gt;).&lt;/p&gt;
&lt;p&gt;Without going further into the question, after all I’m only a regular user, here you will find the steps to turn on an LED using such character interface, and to read the status of a button.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: this post comes from try and fail tasks, googling for info, observations, etc. I’m not an engineer nor a kernel developer. Pay attention when working with the GPIO pins and the electricity. I&amp;rsquo;m still alive and my RPi still works pretty well, but damages to your RPi coming from tasks here described cannot be attributed to me :-) As usual, forgive my English.&lt;/p&gt;
&lt;h1 id=&#34;install-libgpiod-cli-tools-and-python-module&#34;&gt;Install libgpiod CLI tools (and Python module)&lt;/h1&gt;
&lt;p&gt;Install the CLI tools needed to communicate to the device. And install the Python3 module as well.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo dnf install libgpiod-utils python3-libgpiod&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;list-the-devices-and-the-pins&#34;&gt;List the devices and the pins&lt;/h1&gt;
&lt;p&gt;To list the GPIO chips that you can find on your hardware, use the &lt;code&gt;gpiodetect&lt;/code&gt; command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpiodetect&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;On the Raspberry Pi 3 you should get these devices:&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;And we will be interested in gpiochip0&lt;/p&gt;
&lt;p&gt;With &lt;code&gt;gpioinfo&lt;/code&gt; you will list all the GPIO pins (called &lt;em&gt;lines&lt;/em&gt;, or somewhere else, &lt;em&gt;offsets&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioinfo&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Will show:&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;What? 53 lines? But aren’t there 40 pins on the RPi?&lt;!-- raw HTML omitted --&gt;
Don’t worry. As far as I can understand, these are the BCM numbers (well, the GPIO is a bit complex) and in fact, as we will see, you will address the pins with the BCM number and not the physical one. Not all these numbers (lines) have a corresponding physical pin and as a consequence, you need to pay attention on which number you will use.&lt;!-- raw HTML omitted --&gt;
At least these lines will cause a system hang or instability: 14, 15, 42, 43, from 48 up to 53&lt;!-- raw HTML omitted --&gt;
The &lt;strong&gt;usable&lt;/strong&gt; lines (corresponding to the BCM numbers) are: 5, 6, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27&lt;!-- raw HTML omitted --&gt;
For the corresponding physical match, take a look here &lt;a href=&#34;https://pinout.xyz&#34;&gt;https://pinout.xyz&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;
The “unnamed” value is due to the fact that there is not a description inside some device tree file (?).&lt;/p&gt;
&lt;h1 id=&#34;turning-on-an-led&#34;&gt;Turning on an LED&lt;/h1&gt;
&lt;p&gt;Now connect an LED to the physical pin 40 (that is BCM 21): connect the short leg of the LED (the negative leg, called the cathode) to the GND, and the positive one (the anode) to the RPi pin. Please remember to place a resistor (220 or 330 ohm is ok) between the pin and the anode (or between the chatode and the ground).&lt;/p&gt;
&lt;p&gt;And issue this command&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioset gpiochip0 21=1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You will see a very quick flash. In fact, with libgpiod “the new character device interface guarantees all allocated resources are freed after closing the device file descriptor“.&lt;/p&gt;
&lt;p&gt;Using this command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioset --mode=wait gpiochip0 21=1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The LED will stay on until you hit CTRL+C&lt;/p&gt;
&lt;p&gt;To turn on the LED for 4 seconds, use this command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioset -s 4 --mode=time gpiochip0 21=1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The -b option will detach from the terminal while the LED will stays on, and it will be switched off after 50 seconds&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioset --mode=time -s 50 -b gpiochip0 21=1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The “-l” option will set the line active state to low, and in practice you will have to use the value 0 in order to turn on the LED (inside foggy ideas I can imagine why but I’m unable to explain).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioset --mode=wait -l gpiochip0 21=0&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;driving-a-button&#34;&gt;Driving a button&lt;/h1&gt;
&lt;p&gt;Connect a button to a pin (i.e. physical pin 39, that is BCM 20) following some example you can find on various sites.&lt;/p&gt;
&lt;p&gt;To read the state of the pin:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpioget 0 20&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As you can see, you can also use the number of the chip (0) instead of the name (gpiochip0).
When you will push the button, the value should become 1, conversely when the button will be released, the value will be 0 (you can use the -l option here as well).&lt;/p&gt;
&lt;h2 id=&#34;monitor-a-pin-state&#34;&gt;Monitor a pin state&lt;/h2&gt;
&lt;p&gt;You can also monitor the events using the command gpiomon&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo gpiomon  0 20&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When you push the button you will receive a RISING EDGE event&lt;/p&gt;
&lt;p&gt;&lt;code&gt;event:  RISING EDGE offset: 20 timestamp: [1534429122.849170137]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When you release the button a you will get a FALLING EDGE event&lt;/p&gt;
&lt;p&gt;&lt;code&gt;event: FALLING EDGE offset: 20 timestamp: [1534429080.281903624]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As you can see you will receive also a timestamp. This could be useful to implement some sort of debouncing as some Python modules do underneath the hood for you in order do discard spurious state changes.
In fact, sometimes, pushing the button you will get all these state changes, even if the button is pressed one time.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;h1 id=&#34;python&#34;&gt;Python&lt;/h1&gt;
&lt;p&gt;Look here &lt;a href=&#34;https://github.com/brgl/libgpiod/tree/master/bindings/python/examples&#34;&gt;https://github.com/brgl/libgpiod/tree/master/bindings/python/examples&lt;/a&gt; for some examples made using the Python library.&lt;/p&gt;
&lt;h1 id=&#34;sudo-and-how-to-use-the-gpiochip-device-as-unprivileged-user&#34;&gt;sudo and how to use the gpiochip device as unprivileged user&lt;/h1&gt;
&lt;p&gt;As you can see, you need to use sudo in order to interact with the GPIO. These are the right on the device&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;h2 id=&#34;udev&#34;&gt;UDEV&lt;/h2&gt;
&lt;p&gt;You can use the GPIO as an unprivileged user creating for instance an UDEV rule.&lt;/p&gt;
&lt;p&gt;Create a gpio group and assign your user to such group&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Create an udev rule:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;echo &#39;KERNEL==&amp;quot;gpiochip0&amp;quot;, SUBSYSTEM==&amp;quot;gpio&amp;quot;, MODE=&amp;quot;0660&amp;quot;, GROUP=&amp;quot;gpio&amp;quot;&#39; &amp;gt; /etc/udev/rules.d/85-gpiochip.rules&lt;/code&gt;&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;(Maybe perform a reboot in order to verify if all is ok).
Log in as you user and you should be able to interact with the GPIO whitout using sudo.&lt;/p&gt;
</description>
      
    </item>
    
    <item>
      <title>Rebase Fedora-IOT 28 to 29</title>
      <link>https://freeshell.de/less/post/fedora-iot-rebase/</link>
      <pubDate>Thu, 19 Jul 2018 12:16:13 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/fedora-iot-rebase/</guid>
      
        <description>&lt;p&gt;I&amp;rsquo;m not sure if I followed the right steps, but this is how to &lt;em&gt;upgrade&lt;/em&gt; the Fedora IOT Edition from version 28 to version 29 (currently Rawhide).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ sudo ostree remote add --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-29-primary fedora-iot-29 https://dl.fedoraproject.org/iot/repo/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ sudo rpm-ostree rebase fedora-iot-29:fedora/29/aarch64/iot&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ sudo systemctl reboot&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But right now, once you are on F29 there seems to be &lt;a href=&#34;https://github.com/projectatomic/rpm-ostree/issues/1462&#34; title=&#34;github issue g_string_insert_len: assertion &#39;len == 0 || val != NULL&#39; failed&#34;&gt;a bug&lt;/a&gt; preventing further rpm-ostree upgrades.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Rsyslog Ssl Error</title>
      <link>https://freeshell.de/less/post/rsyslog-ssl-error/</link>
      <pubDate>Wed, 04 Jul 2018 22:05:42 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/rsyslog-ssl-error/</guid>
      
        <description>&lt;p&gt;If you use a central logserver built using &lt;strong&gt;rsyslog&lt;/strong&gt;, and your machines are configured in order to send the logs to this logserver using TCP and SSL, and you get this error (at least on CentOS 7):&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Jul  4 21:03:29 hostname rsyslogd: unexpected GnuTLS error -110 in nsd_gtls.c:1755: The TLS connection was non-properly terminated.  [v8.24.0 try http://www.rsyslog.com/e/2078 ]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The problem is on your logserver: the key length used in the certificate is too small.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$DefaultNetstreamDriverCAFile /path/to/your-ca.crt
$DefaultNetstreamDriverCertFile /path/to/logserver.cert
$DefaultNetstreamDriverKeyFile /path/to/logserver.key
&lt;/code&gt;&lt;/pre&gt;</description>
      
    </item>
    
    <item>
      <title>Gnome: execute a script at login</title>
      <link>https://freeshell.de/less/post/gnome-script-login/</link>
      <pubDate>Wed, 04 Jul 2018 21:54:49 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/gnome-script-login/</guid>
      
        <description>&lt;p&gt;How to execute a bash script when you log in to GNOME.&lt;/p&gt;
&lt;p&gt;If you are a real nerd, and if you want to hear a voice that welcome you to your desktop, this is the solution:&lt;/p&gt;
&lt;p&gt;Create a file in &lt;code&gt;~/.config/autostart/&lt;/code&gt; with the &lt;code&gt;.desktop&lt;/code&gt; extension.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;vi .config/autostart/welcome.desktop&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Write something like this in the file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[Desktop Entry]
Name=Welcome
GenericName=Welcome
Comment=Welcome
Exec=/home/youruser/bin/welcomescript.sh
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then create a script &lt;code&gt;vi /home/youruser/bin/welcomescript.sh&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash

espeak -venglish+f5 Welcome!
&lt;/code&gt;&lt;/pre&gt;</description>
      
    </item>
    
    <item>
      <title>Custom Fedora Live Media</title>
      <link>https://freeshell.de/less/post/custom-fedora-live-media/</link>
      <pubDate>Fri, 11 May 2018 22:05:38 +0200</pubDate>
      
      <guid>https://freeshell.de/less/post/custom-fedora-live-media/</guid>
      
        <description>&lt;p&gt;When testing things, like in the QA Fedora team, sometimes could be useful the creation of a Fedora iso. This post is about &lt;strong&gt;live-media-creator&lt;/strong&gt;.
I mean, for instance, think to anaconda: a new version land on koji, or in updates-testing repository, and you want to test it as soon as possible, without having to wait for a new compose (that is a nightly build).&lt;/p&gt;
&lt;p&gt;These are the steps to create a Live iso, with updated packages, and also additional packages. Refer to &lt;!-- raw HTML omitted --&gt;this previous post&lt;!-- raw HTML omitted --&gt; in order to set up a local dnf repository containing an updated or an additional rpm package to include in the live iso.&lt;/p&gt;
&lt;p&gt;Disclaimer: I don&amp;rsquo;t know what I&amp;rsquo;m doing, so refer to &lt;a href=&#34;https://fedoraproject.org/wiki/Livemedia-creator-_How_to_create_and_use_a_Live_CD&#34;&gt;https://fedoraproject.org/wiki/Livemedia-creator-_How_to_create_and_use_a_Live_CD&lt;/a&gt; to get more information (I grab the following steps from this wiki page). The following steps worked for me.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo dnf install mock mock-core-configs&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo usermod -a -G mock &amp;lt;youruser&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Here you can find the profiles you can build &lt;code&gt;/etc/mock/&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can trick the tool configuration, by creating this configuration file &lt;code&gt;mkdir ~/.config&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;vi ~/.config/mock.cfg&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For example you can use your home directory (maybe there is more disk space) instead of the default location (&lt;code&gt;/var/lib/mock/&lt;/code&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;config_opts[&#39;basedir&#39;] = &#39;/home/&amp;lt;user&amp;gt;/tmp/var/lib/mock/&#39;
config_opts[&#39;cache_topdir&#39;] = &#39;/home/&amp;lt;user&amp;gt;/tmp/var/cache/mock&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Continue with these steps&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo setenforce 0&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mock -r fedora-29-x86_64 --init&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mock -r fedora-29-x86_64 --install lorax-lmc-novirt vim-minimal pykickstart spin-kickstarts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mock -r fedora-29-x86_64 --shell --old-chroot&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cd /usr/share/spin-kickstarts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Add the &lt;!-- raw HTML omitted --&gt;local dnf repository&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;echo &amp;quot;repo --name=test --baseurl=http://127.0.0.1:8000&amp;quot; &amp;gt;&amp;gt; fedora-repo-not-rawhide.ks&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Edit this file if you want to include additional packages in the live iso &lt;code&gt;fedora-workstation-common.ks&lt;/code&gt;, and add the packages names under&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;%packages
...
python-fedora
gcc
git
koji
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;ldquo;Merge&amp;rdquo; (by mean of the &lt;em&gt;includes&lt;/em&gt;, let&amp;rsquo;s create a single ks file) the kickstart files&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ksflatten --config fedora-live-workstation.ks -o flat-fedora-live-workstation.ks --version F28&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;livemedia-creator --ks flat-fedora-live-workstation.ks --no-virt --resultdir /var/lmc --project Fedora-Workstation-live-test --make-iso --volid Fedora-Workstation-29-test --iso-only --iso-name Fedora-Workstation-29-live-test-x86_64.iso --releasever 29 --title Fedora-Workstation-live-test --macboot&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After a while, supposing that there were no problems, exit from the chroot and you should find the iso here:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;~/tmp/var/lib/mock/fedora-29-x86_64/root/var/lmc/Fedora-Workstation-29-live-test-x86_64.iso&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Quickly test if the iso works&lt;/p&gt;
&lt;p&gt;&lt;code&gt;qemu-system-x86_64 -enable-kvm -localtime -m 2G -vga std -drive file=tmp/var/lib/mock/fedora-rawhide-x86_64/root/var/lmc/Fedora-Workstation-29-live-test-x86_64.iso,readonly,cache=none,format=raw,if=virtio&lt;/code&gt;&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
