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

<channel>
	<title>Bert&#039;s notes &#187; Uncategorized</title>
	<atom:link href="https://a20.net/bert/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>https://a20.net/bert</link>
	<description></description>
	<lastBuildDate>Mon, 02 Nov 2020 10:47:22 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.5</generator>
	<item>
		<title>Disable periodic RAID check on Ubuntu 20.04 (systemd)</title>
		<link>https://a20.net/bert/2020/11/02/disable-periodic-raid-check-on-ubuntu-20-04-systemd/</link>
		<comments>https://a20.net/bert/2020/11/02/disable-periodic-raid-check-on-ubuntu-20-04-systemd/#comments</comments>
		<pubDate>Mon, 02 Nov 2020 10:47:13 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=104</guid>
		<description><![CDATA[In the old days to disable periodic RAID checks, which can degrade performance, you would get rid of /etc/cron.d/mdadm . With systemd creep, these days you need to for svc in mdcheck_start.timer mdcheck_continue.timer; do systemctl stop ${svc}; systemctl disable ${svc}; done This works on Ubuntu 20.04. Probably also on other systemd managed systems.]]></description>
				<content:encoded><![CDATA[<p>In the old days to disable periodic RAID checks, which can degrade performance, you would get rid of /etc/cron.d/mdadm . With systemd creep, these days you need to</p>
<pre>for svc in mdcheck_start.timer mdcheck_continue.timer; do systemctl stop ${svc}; systemctl disable ${svc}; done</pre>
<p>This works on Ubuntu 20.04. Probably also on other systemd managed systems.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2020/11/02/disable-periodic-raid-check-on-ubuntu-20-04-systemd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MikroTik SwOS DHCP client not receiving a DHCP IP address</title>
		<link>https://a20.net/bert/2019/02/03/mikrotik-swos-dhcp-client-not-receiving-a-dhcp-ip-address/</link>
		<comments>https://a20.net/bert/2019/02/03/mikrotik-swos-dhcp-client-not-receiving-a-dhcp-ip-address/#comments</comments>
		<pubDate>Sun, 03 Feb 2019 20:36:55 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=98</guid>
		<description><![CDATA[Trying to configure a Mikrotik Routerboard, I found that when booting SwOS, DHCP does not work. That is, the Routerboard, in my case a Cloud Router Switch CRS 317-1G-16S+, would send out DHCP requests but not get an IP address. Turns out this is because the DHCP client of SwOS 2.7 is picky, and the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="https://a20.net/bert/wp-content/uploads/2019/02/crs-317-1g-16s+1.jpg"><img class="alignnone size-medium wp-image-100" alt="crs-317-1g-16s+" src="https://a20.net/bert/wp-content/uploads/2019/02/crs-317-1g-16s+1-300x62.jpg" width="300" height="62" /></a></p>
<p>Trying to configure a Mikrotik Routerboard, I found that when booting SwOS, DHCP does not work. That is, the Routerboard, in my case a Cloud Router Switch CRS 317-1G-16S+, would send out DHCP requests but not get an IP address.</p>
<p>Turns out this is because the DHCP client of SwOS 2.7 is picky, and the dnsmasq DHCP server sent an offer that was not accepted by SwOS.</p>
<p>Using udhcpd as a dhcp server instead, the switch accepted the IP address just fine. I could then update the firmware; from 2.8 on, the SwOS DHCP client is more tolerant of DHCP offers. One of the changes in the SwOS 2.8 release notes says &#8216;make DHCP client work with RFC non compliant DHCP servers&#8217;. At any rate, 2.9 was happy with dnsmasq DHCP offers.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2019/02/03/mikrotik-swos-dhcp-client-not-receiving-a-dhcp-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log in to older APC PDUs with a modern OpenSSH</title>
		<link>https://a20.net/bert/2017/08/19/log-in-to-older-apc-pdus-with-a-modern-openssh/</link>
		<comments>https://a20.net/bert/2017/08/19/log-in-to-older-apc-pdus-with-a-modern-openssh/#comments</comments>
		<pubDate>Sat, 19 Aug 2017 21:55:47 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[cipher]]></category>
		<category><![CDATA[key exchange]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[PDU]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=87</guid>
		<description><![CDATA[If you find yourself needing to SSH into an older APC PDU such as the AP7921 (or basically any appliance without up to date SSH service) and you use a modern OpenSSH, you may see Unable to negotiate with target-host port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 or Unable to negotiate [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you find yourself needing to SSH into an older APC PDU such as the AP7921 (or basically any appliance without up to date SSH service) and you use a modern OpenSSH, you may see</p>
<p style="padding-left: 30px;"><code>Unable to negotiate with target-host port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1</code></p>
<p>or</p>
<p style="padding-left: 30px;"><code>Unable to negotiate with target-host port 22: no matching cipher found. Their offer: blowfish-cbc</code></p>
<p>Since version 7, OpenSSH has disabled these by default because of known weaknesses, see <a href="https://www.openssh.com/txt/release-7.0">www.openssh.com/txt/release-7.0</a>. To talk to these obsolete SSH services, speak the following Ancient Options under a full moon:</p>
<p style="padding-left: 30px;"><code>ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oCiphers=+blowfish-cbc my-user@target-host</code></p>
<p>.. and the doors to Moria may open.</p>
<p>Edit feb-2019: Recent Ubuntu versions have dropped support for legacy ciphers. You might see this error:</p>
<pre>command-line line 0: Bad SSH2 cipher spec '+blowfish-cbc'.</pre>
<p>In that case it may be best to install package &#8220;openssh-client-ssh1&#8243; and use the &#8220;ssh1&#8243; binary instead.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2017/08/19/log-in-to-older-apc-pdus-with-a-modern-openssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issue with Ubuntu 16.04 cross compiler gcc-arm-linux-gnueabihf version 4:5.3.1-1ubuntu1</title>
		<link>https://a20.net/bert/2016/07/13/issue-with-ubuntu-16-04-cross-compiler-gcc-arm-linux-gnueabihf-version-45-3-1-1ubuntu1/</link>
		<comments>https://a20.net/bert/2016/07/13/issue-with-ubuntu-16-04-cross-compiler-gcc-arm-linux-gnueabihf-version-45-3-1-1ubuntu1/#comments</comments>
		<pubDate>Wed, 13 Jul 2016 08:20:32 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cross compile]]></category>
		<category><![CDATA[gas]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[Linaro]]></category>
		<category><![CDATA[u-boot]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 16.04]]></category>
		<category><![CDATA[xenial]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=74</guid>
		<description><![CDATA[Adding this here because Google didn&#8217;t show very obvious matches for this problem. I was trying to build a recent u-boot (for olinuxino-lime2), with the Ubuntu 16.04 supplied arm-linux-gnueabihf-as as supplied in package binutils-arm-linux-gnueabihf 2.26-8ubuntu2.1 that was installed as a dependency with apt-get install gcc-arm-linux-gnueabihf 4:5.3.1-1ubuntu1. I then got the following error: CC arch/arm/cpu/armv7/sunxi/psci.o {standard [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Adding this here because Google didn&#8217;t show very obvious matches for this problem.</p>
<p>I was trying to build a recent u-boot (for olinuxino-lime2), with the Ubuntu 16.04 supplied arm-linux-gnueabihf-as as supplied in package binutils-arm-linux-gnueabihf 2.26-8ubuntu2.1 that was installed as a dependency with apt-get install gcc-arm-linux-gnueabihf 4:5.3.1-1ubuntu1. I then got the following error:</p>
<pre>  CC      arch/arm/cpu/armv7/sunxi/psci.o
{standard input}: Assembler messages:
{standard input}:302: Error: push/pop do not support {reglist}^ -- `pop {r0,r1,r2,r3,r4,r9,ip,pc}^'
scripts/Makefile.build:280: recipe for target 'arch/arm/cpu/armv7/sunxi/psci.o' failed
make[2]: *** [arch/arm/cpu/armv7/sunxi/psci.o] Error 1
scripts/Makefile.build:425: recipe for target 'arch/arm/cpu/armv7/sunxi' failed
make[1]: *** [arch/arm/cpu/armv7/sunxi] Error 2
Makefile:1210: recipe for target 'arch/arm/cpu/armv7' failed
make: *** [arch/arm/cpu/armv7] Error 2</pre>
<p>This appears out to be due to a bug in gcc, possibly <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70830">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70830</a>. I had better luck with Linaro&#8217;s <code>https:</code><code>//releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz</code> <a title="as mentioned by Robert Nelson" href="https://eewiki.net/display/linuxonarm/A20-OLinuXino-LIME">as mentioned by Robert Nelson</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2016/07/13/issue-with-ubuntu-16-04-cross-compiler-gcc-arm-linux-gnueabihf-version-45-3-1-1ubuntu1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Which nginx location stanza is being evaluated?</title>
		<link>https://a20.net/bert/2015/07/27/which-nginx-location-stanza-is-being-evaluated/</link>
		<comments>https://a20.net/bert/2015/07/27/which-nginx-location-stanza-is-being-evaluated/#comments</comments>
		<pubDate>Mon, 27 Jul 2015 15:02:27 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[custom header]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=34</guid>
		<description><![CDATA[One thing I&#8217;ve had to get used to working with nginx, is that it can be hard to understand which configuration stanza (which part / section of the nginx virtualhost configuration file) is being evaluated, especially given an existing site with a complex history. Useful trick here is to add a custom header for each [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>One thing I&#8217;ve had to get used to working with nginx, is that it can be hard to understand which configuration stanza (which part / section of the nginx virtualhost configuration file) is being evaluated, especially given an existing site with a complex history.</p>
<p>Useful trick here is to add a custom header for each of the sections, like so:</p>
<blockquote><p>server {<br />
add_header X-My-Debug-Header-01 srv;<br />
listen 80 default_server;</p>
<p>location ~ test\.php$ {<br />
add_header X-My-Debug-Header-02 loc-test-php;<br />
try_files $uri =404;<br />
fastcgi_pass unix:/var/run/php5-fpm.sock;<br />
include fastcgi_params;<br />
}</p>
<p>location /pictures {<br />
add_header X-My-Debug-Header-03 loc-pictures;<br />
alias /usr/share/nginx/html;<br />
index index.php index.html index.htm;<br />
}</p>
<p>}</p></blockquote>
<p>Now, for each section match, there will be a convenient header which can be viewed with e.g. <code>wget --server-response</code> (wget -S) or <code>curl --head</code> (curl -I).</p>
<p>Caveats: the Firefox LiveHTTPHeaders plugin doesn&#8217;t seem to show non standard headers. Also, when nginx serves a 40x or 50x, the custom header tends not to get served.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2015/07/27/which-nginx-location-stanza-is-being-evaluated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress uploads silently fail while it pretends pictures are there</title>
		<link>https://a20.net/bert/2015/07/27/wordpress-uploads-silently-fail-while-it-pretends-pictures-are-there/</link>
		<comments>https://a20.net/bert/2015/07/27/wordpress-uploads-silently-fail-while-it-pretends-pictures-are-there/#comments</comments>
		<pubDate>Mon, 27 Jul 2015 12:27:32 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=25</guid>
		<description><![CDATA[Silly wordpress issue &#8211; trying to upload an image, everything seems to go smoothly accept that the uploaded image isn&#8217;t there, the links to the images are broken. Permissions for the upload dir look fine too. Chances are, somewhere apache is logging a line like PHP Warning: POST Content-Length of 15148998 bytes exceeds the limit of [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Silly wordpress issue &#8211; trying to upload an image, everything seems to go smoothly accept that the uploaded image isn&#8217;t there, the links to the images are broken. Permissions for the upload dir look fine too. Chances are, somewhere apache is logging a line like</p>
<p><code>PHP Warning: POST Content-Length of 15148998 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: https://your_site.com/your_uri/wp-admin/themes.php?page=custom-background</code></p>
<p>So what is needed is a higher upload limit. In <code>/etc/php5/apache2/php.ini</code> (or corresponding file in your distro, if you use Apache), change <code>post_max_size</code> and <code>upload_max_filesize</code> to something appropriate.</p>
<p>An additional issue I had is where my blog is not on the root of its vhost/domain. So check in what filesystem directory the uploaded files end up, and whether the uploads link points at the right place on your filesystem. The wordpress config files should have the upload directory specified in e.g., on Ubuntu/Debian, <code>/etc/wordpress/config-your_site.com.php</code>.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2015/07/27/wordpress-uploads-silently-fail-while-it-pretends-pictures-are-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TRIM on Linux not supported for modern Samsung SATA drives?</title>
		<link>https://a20.net/bert/2015/07/23/discardtrim-not-getting-through-kvmlvmmdsatassd-stack/</link>
		<comments>https://a20.net/bert/2015/07/23/discardtrim-not-getting-through-kvmlvmmdsatassd-stack/#comments</comments>
		<pubDate>Thu, 23 Jul 2015 13:44:18 +0000</pubDate>
		<dc:creator><![CDATA[bert]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[discard]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[LTS]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[TRIM]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[virtio]]></category>

		<guid isPermaLink="false">https://a20.net/bert/?p=10</guid>
		<description><![CDATA[Previous title: Discard/TRIM not getting through KVM/LVM/MD/SATA/SSD stack I thought my TRIMs were being blocked by the virtualization/LVM stack, but it turns out the bare device won&#8217;t be TRIMmed either. # fstrim /mnt/sde/ fstrim: /mnt/sde/: FITRIM ioctl failed: Operation not supported According to this Algolia blog article there has been an kernel bug affecting these [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Previous title: Discard/TRIM not getting through KVM/LVM/MD/SATA/SSD stack</p>
<p>I thought my TRIMs were being blocked by the virtualization/LVM stack, but it turns out the bare device won&#8217;t be TRIMmed either.</p>
<blockquote><p># fstrim /mnt/sde/<br />
fstrim: /mnt/sde/: FITRIM ioctl failed: Operation not supported</p></blockquote>
<p>According to <a href="https://blog.algolia.com/when-solid-state-drives-are-not-that-solid/">this Algolia blog article</a> there has been an kernel bug affecting these drives (mine is a Samsung 850 PRO 1TB), so I guess it has been blacklisted for the time being.</p>
]]></content:encoded>
			<wfw:commentRss>https://a20.net/bert/2015/07/23/discardtrim-not-getting-through-kvmlvmmdsatassd-stack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
