Preupgrade
PreUpgrade is a new feature being developed for Fedora 9. It allows a user to do all the tedious work of a safe Anaconda upgrade in a running system that is still usable. This is the answer to every user who has ever wanted to do a live upgrade with yum, but been worried about the safety of doing this. Read on for more information from the feature's developers and discover how to test this to upgrade your Fedora 8 system to Fedora 9 Beta + today!
This interview has been co-published with Red Hat Magazine .
Digg it
http://digg.com/linux_unix/Preupgrade_seemless_and_easy_upgrades_to_Fedora_9
Developer Interview
In Fedora, the supported method for upgrading from one release to the next is by downloading the media and rebooting from the media and using Anaconda. Why was this the case, and what's wrong with a yum upgrade?
Seth Vidal: Anaconda has the advantage of running outside of the system it is upgrading. This means it can do certain tricks in the event of big changes. The lvm->lvm2 migration, for example. Yum can't do this. Changing the partition or fs type on a running partition is a bad idea :)
Will Woods: Another good example: In Fedora 9 we have (experimental) ext4 support, and Anaconda is capable of migrating your ext3 filesystems to ext4 automatically. But yum upgrades can't handle this.
Even if it *was* possible - would you really want your F8 kernel (with old, broken or non-existent ext4 drivers) messing around with your filesystems? No, you should probably be running the new F9 kernel to do that.
Seth Vidal: However, in a huge number of the cases a yum upgrade worked fine for updating your distro. I've been updating my laptop for quite some time that way, lots of people have.
Will Woods: Live upgrades are kind of crazy. It's a frequently-requested feature, especially from people coming from Ubuntu or Debian: "Why doesn't Fedora have 'apt-get dist-upgrade'! It's so simple and easy!"
Well, it's actually not that simple *or* easy. Have you actually read the 20 pages of directions for preparing for an upgrade[1] ? Or the 11-page-long list of potential problems with performing such an upgrade[2] ?
Yum upgrades use your (now old and out-of-date) yum, rpm libraries, kernel, etc. to perform the upgrade. And they do it on a running system! All sorts of weird things can happen when you upgrade the entire system while it's running.
And now you're developing pre-upgrade, which should land in Fedora 9. How does this work, and how does it resolve some of the problems faced in the traditional Anaconda update or yum upgrade?
Will Woods: A traditional Anaconda upgrade involves downloading and burning media. This is time-consuming and a bit wasteful - the media contains upgrades for packages you probably don't have installed, but lacks upgrades for packages from the Everything repo or from third-party repos. So you'll still need to download upgrades after the upgrade finishes!
If you upgrade over the network you download a lot less data, but you have to sit and wait while anaconda fetches all those packages.
The PreUpgrade feature has two parts:
1) A GUI for F8 that downloads the F9 installer and *only* the packages your system needs to upgrade.
Seth Vidal: The boring part of an anaconda upgrade is when it resolves out what you need based on what's installed and when it then downloads all the packages you need to do the upgrade. It's boring, it is potentially error-prone when using flaky network connections, too.
So preupgrade uses the same depsolving logic from anaconda/yum, downloads all the metadata and packages you need while your normal system is running. So while you play tuxcart or other work the boring part of the anaconda upgrade is happening in another window.
Will Woods: This saves you time and bandwidth - and you don't have to burn CDs/DVDs either.
2) Anaconda support for upgrading from a bunch of packages that are already on the target system.
Once everything is downloaded, you hit the "reboot" button and your system magically reboots into the Fedora 9 installer. It finds everything you've downloaded and installs using that.
How does this method compare with similar use cases in other distributions?
Seth Vidal: Fedora has live upgrades using yum upgrade Fedora has interactive installs using anaconda Fedora has scripted installs using kickstart Now Fedora has a way to preload your cache before doing an install - using preupgrade.
Will Woods: So you can upgrade with the convenience and bandwidth savings of a live upgrade, but without the risky craziness inherent therein.
By the time people read this, the feature will have landed in Rawhide. Is it possible for users to test the software by doing an update from Fedora 8 to Rawhide, and if so how?
Will Woods: Indeed it is! It's pretty easy, too.
By now, the "preupgrade" package should be available in updates-testing for Fedora 8. Enable the updates-testing repo and install it. It currently shows up as "Upgrade Fedora" in your Applications -> System menu.
From there, it's very simple - follow the screens to choose what to upgrade to, wait for everything to download, hit "Reboot", and the upgrade will begin!
Once testing starts, is there a lot of work to be done on the technology before it's ready for Fedora 9, or are you quite happy with its current status? Are there more features you'd like to see get added, either in the Fedora 9 time frame or beyond?
Seth Vidal: There are always more features. :)
Will Woods: There's a couple of bugfixes and some UI improvements on the roadmap[3] for 1.0 (which we plan to release in time for Fedora 9).
In the future we plan to better integrate preupgrade with the Fedora mirror system - the list of available releases will be on the mirrors, and when we do a new release you should be able to get a nice popup that says something like "Fedora 10 has been released [click here to ]upgrade ".
Someday it should also let you pick your favorite mirror and get upgrades from 3rd party repos as well.
And, of course, we plan to do full i18n support so everyone worldwide can enjoy easier (and saner) upgrades.
And finally, would you like to tell us a little bit about yourselves? What got you interested in free software originally? What you like to do with your spare time when not working at the computer?!
Seth Vidal: I garden and ride by bike around.
Will Woods: I wrote my first program in BASIC, on our Atari 400, at age 3:
10 PRINT "DO YOU WANT TO GO SWIMMING DAD?"
20 GOTO 10
In high school, wanting a free C compiler, I ended up buying a copy of Slackware Linux Unleashed. I've been hooked ever since.
When I manage to get away from the computer, my wife and I make comics[4] , play video games, and bother our cat.
[1] http://www.debian.org/releases/stable/i386/release-notes/ch-upgrading.en.html
[2] http://www.debian.org/releases/stable/i386/release-notes/ch-information.en.html