Smooth upgrade from Fedora Linux 13 to 14 using yum

Last weekend I had the urge to upgrade “viasvr”, my headless low power home server which function as file/storage, ftp, squid proxy, torrent and offsite backup pulling my website data from my hosting provider on daily basis. It is also running Hamachi2 which allows me to securely tunnel my browsing session from an unsecured connection like public wifi to my squid proxy server.

Viasvr, before the upgrade, runs on Fedora Linux 13. My plan was to upgrade from Fedora 13 to 14 using yum, a software package manager that installs, updates, and removes packages on RPM-based systems.

Fedora recommended installation method is with a boot media with the Anaconda installer as detailed in the Installation Guide or use PreUpgrade

PreUpgrade is a slightly different upgrade method where all the packages are downloaded before the system is rebooted into the Anaconda installer.

Fedora had a big NOTE about upgrading via yum:
Although upgrades with yum works, it is not explicitly tested as part of the release process by the Fedora Project. If you are not prepared to resolve issues on your own if things break, you should probably use the recommended installation methods instead.

When upgrading with yum you don’t get any help from Anaconda, but if you are lucky you might be able to upgrade systems remotely over ssh and with limited downtime. (You will still need to reboot to get the new kernel and system libraries/services running) Rebooting after such an upgrade is always very exciting.

And exciting indeed, the upgrade went as smooth as possible.. The following steps are from fedora project wiki1 with some modifications as to suit my environment.

 

1. Clean Stuff

Review and remove all .rpmsave and .rpmnew files before and after upgrading. (And if you have selinux enabled then remember to check security context if you move config files around.)

  • Find unused config files
    Merge and resolve the changes found by the following script: yum install rpmconf; rpmconf -a Now find and remove old config which nobody owns: find /etc /var -name '*.rpm?*'

    Now is a good time to remove packages you don’t use – especially non-standard packages.

  • Find and review "unused" packages
    You can find packages not required by other packages with the tool package-cleanup from the yum-utils package: yum install yum-utils; package-cleanup --leaves. These packages could be candidates for removal, but check to see whether you use them directly or if they are used by applications not backed by rpm packages. Remove them with yum remove <package-name-and-version>.
  • Find and review "lost" packages
    You can find orphaned packages (ie packages not in the repositories anymore) with: package-cleanup --orphans. This will also show packages which have been partially uninstalled but where the "%postun" script failed.

2. Do the upgrade

If you have 3rd party repositories configured, you may need to adjust them for the new Fedora version. If you switch from one Fedora release to another there is often nothing that needs to be done. If you switch to Rawhide from a standard Fedora release (or vice versa) then most of the time you will need to install the Rawhide release RPMs from the 3rd party repository as well (or the standard ones, if switching back).

