Knoppix Remastering (on 64-bit host) with VMware Player
Hello!
Following last month's VMware forums post by Markus Bertschmann (
http://www.vmware.com/community/thread.jspa?messageID=319248񍼐
) on remastering Knoppix 4.0.2 to include the new redistributable VMware Player, I
decided to follow the instructions to make my own. I thought it might
be helpful to list some of my own experiences (and would be happy for any constructive feedback).
1) My development environment is a new 64-bit AMD Turion notebook running Debian Testing (AMD64), for which I rebuilt kernel
2.6.12.2
in order to run VMware Workstation 5.5 (wanting to make use of the
64-bit machine to host everything else I run). I used the Knoppix steps
above with standard Debian, but used the "Debian method" for new kernel
building (make-kpkg, etc.). Workstation 5.5 works great.
2) I assumed (incorrectly) that I could then
simply take the kernel configuration from Knoppix 4.0.2, make sure that
it specified ix86, and rebuild the Knoppix kernel the same way.
Unfortunately, since my gcc tools are 64-bit, they want to build a
64-bit kernel, resulting in a large number of "x86" kernel options
missing from the kernel configuration stages and consequent build
failure.
3) I then assumed (incorrectly) that I could create a separate
32-bit chroot and install a minimal 32-bit Debian system to rebuild the
Knoppix kernel. It seemed again that even using 32-bit gcc in the
chroot, a 64-bit kernel was being attempted, with the same failure
results as in step 2 above.
4) Cross-compiling the kernel was my next attempt, and I
attempted to build the i386 binutils from source. This approach
should work, but I ran into a recent bug (
http://lists.gnu.org/archive/html/bug-binutils/2005-05/msg00003.html)
that doesn't yet seem to be patched in any Debian binutils source
package, so I could not build the AMD64-based i386-target cross
compilation environment. I considered starting from non-Debian standard
binutils sources, but all this seemed too far off course, and I wasn't
confident that more effort in this direction was worth the trouble.
5) Finally (duh!), I created a Knoppix CD-like HD-installed VM
using VMware, and was able to rebuild the Knoppix kernel. I had avoided
this method originally due to some unresolved CD/DVD burner issues when
attempting to burn CDs from any of my VMs (and I still have to ftp my
remastered knoppix.iso out to my 64-bit host for testing and burning),
but am pleased with how well a 32-bit Knoppix guest works for kernel
development on a 64-bit host.
6) Specifically regarding Knoppix kernel rebuilding:
a) I used the same 2.6.12.2.tar.gz sources downloaded from kernel.org
as Markus (rather than a Debian kernel source package), but used the
Debian kernel building tools (i.e., make-kpkg), and did not make an
initrd image (
i.e., no "--initrd" option).
b) I used apt-get install for Debian testing cloop-src (2.02.1+eb.10), and make-kpkg modules_image to build cloop.ko.
c)
I tried the Debian packages (including unstable) for unionfs-source,
but got a unionfs error on booting with the unionfs.ko built from them,
so I downloaded the source gz for unionfs-1.1.1 and built it via
make-kpkg --added- modules=unionfs modules, only to find that unionfs.ko
was over 5MB in size. It turns out that when you compile unionfs with
all the debugging turned off (see http://www.fsl.cs.sunysb.edu/pipermail/unionfs/2005-July
/000819.html
and add -DUNIONFS_NDEBUG as well, I think) you get a unionfs.ko under 100KB.
7) Specifically regarding VMware Player installation:
a) I used VMware-player-1.0.0-18587.tar.gz (as the blah-18007.tar.gz used by Markus seems to have gone away).
b)
If you don't have a running kernel that the VMware Player installation
recognizes, it uses your kernel sources (or at least your kernel hdrs)
to build its kernel modules, but can't completely install unless the
running kernel matches its build environment. So, I first made a new
knoppix.iso with the above kernel, ftp'ed it out to my host (after
enabling the Knoppix ftp server already present in the Knoppix guest;
see http://www.knoppix.net/wiki/FTP_FAQ
), booted the iso in the Knoppix HD VM, chrooted to my Knoppix
source/KNOPPIX, and ran the VMware Player installation script in the
chrooted environment with the correct running kernel.
c) To make room on my remaster I lazily eliminated just open office, which gave me more than enough free space.
8) I am experimenting with my Windows XP VM (that I use to run
Wonderware (TM) industrial process control applications) using
Knoppix/VMwarePlayer for machines running in physical locations hostile
to hard drives. So far, I can boot Knoppix on a machine with no hard
drive, mount a network share (using mount.cifs rather than mount.smbfs,
since Knoppix's smbfs appears to be unable to process remote .vmdk
files larger than 2GB; signal 25 errors), browse to the share using
VMwarePlayer, and run the Windows XP VM with its Wonderware application
successfully. Given my limited network speed (10Mbs), performance is
still acceptable. Next I plan to play with netbooting my remastered
Knoppix itself (see http://knoppix.manty.net/ plus Stephen Samuel's very recent posts to this list
http://lists.debian.org/debian-knoppix/2006/01/msg00062.html ), so my industrial targets don't need a working CD drive either.
Hope this helps somebody, and thanks very much to Markus Bertschmann for your example!
Regards,
Norm Petterson
Reply to: