Difference between revisions of "Upgrade a 4.x Installation using a newer ISO image"

From Proxmox VE
Jump to navigation Jump to search
Line 4: Line 4:
 
  apt-get update && apt-get dist-upgrade
 
  apt-get update && apt-get dist-upgrade
  
(see the wiki for exact steps)
+
(see the wiki for exact steps for the upgrade of each release)
 +
 
 
If you don't have access to internet but you have a 4.1 ISO you can use it to update the packages.
 
If you don't have access to internet but you have a 4.1 ISO you can use it to update the packages.
  

Revision as of 07:25, 5 April 2016

Introduction

If you have a valid subscription or you have enabled the "pve-no-subscription" repositories the upgrade process should be as easy as upgrading packages, i.e.

apt-get update && apt-get dist-upgrade

(see the wiki for exact steps for the upgrade of each release)

If you don't have access to internet but you have a 4.1 ISO you can use it to update the packages.

Step by step upgrade process

Create a mount point and update /etc/fstab accordingly

mkdir /media/cdrom
echo '/dev/sr0 /media/cdrom iso9660 noauto,ro 0 0' >> /etc/fstab  # optional

Mount the CD or an ISO image

If you have a real CD/DVD or if running the Proxmox VE in another VM and using the ISO image:

mount /dev/sr0 /media/cdrom

or just (if you have an entry in the /etc/fstab):

mount /media/cdrom

If you have the downloaded ISO image:

mount -o loop /path/to/proxmox-ve_4.1-2f9650d4-21.iso /media/cdrom

Mount an empty directory over /media/cdrom/dev

Using apt-cdrom will fail while trying to scan /media/cdrom/dev/proc/self/fd directory. As a workaround create an empty file-system and mount it over /media/cdrom/dev:

mkfs.cramfs /mnt /tmp/empty-image.img                # /mnt being an empty directory
mount -o loop /tmp/empty-image.img /media/cdrom/dev
ls -l /media/cdrom/dev                               # shows an empty content

Add a CD repository

apt-cdrom --no-auto-detect --cdrom /media/cdrom --no-mount add

This should scan the CD content, ask you for a name (use Proxmox 4.1) and add a repository in your /etc/apt/sources.list file. It creates also an entry in the /var/lib/apt/cdroms.list using the CD ID and given name. The content of the /var/lib/apt/cdroms.list should look like:

CD::aa2253e1b6b98e93b17b38bef5b4d256-2 "Proxmox 4.1";

The added lines to the /etc/apt.sources.list should look like:

deb cdrom:[Proxmox 4.1]/ jessie pve
deb cdrom:[Proxmox 4.1]/proxmox/packages/ /

Update and upgrade packages

apt-get update && apt-get dist-upgrade

Reboot

systemctl reboot

The packages should be updated from the CD/ISO image, a new kernel version should be 4.2.6-1-pve.

Cleanup: Remove the CD repository

You can disable or remove the CD repository by commenting out the corresponding lines in the /etc/apt/sources.list file, you can also remove the /var/lib/apt/cdroms.list file. Run apt-get update afterwards.