Fedora DNF system upgrade
Complementary/personal steps to main guide.
Ensure enough storage space for kernels
Usually dnf only keeps the 3 latest kernel versions, but sometimes it fails to remove old kernel package groups. See Manually remove kernel packages.
Backup
Download latest Live USB Fedora, even if you’re not upgrading to the latest version.
Verify
Create boot media
Update system
Poweroff
Boot live media and use GParted to create 2 partitions on a spare hard drive,
one small and the other large enough to contain backups of the file systems.
Mount the small system backup_head
and create a random key file on it.
On GParted, format the large partition backup_body
to cleared. Then create
a encrypted LUKS device in it.
Create and mount file system
If some of the partitions that are to be backed up are LVM, deactivate them with GParted.
Create partition images, for each partition to backup
Save extra information about drive geometry
Backup the MBR
Upgrade
After running sudo dnf system-upgrade reboot
, the system reboots and starts
upgrading while displaying status information on the screen. At some point the
text displayed doesn’t seem to make any sense, for example I saw a lot of [
characters separated by newlines. This is OK, let the upgrade continue and
eventually the machine will reboot to the new kernel/system.
Post-upgrade
Be sure to follow the Optional post-upgrade tasks in the main official guide.
Old packages
Regarding the output of
Don’t remove the kernel packages. It’s probably better not to remove any of these packages.
Manually remove kernel packages
After upgrading, sometimes DNF stops removing old kernel packages automatically when it installs a new version of the kernel. To remove old versions, look them up with
And remove with
Where <version>
is the long package version, for example 4.9.10-100.fc24
.
Troubleshooting software installed in user directories
If an application installed in a user directory is not working correctly, try re-installing it.
Troubleshooting sshd
After upgrade, trying to connect to sshd port displays connection refused, while other ports may show no route to host.
Run below command
Then try to ssh again. If tpcdump dumps flags S and R, it means that although
the server’s firewall is not blocking port <port_number>
, there is no service
listening to it.
In my case, my sshd server configuration file had this issue. To fix it, run bash from GRUB and do this.
References
- DNF system upgrade
- Fedora 24 installation guide
- Fedora 25 installation guide
- Disk cloning
- Fedora 24 End of Life
- Upgrading Fedora 24 to Fedora 25