Thursday, November 27, 2008

Fedora PreUpgrade

You've got to learn every day, that's for sure. Sometimes it's tedious (yes, I admit to being so old as no longer love learning for its own sake), but sometimes it's nice. An example of the latter was today when I read about Fedora PreUpgrade.

A while ago, I wrote about UNetbootin, a very nice utility for starting Linux installation or live cd's like GPartEd from a running system without burning a CD or DVD. I've been using it since then and will do so in the future. However, in the case of Fedora, CentOS or Red Hat Enterprise Linux upgrades, using UNetbootin has its limitation. (Which is, of course, not the fault of UNetbootin, but a limitation of these distributions, in the latter simply referenced as Fedora.)

For upgrade of Fedora, there are basically two options:

  1. The officially supported way is using the Anaconda Installer. That means booting from a CD, DVD (or via UNetbootin :-). That's nice, if you have a DVD ready and also have direct access to the system.
  2. The officially unsupported way is using Yum. Much better in some aspects: You can do it from within a running system, even remotely. However, if you are reading the Yum Upgrade FAQ, then you cannot fail to notice that there seem to be a lot of traps and possible problems. I have had my share of these in the past, for example when the IDE devices have been renamed from /dev/hdx to /dev/sdx: At that point you could bet your house on Yum upgrades failing.
    For similar reasons, the Yum upgrade should not happen with a UI running. If you are actually using the machine (for example on your own desktop), then that means a lot of more downtime than you want. (Ok, you might use the download-only plugin... I am ranting, but there's a reason for this Blog's title...)


In other words, you either got to do it safe (Anaconda) or nice (Yum). No longer: Use PreUpgrade.

It's a small python utility with a UI. You start it. It connects to the Fedora server and gathers a list of releases, which are available for an upgrade. (This might include alpha and/or beta releases, if you like.) Proxy servers are supported, btw., I did not check, whether it uses http_proxy, yum.conf, or both. You select a release and click on "Apply". After that, it automatically calculates dependencies and loads the required RPM's to your hard drive. So far, you' ve got the advantages and the comfort of Yum.


But that's not all. In the next step, PreUpgrade is loading a kernel image, a ram disk and similar stuff to your hard drive and configures your system for using them at the next reboot: In other words, it does what UNetbootin would, for you.

All this is happening in the background. You can continue your work, no downtime so far. Finally, when PreUpgrade is finished, you may click on Reboot: Anaconda comes up, performing a safe installation without downloading anything or using a slow CDROM drive.

By using PreUpgrade, I have just upgraded from Fedora 9 to Fedora 10. My downtime was about 10 minutes. (Excellent possibility to get some coffee!) Aint this magic?

5 comments:

Unknown said...

It would be magic if it works for me too... unfortunately after downloading vmlinuz, initrd.img and install.img it stalls. Too bad! :|

Jochen Wiedmann said...

Sure you aren't just too anxious for something to happen? After the files you mentioned there is a relatively large file being downloaded, which can take *quite* some time.

Anonymous said...

PREUPGRADE - I waited uptil I thought it would be well tested and many people had used it... still it is garbage. I tried to preupgrade to F10 from F8. It ran for a reasonable time to download and set up prior to the reboot message. The reboot stalled on "Cannot configure the netowrk eth0" message. I went in and added the ip= nm= gw= and dns= parameters and got past that error only to get to "enter the url og the instlal image" which I cannot get past.

Too bad, seems like a very cool idea.. it is a shame it just plain does not work.

Ray
Jan 20, 2009

Jochen Wiedmann said...

I must admit, I wouldn't have been so optimistic to upgrade from F8 to F10 in one step...

Anonymous said...

@ Diego, if you are behind a proxy, that's why it stalls.

PreUpgrade does NOT work behind proxies, as it, even it downloaded all packages beforehand, it still loads stage2 on reboot, well, it tries to.