One of the primary frustrations of using TinyCore Linux 6.x in VirtualBox is the lack of support for the Guest Additions. Apparently it used to be built for the OS back in the 4.x days, but no more. I've attempted to build the support myself, but have thus far failed. I'm going to document the failure in the hope that others (or even me, later on) might learn from it and build on it.
Versions: TCL 6.4.1, VirtualBox 4.3.32, Ubuntu Linux host system
You need a relatively large virtual hard drive - or at least I think you do, because I assume we need the entirety of the Linux kernel sources. I started by installing the following packages:
- compiletc - compiler environment for TinyCore (some of what follows may be included in this: I didn't install them in this order)
- curl - for fetching the Linux Kernel sources
- gcc - compiler and associated dependencies
- glibc_base-dev - recommended for Fedora, sounded ... semi-reasonable
- make - required by the build script
- patch - busybox fakes patch, thought the real thing would be better
- tar - busybox fakes tar, I thought the real one might be helpful - and may be required for xz support
- Xorg - I think we'll need a full version of X to build the Additions
- xorg-server-dev - assuming we need X's dev packages to build
- xz - (un)compressor for the kernel sources
TinyCore doesn't provide a kernel source package (they really should). Use
uname -a to identify the kernel: in TCL 6.4.1, it's "3.16.6-tinycore #777 SMP." Fetch the matching kernel from kernel.org with curl, something like:
$ curl -o linux-3.16.5.tar.xz https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.5.tar.xz
I unpacked this in /home/tc/linux-3.16.6/ and linked it under /usr/src/linux-3.16.6/ , although that didn't seem to help. After mounting the Virtual Box Guest Additions virtual CD and changing into the newly mounted directory, I try:
This complains a fair bit, but the first cogent warning suggests I look in /var/log/vboxadd-install.log. This complained initially that I should specify "KERN_DIR=<directory>", so I ran:
export KERN_DIR=/home/tc/linux-3.16.6/ ; ./VBoxLinuxAdditions.run
The on-screen errors remain essentially the same, but the log error says "Error: KERN_DIR does not point to a directory." This doesn't seem to be true, but that's where I'm stuck. I also tried /tmp/tcloop/linux-3.16.2_api_headers/usr/include/ which is the only package resembling headers supplied by TinyCore - got the same failure. But this needs to be looked at in another light as well: what if the script uses some tool that's not available to identify the kernel directory and the failure of that tool is interpreted as non-existence of the directory? <sigh> So the next step is to dig into the script itself.
A couple things I've been thinking about: on Debian/Ubuntu systems, you need "dkms" and "kernel-header" packages. My kernel knowledge is weak enough that I don't know exactly what either of these is: "DKMS" = "Dynamic Kernel Module Support." My guess is that the full kernel source includes both headers and DKMS, but that may well be entirely wrong. No installable packages exist for either in TCL.
Links that provide some kind of hint(s).
- HOWTO: Install Linux Guest Additions + Xorg config - 2009, out-of-date, doesn't address TC, and possibly misleading, but so far the best I've found
- 3.x kernels at kernel.org <https://www.kernel.org/pub/linux/kernel/v3.x/>
- http://forum.tinycorelinux.net/index.php?topic=14780.0 - for pointing out the compiletc.tcz package