Updated: June 22, 2017
Several months ago, I wrote an article on the Fedora in-vivo upgrade mechanism using dnf. The upgrade went smoothly, going from version 24 to version 25 on my G50 laptop. Now, let us make this thing more challenging.
Today, I shall attempt to upgrade Fedora 23 to Fedora 25, a two-version skip, on my somewhat antiquated LG RD510 notebook, which also happens to have an Nvidia graphics card, and also using the relevant proprietary drivers. As promised, here we go. Let's see if we can match the success of the previous adventure.
I was first contemplating upgrading Fedora 24 on my HP laptop, which I had just recently installed, but I decided to make this a bit more interesting with the 23-25 attempt on an even older box. In both cases, we have dual boot, we have multiple partitions, many years worth of legacy data in the home directory and whatnot.
Like the last time, I decided to try the command line functionality. Alas, things were not quite as trivial as the last time. I immediately encountered problems that prevented me from running the upgrade. At first, things looked fine, and even Nvidia drivers were properly listed. But then, the system complaining about missing keys for the Fedora 25 release.
sudo dnf system-upgrade download --refresh --releasever=25
RPM Fusion for Fedora 25 - Nonfree 131 kB/s | 8.5 kB 00:00
RPM Fusion for Fedora 25 - Free 4.5 MB/s | 515 kB 00:00
RPM Fusion for Fedora 25 - Nonfree 2.0 MB/s | 144 kB 00:00
RPM Fusion for Fedora 25 - Free - T 320 kB/s | 16 kB 00:00
Fedora 25 - x86_64 - Updates 8.2 MB/s | 20 MB 00:02
google-chrome - \x86_64 77 kB/s | 3.6 kB 00:00
google-chrome-beta 67 kB/s | 3.6 kB 00:00
kernel-core x86_64 4.2.3-300.fc23 @koji-override-0 51 M
kernel-modules x86_64 4.2.3-300.fc23 @koji-override-0 17 M
kmod-nvidia-... x86_64 1:358.16-1.fc2 @rpmfusion-nonfr 13 M
Install 199 Packages
Upgrade 1847 Packages
Remove 4 Packages
Total download size: 1.7 G
Is this ok [y/N]:
warning: /var/lib/dnf/system-upgrade/libstoraged-2.6.2-2.fc25.x86_64.rpm: Header V3 RSA/SHA256 Signature, key
ID fdb19c98: NOKEY
Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-25-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-25-x86_64]
The downloaded packages were saved in cache till the next successful transaction. You can remove cached packages by executing 'dnf clean packages'.
sudo dnf system-upgrade reboot
Error: system is not ready for upgrade
This is a bug in pre-24 releases of this distro, which necessitated installing some testing packages to work around this issue. As follows:
sudo dnf install fedora-repos-23-2 --enablerepo=updates-testing
However, the system was still complaining about unsigned packages, and it turns out the upgrade from version 23 to version 25 does not handle RPM Fusion that well, so I actually had to disable GPG signature checks, which may not be fully advisable for ordinary users.
warning: /var/lib/dnf/system-upgrade/akmod-nvidia-375.39-2.fc25.x86_64.rpm: Header V4 RSA/SHA1 Signature, key
ID fa7a179a: NOKEY
Import of key(s) didn't help, wrong key(s)?
The downloaded packages were saved in cache till the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Public key for akmod-nvidia-375.39-2.fc25.x86_64.rpm is not installed
sudo dnf system-upgrade download --refresh --releasever=25 --nogpgcheck --allowerasing
warning: kmod-nvidia-1:375.39-2.fc25.x86_64: Header V4 RSA/SHA1 Signature, key ID fa7a179a: NOKEY
warning: gstreamer-plugins-bad-nonfree-0.10.23-3.fc24.x86_64: Header V4 RSA/SHA1 Signature, key ID fa7a179a: NOKEY
warning: rpmfusion-nonfree-release-25-1.1.noarch: Header V4 RSA/SHA1 Signature, key ID fa7a179a: NOKEY
warning: rpmfusion-nonfree-appstream-data-25-3.fc25.noarch: Header V4 RSA/SHA1 Signature, key ID fa7a179a: NOKEY
warning: steam-184.108.40.206-1.fc25.i686: Header V4 RSA/SHA1 Signature, key ID fa7a179a: NOKEY
And at this point, I was finally able to run the upgrade & reboot command.
Exactly 49 minutes later, the upgrade was complete. I had the GRUB2 menu, check. But once Fedora started loading, it quickly became apparent than the upgrade was not successful. Of course, Nvidia. What else.
However, what made things even worse was that the screen was flickering and I was unable to login from console and make necessary adjustments. I actually had to login into the resident CentOS 7, the other operating system in the dual-boot configuration, and move the xorg.conf file aside, so the subsequent Fedora attempt would fail, but I would at least have a command line interface to work with.
I had to clean up a badly botched driver. I started with an official Nvidia driver, but this could not complete, even though I had the right sources, headers and build tools. Very weird.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
I decided to try a different method, then. Remove the installed drivers, which do not seem to be compatible with the legacy 9600 series on this notebook, and use the older 340xx family of drivers. Even so, it took some nudging and convincing. This did not work:
dnf install xorg-x11-drv-nvidia akmod-nvidia
Nor this, I'm afraid:
dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx
And only by being a little extra aggressive did I make progress:
dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx --allowerasing
Lots of errors and warnings:
-> Unable to restore symbolic link /usr/lib64/nvidia-340xx/libGLESv2.so.2 -> libGLESv2.so.340.96 (File
-> Unable to restore symbolic link /usr/lib64/nvidia/tls/libnvidia-tls.so.1 -> libnvidia-tls.so.358.16 (No such file or directory).
ERROR: Unable to create '/usr/lib64/nvidia/tls/libnvidia-tls.so.358.16' for copying (No such file or directory)
-> Unable to restore file '/usr/lib64/nvidia/tls/libnvidia-tls.so.358.16'.
WARNING: Failed to restore some backed up files/symlinks, and/or their attributes. See /var/log/nvidia-installer.log for details
-> Uninstallation of existing driver: NVIDIA Accelerated Graphics Driver for Linux-x86_64 (340.96) is complete.
But in the end, it worked. After a reboot, I had the Nvidia drivers and I could login into a new Fedora 25 system. Well, that was ugly, and definitely not something I'd recommend any new user. But let's what gives in the installed and upgraded instance.
The new desktop looked like the old one. Good. It was as snappy as before. Good. I decided to commence some serious pimping at this point, using my two most sweet Fedora 24/25 guides (parts one and two) as a baseline for my own work. Talking about inception.
I installed the Faba/Moka icons and polished the desktop a little, including some extra decorations and extensions. Again, I pretty much did all the basics I've outlined in my Gnome accessibility guide and the more recent Gnome pimping tutorial. Moar inception.
Then, I also installed the lovely Dash to Panel (D2P) extension, which gives you a sane bottom panel full of lovely icons, so you do not need to waste your time on Activities and unnecessary mouse clicks. However, there was a snag, but more about that in a second. And I also installed the Droid Sans fonts:
sudo dnf install google-droid-sans-fonts
Some fine screenshots:
Not all was peachy and rosy and whatever color you fancy. For example, Steam would not launch, firing off an old error that I've outlined in my Fedora 23 & Nvidia + Steam article, and the problem is still here with us. Luckily, you can install the 32-bit libraries, and this will give you the needed functionality back.
Running Steam on fedora 25 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1447125378)
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
sudo dnf install xorg-x11-drv-nvidia-340xx-libs.i686
Another great annoyance was that I couldn't install Gnome extensions because Firefox was misbehaving. This is typical, and part of this whole software development nonsense we have in the modern world. But there you go, you can no longer use the old method of loading Gnome extensions. No alternative, though, that's the sad part.
Attempt to postMessage on disconnected port
I had to enable the COPR repo for Fedora and install the Google Chrome extension that offers the same functionality, and then I was able to setup some additional Gnome extensions, the likes of Dash to Panel and others.
sudo dnf copr enable hmaarrfk/chrome-gnome-shell
sudo dnf install chrome-gnome-shell
Another problem is - fonts. For some reason, the old tricks for improved font clarity that worked in version 23, like anti-aliasing and hinting, do nothing at all in version 25. So there's something bad afoot, but we will talk about this separately.
Now, everything else worked fine. Performance is pretty decent, given the circumstances, suspend & resume works well, the laptop purrs nicely despite its eight years of legacy scars, hundreds of GB worth of old data, games and configurations, tons of non-standard software including a significant chunk of proprietary stuff. Technically speaking, if not for the expected Nvidia foobar, this could have been a very pleasant experience.
If you have time, the following may also pique your interest:
Fedora command not found issue in multi-boot scenarios
Fedora initramfs bug
End result, a 2009 laptop with an Nvidia graphics card is running Fedora 25 smoothly, following an in-vivo upgrade. The operating system is graced with tons of extras, including all the codecs you may want, lots of great programs, awesome icons and extensions, and it works fairly well. There are no bugs or errors. But.
The initial setup was not trivial. From that perspective, the upgrade was a FAILURE, because non-experienced users would not have been able to recover from this procedure, or they would have spent a lot more time. For me, this is a simple thing, fiddling with drivers and kernel modules and such. It cannot be a part of any sane upgrade process. And therefore, despite the fact I love the final product very much, I would advise anyone with proprietary graphics cards and drivers to prepare themselves carefully, because there's a pretty good chance it won't work well.
So yes, it was a complicated setup, complicated circumstances, a two-version jump, lots of extra software you don't normally get in the default configuration. Perhaps I'm demanding. But professionalism is exactly that. Ultra high standards and rigor, because then everything works majestically. And that's the magic. Making the difficult look trivial. Now, for the savvy among you, the procedure works. It might be a little rough, but you will be pleased. I'm done here. Off to slay some other distros.