Updating Gentoo is scary. Updating Gentoo when it's incredibly out of date is even more scary. When I get bored, I update Gentoo. Maybe it's the heart pounding adrenaline rush of waiting 4 hours to see if your system breaks, or maybe I just need hobbies. In any case, I managed to upgrade the Gentoo image that Linode provides with minimal pain and suffering.
At the time of writing, the latest Gentoo image available from Linode is Gentoo 2008 and the latest Gentoo release is 10.1. Gentoo does rolling releases so that everyone is essentially using the latest version of it, but as you may know it breaks horribly if left alone for too long. If you've just deployed Gentoo, these steps should work for you with no pain. If you've updated Gentoo a few times here and there you may be able to modify them to suit your needs. Pay attention to the profile selection and "gcc-config" parts if you're not starting from scratch. I tried it and it works, but there are a few blocked packages for Apache and PHP related things. You should be able to figure it out.
As always, update your Portage tree to make sure you're not installing old stuff:
emerge --sync
After this finishes, you'll need to change your profile. I chose the default of "default/linux/x86/10.0", and I suggest you do too.
eselect profile list
eselect profile set 1
There are blocking packages, so you'll need to update bash before you continue:
emerge app-shells/bash
There's also a block for news. Kill news with fire!
emerge -C app-admin/eselect-news-20080320
It also rages about this:
emerge -C app-arch/lzma-utils
Now it's time to update portage! Use portage to update itself (wat.):
emerge portage
Wander off...make some coffee or something.
Enable this if you care about bash completion for everyone. If not, ignore this line :>
eselect bashcomp enable --global gentoo
Since you upgraded Python, you'll need to recompile some modules:
python-updater
Now for the scary part:
emerge -uDN world
You should go make dinner now...maybe get a nap in.
You'll get a nice error about glibc failing. Whether you know it or not, you've updated GCC. Issue the following commands to see which versions you have and select the latest version. In my case, version 2 was the latest. Substitute the number "2" with the number of your latest installed version:
gcc-config -l
gcc-config 2
source /etc/profile
Then install glibc:
sys-libs/glibc
The reason it has to be in this order is because of some lame dependencies. This was easier than trying to fix everything that broke when I updated glibc first.
You'll need to run this again:
python-updater
Log into the Linode Manager and change your configuration profile to use the "Latest Paravirt" kernel. If you don't, Gentoo will spit out errors about your kernel being too old. Once you've saved the profile, reboot your Linode. You may want to watch the console ("Console" tab of the Linode Manager) to make sure everything comes back properly.
Once your Linode has booted, log back in as root and check that you're running the "Latest Paravirt" kernel and have the latest Gentoo base installed:
uname -a && cat /etc/*release
You should see something like this:
li125-113 ~ # uname -a && cat /etc/*release
Linux li125-113 2.6.32.16-linode28 #1 **
Gentoo Base System release 1.12.13
Enjoy editing the 30 or so config files in /etc that need updating. :)