Suspend all VPS before the server reboot:
# cd /hsphere/shared/scripts
# ./vps-suspend.pl -a
Download the packages and put them into a separate directory,
for example, to /root/inst:
Red Hat Linux release 7.3:
Kernel packages are available here:
http://www.freevps.com/download/rpms/RH_73
# wget http://www.freevps.com/download/rpms/RH_73/modutils-2.4.25-11.EL.i386.rpm
# wget http://www.freevps.com/download/rpms/RH_73/modutils-devel-2.4.25-11.EL.i386.rpm
# wget http://www.freevps.com/download/rpms/RH_73/SysVinit-2.85-4.i386.rpm
# wget http://www.freevps.com/download/rpms/RH_73/pam-0.75-51.i386.rpm
# wget http://www.freevps.com/download/rpms/RH_73/pam-devel-0.75-51.i386.rpm
# wget http://www.freevps.com/download/rpms/RH_73/vixie-cron-3.0.1-74.i386.rpm
# wget http://www.psoft.net/shiv/HS/VPS/RH73/freevps-tools-1.2-1.i386.rpm
# wget http://www.psoft.net/shiv/HS/VPS/RH73/hsphere-vps-1.2-2.i386.rpm
# wget http://psoft.net/shiv/HS/RH73/hsphere-script-runner-1-8.rpm
# wget http://psoft.net/shiv/HS/RH73/hsphere-sudo-1.6.3p5.rpm
Red Hat Enterprise Linux ES release 3
Kernel packages are available here:
http://www.freevps.com/download/rpms/RH_EL
# wget http://www.psoft.net/shiv/HS/VPS/RHEL/freevps-tools-1.2-1.i386.rpm
# wget http://www.psoft.net/shiv/HS/VPS/RHEL/hsphere-vps-1.2-2.i386.rpm
# wget http://psoft.net/shiv/HS/RHES3/hsphere-script-runner-1-8.rpm
# wget http://psoft.net/shiv/HS/RHES3/hsphere-sudo-1.6.7p5-0.rpm
Check the VPS build:
# cat /proc/vservers/setup | grep "vserver build"
You will get something like this:
vserver build 1069944738
If your vserver build is less than the required 1081688192, you need to update your
kernel.
Check your kernel release.
# uname -r
You will get something like this (for example):
2.4.18-freevps-1.1-0
Find out kernel packages installed:
# rpm -qa | grep kernel
You will get, for example:
Red Hat Linux release 7.3:
kernel-2.4.18-3
kernel-freevps-1.1-0
Red Hat Enterprise Linux release 3:
kernel-2.4.21-4.EL
Therefore, the old kernel package to be uninstalled is
kernel-freevps-1.1-0.
However, beforehand you need to install the new kernel as specified in the next step.
Note: You need to uninstall old FreeVPS kernels only!
Check the H-Sphere VPS scripts version:
# rpm -qa | grep hsphere-vps
You will see something like this:
hsphere-vps-x.xx-x
where x.xx-x is the old hsphere-vps tools/scripts version and release number.
Uninstall the old H-Sphere VPS scripts:
# rpm -e hsphere-vps-x.xx-xx
Check the FreeVPS tools version:
# rpm -qa | grep freevps-tools
You will see something like this:
freevps-tools-x.xx-x
where x.xx-x is the old freevps-tools version and release number.
Uninstall the old FreeVPS tools:
# rpm -e freevps-tools-x.xx-xx
Check the Vserver tools version:
# rpm -qa | grep vserver
You will see something like this:
vserver-x.xx-x
Uninstall the Vserver tools, they are not required in new version of VPS:
# rpm -e vserver-x.xx-xx
Install the packages in the following sequence:
Note: You need to satisfy all dependences during installation.
1) (RH 7.3 only) Update modutils:
# rpm -Uvh modutils-2.4.25-11.EL.i386.rpm modutils-devel-2.4.25-11.EL.i386.rpm
2) (RH 7.3 only) Update SysVinit, pam, pam-devel, vixie-cron packages:
# rpm -Uvh SysVinit-2.85-4.i386.rpm pam-0.75-51.i386.rpm pam-devel-0.75-51.i386.rpm vixie-cron-3.0.1-74.i386.rpm
Install the new kernel package.
Note: Skip this step if you have the latest kernel release.
1) Install the new kernel package kernel-freevps-1.2-x.
2) Go to the /boot directory to check if the kernel update takes place:
# cd /boot
# ls -la
The new kernel is vmlinux-2.4.21-freevps-1.2-2.
The old one would look like:
Red Hat Linux release 7.3:
vmlinuz-2.4.18-3
vmlinux-2.4.18-freevps-1.1-0
Red Hat Enterprise Linux release 3:
vmlinux-2.4.21-4.EL
3) Modify the boot loader, (a) for GRUB or (b) for LILO:
(a) GRUB: Edit the /boot/grub/grub.conf configuration file:
Note: GRUB loader my automatically update it's configs. In that case you need to change default boot image.
# vi /boot/grub.conf
The file should look like this:
Red Hat Linux release 7.3:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.21-freevps-1.2-2)
root (hd0,0)
kernel /vmlinuz-2.4.21-freevps-1.2-2 ro root=/dev/sda5
initrd /initrd-2.4.21-freevps-1.2-2.img
title Red Hat Linux (2.4.18-3)
root (hd0,0)
kernel /vmlinuz-2.4.18-3 ro root=/dev/sda5
initrd /initrd-2.4.18-3.img
Red Hat Enterprise Linux release 3:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-freevps-1.2-2)
root (hd0,0)
kernel /vmlinuz-2.4.21-freevps-1.2-2 ro root=/dev/sda5
initrd /initrd-2.4.21-freevps-1.2-2.img
title Red Hat Enterprise Linux ES (2.4.21-4.EL)
root (hd0,0)
kernel /vmlinuz-2.4.21-4.EL ro root=/dev/sda5
initrd /initrd-2.4.21-4.EL.img
default=0 means that GRUB would take the first title record
as the boot image, i.e., our new kernel.
GRUB loader would update the kernel automatically after reboot.
(b) LILO:
Step 1: Modify the lilo.conf configuration file:
# vi /etc/lilo.conf
Copy and paste the kernel image settings lines
and change the kernel number and the label parameter.
Change the default kernel loading parameter to the new kernel label name.
Important! Do not delete the old kernel image settings! If you delete these lines and
something goes wrong with the new kernel installation, your system would not start!
After these changes, lilo.conf would look like:
Red Hat Linux release 7.3:
prompt
timeout=50
default=linux_patched
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinuz-2.4.18-3
label=linux
initrd=/boot/initrd-2.4.18-3.img
read-only
root=/dev/sda5
image=/boot/vmlinux-2.4.21-freevps-1.2-2
label=linux_patched
initrd=/boot/initrd-2.4.21-freevps-1.2-2.img
read-only
root=/dev/sda5
Red Hat Enterprise Linux release 3:
prompt
timeout=50
default=linux_patched
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear
image=/boot/vmlinux-2.4.21-4.EL
label=linux
initrd=/boot/initrd-2.4.21-4.EL.img
read-only
root=/dev/sda5
image=/boot/vmlinux-2.4.21-freevps-1.2-2
label=linux_patched
initrd=/boot/initrd-2.4.21-freevps-1.2-2.img
read-only
root=/dev/sda5
Step 2: Type lilo to apply changes:
# lilo
You will see the line:
Added linux
Added linux_patched *
4) Reboot the server:
# shutdown -r now
5) Check if the kernel update takes effect:
# uname -a
If the kernel version is 2.4.21-freevps-1.2-2,
the kernel is updated successfully.
After the new kernel installation is complete, uninstall the old kernel
which version was defined in Step 4.
Note: You need to uninstall old FreeVPS kernels only!
For example, if
kernel is kernel-freevps-1.1-0, run:
# rpm -e kernel-freevps-1.1-0
Install generic FreeVPS tools:
# rpm -ivh freevps-tools-1.2-1.i386.rpm
Install new H-Sphere VPS tools:
# rpm -ivh hsphere-vps-1.2-2.i386.rpm --replacefiles
Note: Install the package with --replacefiles option!
Run update script:
# cd /hsphere/shared/scripts/
# ./vps-update.pl
and follow the script instructions step by step.
Run configuration script:
# ./vps-configure.pl
and follow the script instructions
step by step.
Resume suspended VPS:
# cd /hsphere/shared/scripts
# ./vps-resume.pl <vps_name>
where <vps_name> is a suspended VPS server name.
To resume all suspended VPS servers, run:
# ./vps-resume.pl --all