Please help me with updating qubes 4.0.3 to fedora 32

hey. I love what you do here! You are skilled in computers… Advanced brilliant OS. <3
I’m not as good as you with computers, but i know a few things in linux. Kinda new, but i want to use Qubes i like it allot and the idea of it.
But could anyone please write down the commands here to update from fedora 30 to 32?

I have tried this and now i have both fedora 32 and 30, and im not sure i have done everything right. Might have messed up the disposableVMs…

Could you please edit this right? I can start with the first.

Detailed instructions for standard Fedora TemplateVMs

These instructions will show you how to upgrade the standard Fedora TemplateVM. The same general procedure may be used to upgrade any template based on the standard Fedora TemplateVM.

Note: The prompt on each line indicates where each command should be entered: dom0 , fedora-<old> , or fedora-<new> , where <old> is the Fedora version number from which you are upgrading, and <new> is the Fedora version number to which you are upgrading.

  1. Ensure the existing template is not running.
[user@dom0 ~]$ qvm-shutdown fedora-30
  1. Clone the existing template and start a terminal in the new template.
[user@dom0 ~]$ qvm-clone fedora-30 fedora-32
[user@dom0 ~]$ qvm-run -a fedora-32 gnome-terminal
  1. Attempt the upgrade process in the new template.
[user@fedora-<new> ~]$ sudo dnf clean all
[user@fedora-<new> ~]$ sudo dnf --releasever=<new> distro-sync --best --allowerasing

Note: dnf might ask you to approve importing a new package signing key. For example, you might see a prompt like this one:

warning: /mnt/removable/updates-0b4cc238d1aa4ffe/packages/example-package.fc<new>.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID XXXXXXXX: NOKEY
Importing GPG key 0xXXXXXXXX:
 Userid     : "Fedora <new> (<new>) <fedora-<new>@fedoraproject.org>"
 Fingerprint: XXXX XXXX XXXX XXXX XXXX  XXXX XXXX XXXX XXXX XXXX
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-<new>-x86_64
Is this ok [y/N]: y

This key was already checked when it was installed (notice that the “From” line refers to a location on your local disk), so you can safely say yes to this prompt. Note: If you encounter no errors, proceed to step 4. If you do encounter errors, see the next two points first.

  • If dnf reports that you do not have enough free disk space to proceed with the upgrade process, create an empty file in dom0 to use as a cache and attach it to the template as a virtual disk.
[user@dom0 ~]$ truncate -s 5GB /var/tmp/template-upgrade-cache.img
[user@dom0 ~]$ dev=$(sudo losetup -f --show /var/tmp/template-upgrade-cache.img)
[user@dom0 ~]$ qvm-block attach fedora-<new> dom0:${dev##*/}

Then reattempt the upgrade process, but this time use the virtual disk as a cache.

[user@fedora-<new> ~]$ sudo mkfs.ext4 /dev/xvdi
[user@fedora-<new> ~]$ sudo mount /dev/xvdi /mnt/removable
[user@fedora-<new> ~]$ sudo dnf clean all
[user@fedora-<new> ~]$ sudo dnf --releasever=<new> --setopt=cachedir=/mnt/removable --best --allowerasing distro-sync

If this attempt is successful, proceed to step 4.

  • dnf may complain:
At least X MB more space needed on the / filesystem.

In this case, one option is to [resize the TemplateVM’s disk image]) before reattempting the upgrade process. below for other options.)
4. Check that you are on the correct (new) Fedora release.

[user@fedora-<new> ~]$ cat /etc/fedora-release
  1. (Optional) Trim the new template. ), but it does not hurt. Some users have [reported]that it makes a difference.)
[user@fedora-<new> ~]$ sudo fstrim -av
[user@dom0 ~]$ qvm-shutdown fedora-<new>
[user@dom0 ~]$ qvm-start fedora-<new>
[user@fedora-<new> ~]$ sudo fstrim -av
  1. Shut down the new TemplateVM.
[user@dom0 ~]$ qvm-shutdown fedora-<new>
  1. Remove the cache file, if you created one.
[user@dom0 ~]$ sudo losetup -d $dev
[user@dom0 ~]$ rm /var/tmp/template-upgrade-cache.img
  1. (Recommended) [Switch everything that was set to the old template to the new template.]

  2. (Optional) Make the new template the global default.

[user@dom0 ~]$ qubes-prefs --set default_template fedora-<new>
  1. (Optional) Remove the old template. (Make sure to type the name of the old template, not the new one.)
[user@dom0 ~]$ sudo dnf remove qubes-template-fedora-<old>

Also… It’s this i dont know how to make right also… I messed it up. Please edit the right ones…

Switching

