<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Sysupgrade on iMil.net</title>
    <link>http://imil.net/blog/tags/sysupgrade/</link>
    <description>Recent content in Sysupgrade on iMil.net</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 17 Aug 2013 10:02:43 +0000</lastBuildDate>
    <atom:link href="http://imil.net/blog/tags/sysupgrade/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>/rescue to the rescue</title>
      <link>http://imil.net/blog/posts/2013/rescue-to-the-rescue/</link>
      <pubDate>Sat, 17 Aug 2013 10:02:43 +0000</pubDate>
      <guid>http://imil.net/blog/posts/2013/rescue-to-the-rescue/</guid>
      <description>&lt;p&gt;I need vacations, I really do.&lt;/p&gt;&#xA;&lt;p&gt;Yesterday night, I decided to upgrade my home&amp;rsquo;s Internet gateway from &lt;em&gt;NetBSD&lt;/em&gt; 6.0 to 6.1. As I already had some success with &lt;a href=&#34;http://julipedia.meroh.net/&#34;&gt;jmmv&lt;/a&gt;&amp;rsquo;s &lt;a href=&#34;http://blog.netbsd.org/tnf/entry/introducing_sysbuild_and_sysupgrade&#34;&gt;sysupgrade&lt;/a&gt;, I simply ran&lt;/p&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;p&gt;&amp;hellip; on an &lt;strong&gt;i386&lt;/strong&gt; machine. That obviously lead to massive failure such as:&lt;/p&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;!-- raw HTML omitted --&gt;&#xA;&lt;p&gt;As I still had an &lt;em&gt;SSH&lt;/em&gt; session opened on that server, my first thought was to use &lt;code&gt;/rescue&lt;/code&gt;&amp;rsquo;s binaries, which are statically linked, but guess what, &lt;code&gt;/rescue&lt;/code&gt; is also part of &lt;code&gt;base.tgz&lt;/code&gt;, the first set installed by &lt;code&gt;sysupgrade(8)&lt;/code&gt;. Doomed? not yet. I remembered that my gateway mounts &lt;code&gt;/usr/pkgsrc&lt;/code&gt; over NFS, from my &lt;em&gt;NetBSD&lt;/em&gt; &lt;a href=&#34;http://imil.net/wp/2009/06/19/pour-100-balles-tas-plus-rien/&#34;&gt;NAS&lt;/a&gt;. So I fetched &lt;em&gt;i386&lt;/em&gt;&amp;rsquo;s &lt;code&gt;base.tgz&lt;/code&gt; on the &lt;em&gt;NFS&lt;/em&gt; server, extracted &lt;code&gt;/rescue/sh&lt;/code&gt; and &lt;code&gt;/rescue/tar&lt;/code&gt;, copied them to &lt;code&gt;/usr/pkgsrc&lt;/code&gt; and made &lt;code&gt;sh&lt;/code&gt; &lt;a href=&#34;http://en.wikipedia.org/wiki/Setuid&#34;&gt;suid root&lt;/a&gt; so I could call &lt;code&gt;tar&lt;/code&gt; with the &lt;code&gt;-C /&lt;/code&gt; flag in order to replace &lt;em&gt;amd64&lt;/em&gt; binaries. For some reason, &lt;em&gt;rescue&lt;/em&gt;&amp;rsquo;s &lt;code&gt;tar&lt;/code&gt; would not &lt;code&gt;gunzip base.tgz&lt;/code&gt;, I really was not brave enough to dig into this, so I &lt;em&gt;gunzipped&lt;/em&gt; it on the &lt;em&gt;NFS&lt;/em&gt; server.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
