Score:0

Is there a way to restart a failed dist upgrade even if system reports the dist upgrade is performed?

de flag

EDIT 2:

I reported the bug that originally broken the upgrade here: https://bugs.launchpad.net/ubuntu-release-upgrader/+bug/2015554

EDIT

I also tried:

# META_RELEASE_FAKE_CODENAME=focal META_RELEASE_FAKE_VERSION=20.04 do-release-upgrade -d -f DistUpgradeViewGtk3

No success. The upgrade process seems to start but it says:

No valid sources.list entry found 

While scanning your repository information no entry about impish 
could be found.

....Of course I do not have impish, I set focal as fake release...

Even if I choose to continue anyway, upgrade is aborted at "Setting new software channels".


My dist upgrade from Lubuntu 20.04 to 22.04 failed, so I had to repair the packages manually with many troubles.

Now it seems that all works (no apt errors or warnings), but I suspect not all the dist upgrade steps was performed. Some examples:

  1. I still have a xenial source, archive.ubuntu.com/ubuntu, that, furthermore, had no valid key (I had to add it manually)
  2. the old packages removal step was not performed
  3. (OK, not the end of the world, but anyway a spy) the wallpaper still say 20.04 and I don't changed the wallpaper ^^'

Now, I tried to restart the dist upgrade with sudo apt-get dist-upgrade and do-release-upgrade, but since lsb_release -a says 22.04, they do nothing.

Is there not a way to fake the dist so the dist upgrade is performed, or to start the dist upgrade even if the os says it is already updated?

in flag
Wallpapers are not always updated when doing an update, particularly if you've manually set one at any point in the past. The old source repos are sometimes left in place for various reasons as well. What makes you think that your system is not actually 22.04? Is your kernel version wrong? Or is it just some cosmetic things that have not noticeably changed?
guiverc avatar
cn flag
Have you rebooted since you performed the *do-release-upgrade*? The new release won't be running until after reboot; but if you have, the first thing I always do is `sudo apt update` & read the output, and ensure it all looks as it should.. I note what was disabled & if there are any non-new-release mentions (ie. are all *jammy*). Then I'd perform a `sudo apt full-upgrade` to see what occurred... How I'd react after that will vary on what I saw on those.. but if all looks good, I'd reboot & check out my install on next boot.
guiverc avatar
cn flag
Do note: If a user changed their wallpaper on 20.04 & *release-upgraded* to 22.04 and saw that change also changed their chosen wallpaper - most users would really be annoyed... Lubuntu respects your choices, thus wallpapers will not change (I just switched my 20.04 system to 23.04 using a *upgrade via re-install* & my wallpaper didn't change but I didn't expect it too, if I'd *release-upgraded* to 22.04 instead I'd not have expected it to change either!). Did you read the release notes? https://lubuntu.me/jammy-2-released/ Note the "*Upgrading Lubuntu to 22.04*" section please.
guiverc avatar
cn flag
FYI: My mention of a *focal* system being switched to *lunar* (20.04 to 23.04) is probably confusing... I keep systems for *support* purposes; and needed a system for *non-destructive re-install* purposes of our soon to be released 'Lubuntu 23.04' system.. and opted to use my *focal* (20.04) system for that, as it's next to reach EOL.. I already have *jammy* systems thus wasn't interested in *release-upgrade* .... if my thought was confusing, sorry & just ignore it.
Marco Sulla avatar
de flag
@matigo I'm quite sure my current system is 22, but I'm also sure the final upgrade steps was not performed, since I already upgraded the system in past and I know there's a final cleanup step. Is there not a way to redo a dist upgrade even if the system says the dist upgrade is already performed?
Marco Sulla avatar
de flag
@guiverc emh, a lot of comments... yes I rebooted the pc. yes I've done `apt update && apt upgrade` and now it's all ok as I said in the question. I do not changed the wallpaper. As I said, all works but I' quite sure ___the final dist release upgrade steps were not performed___, so I'm asking if there's a way to force the OS to redo the dist upgrade.
guiverc avatar
cn flag
Don't forget `apt upgrade` you mention in the last comment may **not** install all upgraded packages; why `apt-get dist-upgrade` or `apt full-upgrade` exist! The `apt` commands (inc. dist-upgrade or full-upgrade) are very different to the `do-release-upgrade` (`do-release-upgrade` is part of [Ubuntu Release Upgrader](https://launchpad.net/ubuntu-release-upgrader) and **not** part of `apt`)
Marco Sulla avatar
de flag
@guiverc I already done sudo apt-get update, sudo apt-get install -f, sudo dpkg --configure -a, sudo apt-get upgrade, sudo apt-get dist-upgrade, do-release-upgrade, sudo snap refresh, sudo apt-get full-upgrade and sudo apt-get autoremove. The system works, but, as I already said, the ***final dist release upgrade steps were not performed*** and ***I would know if there's a way to redo the dist upgrade entirely***. I updated the question.
user535733 avatar
cn flag
This seems an [XY Question](https://en.wikipedia.org/wiki/XY_problem). It seems clear that you have some undisclosed problem, and you believe that "forcing" the final "clean-up" steps are a great way to repair it. Rather than ask about how to implement your preferred solution, you will get more helpful advice if you ask about the original problem that broke your release-upgrade.
Marco Sulla avatar
de flag
@user535733 I already fixed the original problem that broke the release-upgrade
user535733 avatar
cn flag
"*I still have a xenial source*" That's 16.04. A `do-release-upgrade` from 20.04 to 22.04 won't fix that. It will only change 20.04 sources to their corresponding 22.04 equivalents.
Marco Sulla avatar
de flag
@user535733 thank you, I missed the fat is xenial... I commented out that line. By the way, `nano` reported me `Invalid backup directory: /tmp/nano/` . I fixed it with an mkdir and a reinstall to be sure, but I feel the system very unstable.
Score:0
cn flag

Generally, the major steps of a release-upgrade are as follows, and you might be able to save an incomplete release-upgrade by resuming the appropriate step(s):

  1. Change the apt sources:

    • Edit the Ubuntu sources from the older release to the newer
    • Disable PPAs
    • apt update because sources changed
  2. apt dist-upgrade

  3. apt autoremove to uninstall orphaned packages

  4. apt autoclean to reduce the local package archive size

  5. snap refresh

When a release-upgrade fails, it fails for a reason. That reason must usually be fixed first, or your manual continuation is also likely to fail for a similar reason.

  • Note: An apt dist-upgrade and an Ubuntu "release-upgrade" are different. One is a component of the other.
Marco Sulla avatar
de flag
Well, I already done all of these. My impression is that `do-release-upgrade` does other steps, in particular the final cleanup step. Is it possible to replicate all the steps that `do-release-upgrade` does, or make it start again?
user535733 avatar
cn flag
"*the old packages removal step was not performed*", it's one of the steps here. If you really "*done all these*" then it's done.
Marco Sulla avatar
de flag
I don't think it's so simple. I checked the Python script that do the dist upgrade, and it's a bit more complicated than that. Furthermore, even if I've done all the steps you reported and more, the system is not stable, see comment https://askubuntu.com/questions/1462688/is-there-a-way-to-restart-a-failed-dist-upgrade-even-if-system-reports-the-dist#comment2560757_1462688
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.