When virtualbox guest editions gets updated on the host, it is instantly out of sync with the basebox. Often this just causes a warning but for some upgrades (e.g. Virtual Box 5.2.12 with bento/debian-9.1) this breaks the build.
One solution is to use a plugin to automatically update guest editions on startup. We would prefer not to require a plugin to make this work.
Here's a sequence of commands to manually update (this may come in handy to resolve this issue):
apt-get install build-essential module-assistant
Configure your system for building kernel modules:
m-a prepare
Insert Guest Additions ISO:
Expand menu Devices and click on Insert Guest Additions CD image...
It should mount automatically, but if for any reason it doesn't:
mount /media/cdrom
Run the following script:
sh /media/cdrom/VBoxLinuxAdditions.run
When virtualbox guest editions gets updated on the host, it is instantly out of sync with the basebox. Often this just causes a warning but for some upgrades (e.g. Virtual Box 5.2.12 with bento/debian-9.1) this breaks the build.
One solution is to use a plugin to automatically update guest editions on startup. We would prefer not to require a plugin to make this work.
Here's a sequence of commands to manually update (this may come in handy to resolve this issue):
apt-get install build-essential module-assistant
Configure your system for building kernel modules:
m-a prepare
Insert Guest Additions ISO: Expand menu Devices and click on Insert Guest Additions CD image... It should mount automatically, but if for any reason it doesn't:
mount /media/cdrom
Run the following script:
sh /media/cdrom/VBoxLinuxAdditions.run
Restart the system:
reboot