Linux kernel is not determined correctly #121
Comments
Oh boy. I had no clue that I think this is where @rybaktomasz's idea about handling kernel installation a bit more centralized comes in. |
Yup.
How that would work? I've created a task to identify the kernel that is going to be installed parsing the output of |
Nice going Tiago. This is maybe where I'll try and look through the install script for the guest additions, maybe we can monkey patch it, so it doesn't fail. In any case, this should be a bug report to the VirtualBox team. |
I've tried to use
Oh... That awesome shell script full of binary data. I was really hoping that we don't touch that again. :-(
Would be nice if we could just pass the kernel version as a parameter, environment variable or something like that. Do you mind of reporting it at their bug tracker? I guess you are already registered there. |
Should I try to provide some working python-apt implementation, or is it to early now? |
I don't think we'll switch to python-apt before releasing 1.0, the change is simply too big. A proof of concept would be nice though, an amuse-bouche if you will :-) |
May I suggest to rename this issue ? I'm not sure this is specific to backported kernels. Also stands for generation of stable targe images on testing host, for instance. |
FWIW, when playing with vagrant provisionning scripts, I experienced this dkms dependencies module building issue, which I solved in the following way: building images with vagrant up && vagrant reload --provisioning. The 2 runs will execute the same provisionning script which does something like this:
This way, first we update the kernel, and then do the rest only after reboot with this kernel, so in principle, /vagrant is always mountable. Hope this helps, even though unrelated, as bootstrap-vz doesn't run vagrant. |
Renamed the issue. I'm not sure how to fix this right now. I think a temporary stop-gap measure would be to deny building images on hosts where the kernel version differs from the one on the guest (only when installing guest additions of course). |
Although this wouldn't be a very clean approach... Maybe we could just postpone the Guest Additions installation script to run on the first boot of the box? |
... effectively doubling the |
In this case, I guess your suggestion of blocking the image build process is the way to go.
They beat WolframAlpha on this one. :-) |
Based on the suggestion that @olberger made on #130 (which didn't worked for I'll tag this issue as |
Agreed. Nice job ;-) |
Thank you, Anders. :-) |
The `uname -r` command returns the version of the running kernel running on the host machine, as the chroot environment doesn't load a new one. This prevents the proper version of the `linux-headers-*` package from being added when the target has a different kernel version or architecure. This closes andsens#121.
I noticed that when building a virtualbox image with the
docker_daemon
plugin, thelinux-image
package was installed from backports, as expected, butlinux-headers
don't. This makes the Guest Additions modules built during the process to not work with the backported kernel. Looking at theAddGuestAdditionsPackages
task, I see that the detected kernel version is actually the one from the host which is running bootstrap-vz, aschroot
doesn't load a new kernel.Any suggestions on how we can detect the correct version of the kernel that is going to be installed?
The text was updated successfully, but these errors were encountered: