porfirio's blog - fc22https://porfiriopaiz.github.io/site/2017-03-26T16:46:00-06:00Upgrading from Fedora 22 to Fedora 232017-03-26T16:46:00-06:002017-03-26T16:46:00-06:00Porfirio Páiztag:porfiriopaiz.github.io,2017-03-26:/site/posts/2017/03/26/upgrading-from-fedora-22-to-fedora-23.html<p>From May 26th, 2015, to November 22nd, 2016, I was rocking Fedora 22 on my
Lenovo ThinkPad T440p – a solid year and a half of tech bliss. However, on July
19th, 2016, Fedora 22 gracefully entered its <a class="reference external" href="https://fedoraproject.org/wiki/End_of_life">End of Life (EOL)</a> phase. This translates to no
more security or maintenance updates coming our way, signaling the friendly
nudge to upgrade to a newer, stable version.</p>
<p>So, in this post, I'm spilling the beans on how to smoothly transition to
Fedora 23 using the ever-reliable dnf package manager. Let's keep that Fedora
love alive and kicking! 🚀</p>
<!-- TEASER_END -->
<p>Following a year and a half of utilizing Fedora 22, the package cache had
accumulated roughly 10GB of space on my hard drive.</p>
<img alt="" class="align-center" src="https://porfiriopaiz.github.io/site/images/fc22_to_fc23/screenshot_from_2016-11-22_16-05-06.png" />
<p>To instruct dnf to retain the downloaded packages in the cache, you need to
append the following line to the dnf configuration file located at
<tt class="docutils literal">/etc/dnf/dnf.conf</tt>:</p>
<div class="highlight"><pre><span></span><span class="go">su -c "echo 'keepcache = true' >> /etc/dnf/dnf.conf"</span>
</pre></div>
<div class="section" id="upgrading-fedora-23">
<h2>Upgrading Fedora 23</h2>
<div class="section" id="prerequisites-for-upgrading">
<h3>Prerequisites for upgrading</h3>
<p>Firstly, it's crucial to ensure ample space on our <tt class="docutils literal">/</tt> partition. This is
particularly important because the update process entails downloading the
latest version of every single package installed in our system. While there's a
chance that our cache might be brimming, it's advisable to clear out stored
packages to free up space, just in case it's needed:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf clean all'</span>
</pre></div>
<p>Before we proceed, it's essential to verify that our system is up-to-date with
the latest available updates from the enabled repositories. To accomplish this,
we need to rebuild the packages' metadata cache and subsequently apply the
recent upgrades:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf makecache'</span>
</pre></div>
<img alt="" class="align-center" src="https://porfiriopaiz.github.io/site/images/fc22_to_fc23/screenshot_from_2016-11-22_17-23-27.png" />
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf upgrade'</span>
</pre></div>
</div>
<div class="section" id="install-the-dnf-plugin-system-upgrade-plugin">
<h3>Install the dnf-plugin-system-upgrade plugin</h3>
<p><strong>DNF System Upgrade</strong> facilitates the transition to a newer version of Fedora,
employing a mechanism akin to offline package updates. Packages are downloaded
while the system operates normally, followed by a restart into a dedicated
environment (implemented as a systemd target) for installation. Once the
package installation concludes, the system reboots, ushering in the new Fedora
version.</p>
<p>To kickstart the process, the initial step involves installing the
<tt class="docutils literal"><span class="pre">dnf-plugin-system-upgrade</span></tt> plugin:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf install dnf-plugin-system-upgrade'</span>
</pre></div>
<p>Now, let's move on to acquiring the necessary packages for the upgrade to
Fedora 23.</p>
<p>This operation entails fetching each and every package currently installed in
our system, ensuring we obtain the latest version compatible with the specified
release – in this instance, the release is designated as <tt class="docutils literal">23</tt>.</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf system-upgrade download --refresh --best --allowerasing --releasever=23'</span>
</pre></div>
<p>In the following screenshot, you'll find details on the number of packages
slated for download and the corresponding data volume associated with fetching
them:</p>
<img alt="" class="align-center" src="https://porfiriopaiz.github.io/site/images/fc22_to_fc23/screenshot_from_2016-11-22_17-34-42.png" />
<p>Similarly, upgrading to Fedora 24 is feasible, although I would advise against
leaping directly from Fedora 22 to Fedora 24 (a <tt class="docutils literal">(n + 2)</tt> version jump). As
of now, the latest stable versions are Fedora 24 and Fedora 25; Fedora 26 is
currently in the <a class="reference external" href="https://fedoraproject.org/wiki/Releases/Branched">Branched</a>
state, and <a class="reference external" href="https://fedoraproject.org/wiki/Releases/Rawhide">Rawhide</a>
represents the continuously developing version.</p>
<p>To transition to any of the mentioned versions, you simply need to modify the
<tt class="docutils literal">number</tt> parameter in the <tt class="docutils literal"><span class="pre">--releasever=number</span></tt> option. Use 24 for Fedora
24, 25 for Fedora 25, 26 for Fedora Branched, and "rawhide" to upgrade to
Rawhide. It's worth noting that both Branched and Rawhide are not stable
versions of Fedora, so their use is recommended primarily for more seasoned
users.</p>
<p>Upgrading to Fedora 24:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf system-upgrade download --refresh --best --allowerasing --releasever=24'</span>
</pre></div>
<p>Upgrading to Fedora 25:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf system-upgrade download --refresh --best --allowerasing --releasever=25'</span>
</pre></div>
<p>Upgrading to Fedora Rawhide:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf system-upgrade download --refresh --best --allowerasing --releasever=rawhide'</span>
</pre></div>
<p>Lastly, after the packages are successfully downloaded, it's imperative to
restart the system by executing the following command:</p>
<div class="highlight"><pre><span></span><span class="go">su -c 'dnf system-upgrade reboot'</span>
</pre></div>
<p>Executing this command initiates a system restart. Upon reboot, the system will
utilize the same (newer) kernel, triggering the upgrade process from Fedora 22
to Fedora 23.</p>
</div>
</div>