Go to a text console (logging from the console is the recommended mode, I did mine from a remote SSH connection Smile
ctrl + alt + F2

(or)

log in as root, and go into runlevel 3

init 3

Update yum to latest version available in your Fedora version
yum update yum
Install the new fedora gpg key for the version you are updating to

Keys you may find and verify at https://fedoraproject.org/keys but since this is an upgrade from Fedora 13 to 14, I used the following:

rpm --import https://fedoraproject.org/static/97A1071F.txt
Clean the cache

Then remove all traces of the version you are leaving from the yum cache in /var/cache/yum.

yum clean all
Upgrade all packages

 

NOTE:

Once a live upgrade is started do not stop the upgrade by rebooting, killing the process, or by any other method until it is complete, doing so will cause the affected system to be in a mixed state. Partially the old release and partially the new release. In this state the system will not be reliable and will not operate as expected. you can try running yum distro-sync and package-cleanup –problems to try and fix the problems.

yum --releasever=<release_number_you_want_to_sync_to> distro-sync

I used –releasever=14  

 

3. Make sure Fedora is upgraded

Distro-sync will usually take care of upgrades for the third party repositories you have enabled as well. Confirm with

 yum repolist 

after the upgrade process is over. yum might complain about conflicts or requirements. That is probably because you have used non-standard repositories or installed non-standard packages manually. Try to guess which packages cause the problem (or at least is a part of the dependency chain) – uninstall them and try again. Remember to install the packages again if they are essential.

Ensure that all (new) essential packages from the new version are installed with

yum groupupdate Base

You might want to update other groups too, see

yum grouplist

For example

yum groupupdate "GNOME Desktop Environment" \
"Development Tools" "Server Configuration Tools" \
"Hardware Support" "Sound and Video" \
"Graphical Internet" "Fonts" \
"Games and Entertainment" "Printing Software" \
"Administration Tools" "Office/Productivity" "System Tools"

4. Preparing for reboot ( and pray… lol )

Before booting you should usually install the bootloader from your new grub by running

/sbin/grub-install BOOTDEVICE

– where BOOTDEVICE is usually /dev/sda (If you get an error ‘/dev/sda does not have any corresponding BIOS drive’ from that, then try /sbin/grub-install --recheck /dev/sda).

Also, the order of init scripts could have changed from the previous version. A command to reset the order is:

cd /etc/rc.d/init.d; for f in *; do /sbin/chkconfig $f resetpriorities; done

imageAgain, run package-cleanup --orphans to find packages that haven’t been upgraded.

 

After doing all this, I rebooted the server and did a continuous ping test to know if the server comeback online since there is no display to look at,  I have no indication if there’s any error along the way. I usually had a problem with external storage attached to the server such as USB hardisk specially if they are manually added in fstab entry. The bootup process complain if it find a hardware error and drop to a shell.

And to my amazement it came back with all services intact, up and running. Kudos to Fedora Team for making an upgrade from previous version as smooth as possible even using yum.

The last time I did an upgrade like this from Fedora 12 to 13, it was such a headache it ruined my whole week. Not this time….

[kramfs@viasvr ~]$ cat /etc/redhat-release & uname –a
  
Fedora release 14 (Laughlin)
Linux viasvr 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

 

1 – http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum

1,594 Comments

  1. irish golf

    Everyone loves what you guys are usually up too. This type of clever
    work and reporting! Keep up the awesome works guys I’ve incorporated
    you guys to our blogroll.

    Reply
  2. Pingback: GOOSE VPN trial

  3. Ken

    bookmarked!!, I like your site!

    Reply
  4. oldest golf course

    Pretty component to content. I simply stumbled upon your blog and in accession capital to assert that I get in fact enjoyed account your
    blog posts. Any way I’ll be subscribing for your feeds and even I success
    you get admission to constantly quickly.

    Reply
  5. beaufort golf course

    Very nice post. I absolutely love this website. Continue the good work!

    Reply
  6. http://www.mmwg.com

    My partner and I stumbled over here from a different website and thought I might as well check things
    out. I like what I see so now i am following you.
    Look forward to looking at your web page yet again.

    Reply
  7. ?????

    I was wondering if you ever considered changing the page layout of
    your website? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could
    connect with it better. Youve got an awful lot of text
    for only having 1 or 2 pictures. Maybe you could
    space it out better?

    Reply
  8. Reggie

    Admiring the time and effort you put into your site and detailed information you offer.
    It’s great to come across a blog every once in a while that isn’t the same outdated rehashed material.
    Great read! I’ve bookmarked your site and I’m including
    your RSS feeds to my Google account.

    Reply
  9. Pingback: maytag washer repair

  10. Pingback: thermador dishwasher repair

  11. It’s perfect time to make some plans for the longer term and it is time to be happy.
    I’ve read this submit and if I may I wish to suggest you some fascinating things or advice.
    Maybe you could write next articles relating to this article.
    I want to learn more issues approximately it!

    Reply
  12. soccer shoes

    I like the helpful info you supply on your articles.
    I will bookmark your blog and take a look at again here frequently.
    I am rather certain I will learn many new stuff proper here!
    Best of luck for the following!

    Reply
  13. Pingback: whirlpool refrigerators parts

  14. Pingback: advanced appliance repair

  15. Pingback: maytag replacement parts

  16. Pingback: whirlpool washer service

  17. Pingback: stainless steel angle iron

  18. Pingback: dumpster rental Portage

  19. golf courses

    Hi would you mind stating which blog platform you’re working with?

    I’m planning to start my own blog soon but I’m having a difficult
    time selecting between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for
    something completely unique. P.S Sorry for getting off-topic but I had to ask!

    Reply
  20. Pingback: ingénieurs marocains

  21. Pingback: parti rni

  22. Pingback: trash container rentals

  23. Claribel

    Thank you for the auspicious writeup. It in fact was a amusement account it.
    Look advanced to more added agreeable from you! However, how could we communicate?

    Reply
  24. Pingback: concrete dumpster rental

  25. Pingback: dumpster rental owosso

  26. Pingback: dumpster rental swartz creek

  27. Pingback: waste dumpster

  28. Pingback: dumpster removal

  29. Kala

    I’ve been browsing on-line greater than 3 hours lately, yet I by no means
    found any attention-grabbing article like yours.
    It’s lovely worth sufficient for me. In my opinion, if
    all website owners and bloggers made just right content material
    as you did, the internet might be much more helpful than ever before.

    Reply
  30. Pingback: we buy houses

  31. Pingback: tenant background and credit check

  32. Pingback: texas background checks

  33. Verona

    Oh my goodness! Impressive article dude! Thanks, However I am encountering difficulties
    with your RSS. I don’t know the reason why I can’t join it.
    Is there anyone else getting the same RSS problems?
    Anyone who knows the answer can you kindly respond?
    Thanx!!

    Reply
  34. lace frontal

    These search so fantastic and come to feel so excellent. I want to provide lace frontal https://www.youtube.com/watch?v=ny8rUpI_98I all the time, ! I just might have to get one more color ….

    Reply
  35. Pingback: employee criminal background checks

  36. Its not my first time to pay a quick visit this
    site, i am visiting this website dailly and get nice data from
    here all the time.

    Reply
  37. Pingback: aaa tenant screening

  38. fogbridge.com

    Wow, this piece of writing is fastidious, my sister is analyzing
    such things, thus I am going to inform her.

    Reply
  39. Matthew

    Excellent blog here! Also your site loads up very fast!

    What host are you using? Can I get your affiliate link to your host?
    I wish my web site loaded up as fast as yours lol

    Reply
  40. support.rmaster.com

    Wow! This blog looks exactly like my old one!
    It’s on a completely different topic but it has pretty much the same layout and design. Excellent
    choice of colors!

    Reply
  41. Margart

    hey there and thank you for your info – I have certainly picked up
    something new from right here. I did however expertise some technical
    points using this website, as I experienced to reload the site lots of times previous to I could get it
    to load properly. I had been wondering if your web hosting is
    OK? Not that I’m complaining, but slow loading instances times will often affect your placement in google and could damage your high quality score if
    advertising and marketing with Adwords. Well I’m adding this RSS
    to my e-mail and can look out for much more of your respective exciting
    content. Ensure that you update this again soon.

    Reply
  42. dildosh.uz

    Hi, this weekend is pleasant in support of me,
    since this moment i am reading this enormous informative paragraph here at my
    house.

    Reply
  43. Pingback: album design

  44. Pingback: pre wedding photo shoot chandigarh

Leave a Comment

Your email address will not be published. Required fields are marked *