When you install a new template or upgrade a clone of a template, it is recommended that you switch everything that was set to the old template to the new template:

  1. Make the new template the default template.
 Applications Menu --> System Tools --> Qubes Global Settings --> Default template
  1. Base AppVMs on the new template.
 Applications Menu --> System Tools --> Qubes Template Manager
  1. Base the DisposableVM Template on the new template.
 [user@dom0 ~]$ qvm-create -l red -t new-template new-template-dvm
 [user@dom0 ~]$ qvm-prefs new-template-dvm template_for_dispvms True
 [user@dom0 ~]$ qvm-features new-template-dvm appmenus-dispvm 1
 [user@dom0 ~]$ qubes-prefs default-dispvm new-template-dvm
  1. Updating the template for sys-usb if peripheral devices are dependent upon the VMIf you are running Qubes on a desktop or other device where the peripheral devices such as keyboard / mouse / trackpad are dependent upon the sys-usb appVM then updating the template is a challenge. In this situation, you can use the following commands in a dom0 terminal window to update the templateVM.
 $ qvm-shutdown --wait sys-usb; qvm-prefs sys-usb template fedora-31; qvm-start sys-usb 

Be careful to run this set of commands as shown above (3 commands in a single line) because if the sys-usb VM does not start back up you may be locked out of your machine.

Thanks! I just want a new fresh install with fedora 32 and not fedora 30… That’s stable. But i might just use fedora 30 if it’s to hard for me to upgrade…

Why not just install a fresh Fedora 32 template?

Go here: https://www.qubes-os.org/doc/templates/fedora/#upgrading

First option listed (emphasis mine):

Install a fresh template to replace the existing one. This option may be simpler for less experienced users. […]

No need to make things harder than they have to be.

Thanks very much. You are right. That would have been better. :wink:
After i install a new one. What should this look like on a fresh 3.0.4 install?

 [user@dom0 ~]$ qvm-create -l red -t new-template new-template-dvm
 [user@dom0 ~]$ qvm-prefs new-template-dvm template_for_dispvms True
 [user@dom0 ~]$ qvm-features new-template-dvm appmenus-dispvm 1
 [user@dom0 ~]$ qubes-prefs default-dispvm new-template-dvm

I’m thinkning something like maybe:

 [user@dom0 ~]$ qvm-create -l red -t fedora-32 fedora-32-dvm
 [user@dom0 ~]$ qvm-prefs fedora-32-dvm template_for_dispvms True
 [user@dom0 ~]$ qvm-features fedora-32-dvm appmenus-dispvm 1
 [user@dom0 ~]$ qubes-prefs default-dispvm fedora-32-dvm

Are those the right commands? Or should they not be changed? I need to change the  template_for_dispvms and the appmenus-dispvm also right? What are the right names if i just want to update the stable release? So i don't make some newbie mistake when updating a new fresh install. Thanks!
  1. It’s 4.0.3, not 3.0.4.

  2. You’re right. Those instructions are bad because they don’t syntactically distinguish the variables from the rest of the command. That’s someone’s newbie doc-writing mistake, not yours! It should be:

     [user@dom0 ~]$ qvm-create -l red -t <new_template> <new_template_dvm>
     [user@dom0 ~]$ qvm-prefs <new_template_dvm> template_for_dispvms True
     [user@dom0 ~]$ qvm-features <new_template_dvm> appmenus-dispvm 1
     [user@dom0 ~]$ qubes-prefs default-dispvm <new_template_dvm>
    

I’ll update the documentation now.

1 Like

Ok, my bad. :wink: 4.0.3 ofcourse. =)

And those where not bad, but it’s easier to understand now. Thanks. =) I will do the update now. Thanks! Keep it up! Qubes rocks!

1 Like

I’ve fixed this in the title

Thanks for your good guides. But i’m wondering about one thing. I tried updating earlier… I did something wrong maybe, not sure what. First of all i forgot to add fedora 32 instead of fedora 30 in two cubes or services. I could not delete it because it was used, but i shut down the ones using it, changed to 32 and deleted the fedora 30 one. I think i did everything right, but maybe not! I get this error when i try to update my Qubes: What can i do about it? Thanks!

Screenshots:


That’s a known bug:

This should be fixed within a week or so. Meanwhile, I think the best solution is to update them manually.

  1. Open the terminal on the TemplateVMs that are missing updates (fedora-32, whonix-ws-15)
  2. For debian-based templates (debian-10, whonix-*) you do the following
    sudo apt update && sudo apt upgrade
  3. For fedora-based TemplateVMs you do
    sudo dnf update
  4. After the updates are installed, you shut down the remplates and restart any AppVMs based on them.

More instructions here:

Alright! Then it’s all good. If it’s a bug. I thought i messed something up… Good to know. Thanks! I will update manually. Because everything worked i think before i deleted fedora 30. Not sure…

1 Like

15 years of Fedora and I’m Fed UP. Be careful what you wish for…