As a lot of developers I utilise Virtual Machines (VMs) to host my development environments. Below are my notes with some of the issues I had updating a Virtualised Debian 7 machine to Debian 8 (Wheezy to Jessie).
First thing was a standard update, ie. make sure the current system is updated by doing:
Then I needed to change the sources file in /etc/apt/ basically where wheezy was mentioned you change this to jessie
Then the update:
Grub – issue
During the upgrades I got some Grub errors (when prompted I ticked the boxes to install Grub wherever it wanted and this seemed to be OK).
Some packages would be held back and so to fix these you need to do:
Apache issues (part 1)
During the update the installer asks if I wanted to keep some of my existing Apache conf files or replace with the new ones. As often I would have changed the configuration files specifically for my setup I opted for the default of keeping my own. The two files of note for me were apache2.conf and ports.conf.
Virtualbox Guest additions issues
During the update, Virtual box guest additions gave an error performing build. So I Set Networking to Bridged so I could get a connection.
Further Update issues
apt-get update / upgrade gave:
Calculating upgrade… The following packages were automatically installed and are no longer required:
apache2.2-bin apache2.2-common dkms fakeroot giblib1 gnome-js-common gstreamer0.10-plugins-good gstreamer0.10-pulseaudio libbind9-80 libcolord1 libdconf0
libdevmapper-event1.02.1 libdns88 libdrm-nouveau1a libfakeroot libfftw3-3 libfftw3-long3 libgd2-xpm libgdu0 libglew1.7 libgphoto2-2 libgphoto2-port0 libicu48 libisc84
libisccc80 libisccfg82 libjson0 liblvm2app2.2 liblwres80 libparted0debian1 libseed-gtk3-0 libsystemd-daemon0 libsystemd-login0 libvte-common libvte9
linux-headers-amd64 openssh-blacklist openssh-blacklist-extra python-aptdaemon python-aptdaemon.gtk3widgets python-defer python-fpconst python-gnupginterface
python-pycurl python-software-properties udisks virtualbox-guest-dkms virtualbox-guest-utils
Use ‘apt-get autoremove’ to remove them.
The following packages have been kept back:
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Do I decided to remove the db5 package as it looked like a hangover from an older version of Debian.
apt-get remove db5.1-util
Fixing the VirtualBox Guest additions
So I wanted to see if I could get the VirtualBox additions updated, so I searched for what was available:
aptitude search virtualbox
id virtualbox-guest-dkms – x86 virtualization solution – guest addition module source for dkms
id virtualbox-guest-utils – x86 virtualization solution – non-X11 guest utilities
c virtualbox-guest-x11 – x86 virtualization solution – X11 guest utilities
I opted to try a complete purge and re-install:
aptitude purge virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
However after this an aptitude search turned up no packages.
Looking online I found the following instructions:
apt-get install build-essential module-assistant
Mount the Guest additions CD from the Devices menu (or tried to, but couldn’t)
In the end I had to:
mount /dev/cdrom /media/cdrom
then the last instruction was:
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.2.16 Guest Additions for Linux…………
VirtualBox Guest Additions installer
Copying additional installer modules …
Installing additional modules …
Removing existing VirtualBox DKMS kernel modules …done.
Removing existing VirtualBox non-DKMS kernel modules …done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
Building the main Guest Additions module …fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions …done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed. Not installing
X Window System drivers.
Installing graphics libraries and desktop services components …done.
so I tried:
apt-get install linux-headers-amd64 (but it seems this was already installed)
A support forum pointed out tha dkms needs to be installed:
apt-get install build-essential linux-headers-`uname -r` dkms
In the end I decided to find a more up-to-date iso but still a similar version to the VirtualBox Host:
I downloaded and renamed to VBoxGuestAdditions.iso
Re-performed the install from the guest and the install seemed to go through fine.
Reset the network back to NAT and attempted a simple port forward for the VNC server which worked fine!
Apache wasn’t starting up
[….] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See ‘systemctl status apache2.service’ and ‘journalctl -xn’ for details.
problems were down to errors in the apache2.conf:
Include conf.d/ (This no longer exists so changed it to conf-enabled/)
LockFile (simply commented out with a #)
Now Apache started.
However sites that used .htaccess like WordPress and Joomla were failing to work with a .htaccess Options not allowed here error in the Apache log.
placing this right at the end of sites-available/000-default.conf seems to sort it:
Further investigation reveals an extra section in the standard apache2.conf distributed so I decided to remove my above mod and copy the below into my version of the apache2.conf:
# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
Require all denied
Require all granted
Options Indexes FollowSymLinks
Require all granted
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
I then changed the AllowOverride in the /var/www section to All from None.
Another thing to note was I always use halt to shutdown a VM, however now in Debian 8 this no longer powers the machine off, instead you have to do: