Fedora-Remix-for-WSL icon indicating copy to clipboard operation
Fedora-Remix-for-WSL copied to clipboard

Upgrading 29 -> 30

Open davorg opened this issue 4 years ago • 9 comments

I have a Fedora Remix 29 for WSL working on my laptop. Over the weekend, I installed it on a friend's laptop and noticed that I got Fedora Remix 30. So I obviously wanted to get Fedora 30 on my laptop. I can't reinstall the app from the Windows Store as it knows it has already been installed.

So I tried to upgrade from the command line with:

% dnf upgrade --releasever=30

It downloads the RPMs successfully, but then dies with an error:

warning: /var/cache/dnf/fedora-a924e206df91842b/packages/alternatives-1.11-4.fc30.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID cfc659b9: NOKEY
fedora 0.0 B/s | 0 B 00:00 Curl error (37): Couldn't read a file:// file for file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-29-primary [Couldn't open file /usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-29-primary]

The problem seems to be that I don't have a /usr/share/distribution-gpg-keys directory. Which RPM should I install to get that?

davorg avatar Oct 06 '19 20:10 davorg

Update: I worked out that I needed to run:

% dnf install distribution-gpg-keys

But that installed the keys for Fedora 29. So, then I ran:

% dnf update distribution-gpg-keys --releasever=30

But it still doesn't work. I get a load of errors like this:

Public key for zstd-1.4.2-1.fc30.x86_64.rpm is not installed. Failing package is: zstd-1.4.2-1.fc30.x86_64 GPG Keys are configured as: file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-29-primary

Which makes it look like it's still looking at the Fedora 29 GPG keys.

davorg avatar Oct 06 '19 20:10 davorg

Oh, that's because:

% dnf update distribution-gpg-keys --releasever=30

didn't work. Because the correct keys aren't installed. Which seems like a bit of a Catch 22.

davorg avatar Oct 06 '19 20:10 davorg

Hello @davorg

Follow these steps:

sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade

sudo dnf system-upgrade download --releasever=30
sudo dnf system-upgrade upgrade

cat /etc/fedora-release
exit

If you face an error like: "Failed to obtain the transaction lock (logged in as: root).". Run this:

sudo dnf upgrade --refresh rpm glibc
sudo rm /var/lib/rpm/.rpm.lock
sudo dnf upgrade dnf

And repeat the last command that you attempted and keep following the steps.

I recommend that you attempt a backup first if you have Windows 1903:

wsl --export fedoraremix fedoraremix29_backup.tar.gz

Steps were taken from https://fedoramagazine.org/upgrading-fedora-28-fedora-29/

Regards, Carlos

crramirez avatar Oct 09 '19 18:10 crramirez

I'd like to mention sudo dnf system-upgrade upgrade isn't used at least from 31 to 32. Also I used daemonize to get systemd working (WSL2 required) as that is required to finish the upgrade due to wanting a reboot. Using sudo reboot and then doing wsl --shutdown in PS/CMD finishes the upgrade as evidenced by cat /etc/fedora-release and dnf upgrade after going back into your fedoraremix instance. This may need to get documented for other users upgrading if using on WSL2.

WSLUser avatar Jul 09 '20 18:07 WSLUser

Excellent. We published this guide to do the upgrade : https://www.whitewaterfoundry.com/blog/2019/11/3/upgrade-fedora-remix-for-wsl-to-31-2a7z8

crramirez avatar Jul 09 '20 21:07 crramirez

Yep. Having systemd working really helps for Fedora as everything is driven by it. Had a bunch of udev processes though that need to be killed.

WSLUser avatar Jul 09 '20 22:07 WSLUser

dnf system-upgrade upgrade and then a wsl --shutdown got me to Fedora 32, at least that's what /etc/feddora-release says.

andmalc avatar Sep 02 '20 18:09 andmalc

I tried to upgrade to 31 but dnf system-upgrade donwload failed with this error message:

terminate called after throwing an instance of 'libdnf::ModulePackageContainer::EnableMultipleStreamsException'
  what():  Cannot enable multiple streams for module 'lsd'

BasixKOR avatar Oct 25 '20 13:10 BasixKOR

Hello

I got some suggesting from: https://unix.stackexchange.com/questions/579184/upgrade-from-fedora-30-to-31-cannot-enable-multiple-streams-for-module-ant

Could you try : sudo dnf module reset '*'

Regards

crramirez avatar Oct 25 '20 13:10 crramirez