Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Using a cutesy uname-r-boot2docker name for the boot2docker kernel breaks dkms #1201

Open
gswallow opened this issue Aug 25, 2016 · 4 comments
Labels

Comments

@gswallow
Copy link

Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 4.4.17-boot2docker cannot be found.
Please install the linux-headers-4.4.17-boot2docker package,
or use the --kernelsourcedir option to tell DKMS where it's located
...failed!
(Failed, trying without DKMS)

@bogdanRada
Copy link

any updates on this? I have same problem

@aSapien
Copy link

aSapien commented Feb 8, 2020

Same here 😢

Where do we find the relevant kernel source code? We can get the headers from there.

AFAIK It should be open-source according to the GPL license

@tianon
Copy link
Contributor

tianon commented Feb 8, 2020

boot2docker/Dockerfile

Lines 180 to 224 in e99ccc0

# updated via "update.sh"
ENV LINUX_VERSION 4.19.84
RUN wget -O /linux.tar.xz "https://cdn.kernel.org/pub/linux/kernel/v${LINUX_VERSION%%.*}.x/linux-${LINUX_VERSION}.tar.xz"; \
wget -O /linux.tar.asc "https://cdn.kernel.org/pub/linux/kernel/v${LINUX_VERSION%%.*}.x/linux-${LINUX_VERSION}.tar.sign"; \
\
# decompress (signature is for the decompressed file)
xz --decompress /linux.tar.xz; \
[ -f /linux.tar ] && [ ! -f /linux.tar.xz ]; \
\
# verify
export GNUPGHOME="$(mktemp -d)"; \
for key in $LINUX_GPG_KEYS; do \
for mirror in \
ha.pool.sks-keyservers.net \
pgp.mit.edu \
hkp://p80.pool.sks-keyservers.net:80 \
ipv4.pool.sks-keyservers.net \
keyserver.ubuntu.com \
hkp://keyserver.ubuntu.com:80 \
; do \
if gpg --batch --verbose --keyserver "$mirror" --keyserver-options timeout=5 --recv-keys "$key"; then \
break; \
fi; \
done; \
gpg --batch --fingerprint "$key"; \
done; \
gpg --batch --verify /linux.tar.asc /linux.tar; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \
\
# extract
tar --extract --file /linux.tar --directory /usr/src; \
rm /linux.tar /linux.tar.asc; \
ln -sT "linux-$LINUX_VERSION" /usr/src/linux; \
[ -d /usr/src/linux ]
# apply kernel entropy patch from 5.4; this same patch was backported in Debian in 5.3.9-1
# - https://git.kernel.org/linus/50ee7529ec4500c88f8664560770a7a1b65db72b
# - https://salsa.debian.org/kernel-team/linux/commit/c323c453b2485a33bfb33635a07f3a50bc1db1ee
# - https://lists.debian.org/debian-boot/2019/11/msg00077.html
# specifically, this solves the problem of early-boot entropy (SSH key generation, for example), avoiding the need for userspace solutions like haveged
RUN wget -O kernel-entropy.patch 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=50ee7529ec4500c88f8664560770a7a1b65db72b'; \
patch -p1 --input "$PWD/kernel-entropy.patch" --directory /usr/src/linux; \
rm kernel-entropy.patch

@aSapien
Copy link

aSapien commented Feb 8, 2020

@tianon thanks! This helped me progress a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants