User:NeddySeagoon/HOWTO Update Old Gentoo

Background
Some time ago, it looks like mid 2011, my four or five discrete systems were retired in favour of a Gen7 HP Microserver running KVMs to replace the physical servers. The power savings paid for the Microserver in 18 months and its still going.

The poor wee thing struggled in only 8G of RAM and I wanted to run another KVM. I upgraded to 16G RAM, that's double the maximum its supposed to take but that's another HOWTO.

In 2011, one of the services moved to a KVM was my router. It was originally Smoothwall 3 on a 233MHz Pentium. To be able to test the KVM implementation I created a number of throw away KVMs for testing, before I exposed real hardware to the new router.

Of course, being throw away KVMs, they were never thrown away, they were just shut down and left.

Being in need of another KVM, I thought it might be fun to attempt to upgrade a 2011 Gentoo install, rather that install a new KVM.

The Starting Point
The datestamp on the gentoo repo Thu Aug 11 17:36:42 UTC 2011 That qualifies as old and out of date

Profile
default/linux/amd64/10.0 default/linux/amd64/10.0/desktop default/linux/amd64/10.0/desktop/gnome default/linux/amd64/10.0/desktop/kde default/linux/amd64/10.0/developer default/linux/amd64/10.0/no-multilib default/linux/amd64/10.0/server hardened/linux/amd64 hardened/linux/amd64/selinux hardened/linux/amd64/no-multilib * hardened/linux/amd64/no-multilib/selinux selinux/2007.0/amd64 selinux/2007.0/amd64/hardened selinux/v2refpolicy/amd64 selinux/v2refpolicy/amd64/desktop selinux/v2refpolicy/amd64/developer selinux/v2refpolicy/amd64/hardened selinux/v2refpolicy/amd64/server

binutils
Blue_Test ~ # binutils-config -l [1] x86_64-pc-linux-gnu-2.21.1 *

gcc
Blue_Test ~ # gcc-config -l [1] x86_64-pc-linux-gnu-4.5.3 * [2] x86_64-pc-linux-gnu-4.5.3-hardenednopie [3] x86_64-pc-linux-gnu-4.5.3-hardenednopiessp [4] x86_64-pc-linux-gnu-4.5.3-hardenednossp [5] x86_64-pc-linux-gnu-4.5.3-vanilla

Kernel
Blue_Test ~ # uname -a Linux Blue_Test 2.6.39-hardened-r8 #1 SMP Thu Jul 28 19:39:39 BST 2011 x86_64 AMD Phenom(tm) 9550 Quad-Core Processor AuthenticAMD GNU/Linux

World
app-admin/metalog app-admin/sudo app-portage/gentoolkit app-portage/ufed app-text/wgetpaste net-analyzer/tcpdump net-misc/dhcpcd net-misc/ntp sys-apps/ethtool sys-apps/portage sys-apps/usermode-utilities sys-boot/grub-static sys-devel/gettext sys-kernel/hardened-sources sys-libs/gpm sys-process/dcron

Plan A
Install git

Move the old repo out of the way, so we can still refer to it for bits and pieces.

Get an up to date ::gentoo repo

emerge -uDNav world etc-update

An eight year old portage with a current repo ...

Plan A - Implementation
Install git Blue_Test ~ # emerge git -av * IMPORTANT: 2 news items need reading for repository 'gentoo'. * Use eselect news to read news items. * Last emerge --sync was 8y 21d 4h 12m 6s ago. These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild  R    ] dev-vcs/git-1.7.6  USE="blksha1 curl iconv perl python threads webdav -bash-completion -cgi -cvs -doc -emacs -gtk (-ppcsha1) -subversion -tk -xinetd" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB Would you like to merge these packages? [Yes/No]

Git is already installed. That was an unexpected bonus.

Move the old repo out of the way mv /usr/portage /usr/portage_old Clone the git ::gentoo repo mkdir /usr/portage cd /usr/portage git clone https://anongit.gentoo.org/git/repo/gentoo.git ./

The current profile has been removed, so to put off dealing with profile updates change the /etc/make.profile symbolic link to point to the copy in the repo we saved earlier.

cd /etc rm make.profile ln -s ../usr/portage_old/profiles/hardened/linux/amd64/no-multilib make.profile

Plan B
Move the old repo out of the way, so we can still refer to it for bits and pieces.

Use a git repo, to do easy checkouts by dates.

Incrementally update stage 1 by running /usr/portage/scripts/bootstrap.sh which is the script used to do the stage 1 part of a stage 1 install. Its still in the git tree.