Fedora 7 to 8 update
This article describes the procedure of updating Fedora 7 VE to Fedora 8. This should be trivial with yum, but apparently it is not, especially on a 64-bit architecture like ppc.
Contents
Creating/starting an initial VE[edit]
Let's create a special VE:
# vzctl create 123 --ostemplate fedora-7-ppc-minimal # vzctl set 123 --ipadd 10.0.0.123 --save # vzctl start 123
Note: see Using NAT for VE with private IPs if you don't have public IP for your VE |
Upgrading procedure[edit]
fedora-release[edit]
First, we need to install fedora-release-8 package. Open http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/ppc/os/Packages/ in your browser, find fedora-release-8
package and copy its URL to clipboard.
Now, inside a VE run wget to download the needed package:
[VE]# wget http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/ppc/os/Packages/fedora-release-8-3.noarch.rpm <s>10:25:13</s> http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/ppc/os/Packages/fedora-release-8-3.noarch.rpm => `fedora-release-8-3.noarch.rpm' Resolving download.fedora.redhat.com… 66.187.224.20, 209.132.176.20, 209.132.176.220 Connecting to download.fedora.redhat.com|66.187.224.20|:80… connected. HTTP request sent, awaiting response… 200 OK Length: 27,548 (27K) [application/x-rpm] 100%[====================================>] 27,548 57.04K/s 10:25:14 (56.86 KB/s) — `fedora-release-8-3.noarch.rpm' saved [27548/27548]
Install the package:
[VE]# rpm -Uhv fedora-release-8-3.noarch.rpm Preparing… ########################################### [100%] 1:fedora-release warning: /etc/yum.repos.d/fedora-updates.repo created as /etc/yum.repos.d/fedora-updates.repo.rpmnew warning: /etc/yum.repos.d/fedora.repo created as /etc/yum.repos.d/fedora.repo.rpmnew ########################################### [100%]
As we see, a new repo config files were not installed to the usual place (because of the modifications we made to the original versions). Just move the new files over:
[VE]# mv -f /etc/yum.repos.d/fedora-updates.repo.rpmnew /etc/yum.repos.d/fedora-updates.repo [VE]# mv -f /etc/yum.repos.d/fedora.repo.rpmnew /etc/yum.repos.d/fedora.repo
Don't forget to remove the rpm file:
[VE]# rm -f fedora-release-8-3.noarch.rpm
Upgrade[edit]
keepcache=1[edit]
Now we can run yum update
. But there are chances it will not work from the first try, so make the following modification in /etc/yum.conf
to save some time on future yum runs:
keepcache=1
First try[edit]
Run
[VE]# yum update
It will not work for you. The problem is compat-db
needs to be installed, and while adding it into transaction, yum adds both .ppc
and .ppc64
versions. Then, compat-db.ppc64
package requires a lot of other .ppc64 packages, and eventually shots itself into the foot.
Second try[edit]
To work around it, we ask yum to install compat-db.ppc only:
[VE]# yum install compat-db.ppc
After that, we can try yum update
again:
[VE]# yum update
Somehow it now works!
Making a template[edit]
Now we need to make a template cache out of this just upgraded VE.
First, remove the yum cache:
[VE]# yum clean all
Then stop this VE and remove its IP:
[HN]# vzctl stop 123 [HN]# vzctl set 123 --ipdel all --save
Now we can create a tarball:
[HN]# cd /vz/private/123 [HN]# tar --numeric-option -czf /vz/template/cache/fedora-8-ppc-minimal.tar.gz .
Don't forget to destroy this VE:
[HN]# cd [HN]# vzctl destroy 123
Testing[edit]
Our new template needs testing.
First, compare the sizes of the old and the new template caches:
# ls -lh /vz/template/cache/fedora-?-ppc-minimal.tar.gz -rw-r--r-- 1 root root 99M 2007-11-13 18:11 /vz/template/cache/fedora-7-ppc-minimal.tar.gz -rw-r--r-- 1 root root 111M 2007-11-13 19:49 /vz/template/cache/fedora-8-ppc-minimal.tar.gz
The sizes should not differ much.
Try to create and start VE made from your new template:
# vzctl create 222 --ostemplate fedora-8-ppc-minimal # vzctl set 222 --ipadd 10.0.0.222 --save # vzctl start 222 # vzctl enter 222
Now execute a few basic commands to check VE is fine. Examples are: ps ax
, rpm -qa
, etc.
Finally, clean up the testing VE:
# vzctl stop 222 # vzctl destroy 222