![]() |
FREIE SOFTWARE KNOPPIX |
![]() |
![]() |
Add Freedom to Knoppixby Dominik Reusser, David Putzer and Vincent Hermenier for Intevation GmbH.enhanced for Knoppix 3.7 by Sascha Wilde <wilde@intevation.de> $Id: knoppixAddFreedom.html,v 1.21 2005/02/24 10:29:18 wilde Exp $ 1 IntroductionKnoppix is a great platform to develop live CDs which directly boot and run off the CDrom drive. Knoppix is based on Debian GNU/Linux with improved autodetection and a compressed filesystem. However, there are a couple of non-free packages coming with original Knoppix releases. This is a not desirable for Free Software projects. This text will help you to identify and remove the non-free packages and use Knoppix as basis for your own project.When we started with this description how to put the freedom back into your Knoppix CD we were not aware of any variant of Knoppix having the same goal. Meanwhile knoppix.net has grown a page with http://www.knoppix.net/wiki/Knoppix_Customisations. Most listed custom versions leave the proprietary software on the CD, but some care enough about Freedom to remove it. Several other descriptions for remastering the Knoppix CD exist. Differently from this description many start with booting from the CD-Rom. Here is an incomplete list:
Versions known to workThere are many Knoppix version out there, these instructions will be a principle guide, but can only be specific for a range of versions. If you read this file coming with a Knoppix CD itself than you know the version it was applied to. We applied this specific revision of this document to the current version of KNOPPIX, namely the KNOPPIX_V3.7-2004-12-08-DE.2 Extraction of the Knoppix Environment
Remastering the CD involves creating two new directories to store and modify
the uncompressed CD and then recompressing it. The first directory will contain
the content of the CD as it appears including the packed file system at
Starting from the knoppix ISO-image the knoppix environment can be extracted. This is done using the knoppixFreedom.ripISO script which mounts the image, copies the files and extracts the compressed file system. WARNING: Check the script and modify it to your requirements before running them! The extraction is done using the extract_compressed_fs command from the cloop package. Note that this is safer than mounting the compressed filesystem with the cloop kernel module (Due to bugs in the cloop-module, parts of the system might freeze when the compressed file is heavily accessed; see zork.net and debian bug reports).
Next, files from the compressed filesystem are copied and the
timestamps of the files are written into a file called
Two new directories contain the files from the CD as they appear
(KNOPPIX_V3.7-2004-12-08-DE) and the files from the compressed
filesystem (KNOPPIX_V3.7-2004-12-08-DE_env). You are now free to
tailor the extracted Knoppix to your requirement by chrooting into the
directory with the extension
3 Removal of Proprietary SoftwareSeveral places can be searched for non-free software.Debian packagesThe easiest part is removing the debian packages in the contrib, non-free and non-us/non-free sections (debian packages). A good way to obtain the installed non-free packages is to use the command:
Unfortunatly there are more unfree packages. These are customized packages for Knoppix, which can be found in the Knoppix section. Good news is: they are marked by the suffix "nonfree" in the packagename. We get them with:
Another suspicious section is "alien", it contains converted packages from other packaging systems.
In the end we obtain:
The package atmel-firmware contains a firmware blob, which is not realy free, too. But we think of this kind of firmware blobs as a part of the hardware, so we leave it. If you think this is not the right thing to do, feel free to remove it. These packages can be removed by chrooting into knoppixFreedom_env and by using dpkg or dselect. To remove them we use (after a chroot KNOPPIX_V3.7-2004-12-08-DE_env):
The deinstallation of 3270-common and x3270 still leaves some charsets in /etc/3270, we don't need them so we remove the directory
And erasing the captive stuff leaves /usr/share/lufs useless so remove it as well
In the case of acroread, the above command is not enough. In fact, the system keeps acroread as the default pdf viewer. On top of that we remain with acroread menu entries and the acroread icons. The first step is to get rid of the menu entries and the icons, this can be performed using:
The next step is to change the default viewer to be used for the pdf files and to remove references to the Icons we deleted. This can be done edititing the files
Helpers downloading non-free softwareWe also removed the non-free entries from the KNOPPIX_V3.7-2004-12-08-DE_env/etc/apt/sources.list file.Kernel modulesBeside the non-free packages, there might be non-free kernel modules installed. A list of available binary-only modules was published on the linux-kernel mailinglist . However, it is very difficult to get the module names from the descriptions in this list (usually, the package has to be downloaded and unpacked). Therefore a different approach works better: After chrooting into knoppixFreedom_env, names and license-information is obtained for all modules:
There might be additional directorys in /lib/modules which have to be scanned. For KNOPPIX_V3.7-2004-12-08 there are only two: airo_mpi/ (for Cisco/Aironet) and extra/ which contains alsa modules for 2.4.27 -- these are all free software under the GPL. All non-GPL Modules are obtained using vim:
There is only one proprietary module: /lib/modules/2.4.27/net/ath_hal.o which we remove
There are about 20 modules with no license information. It is easy to check the sources for the corresponding license and confirm that no non-free kernel-modules are installed. After changing the installed modules we run depmode on the modified modules directory
Also, one should check for non-free graphic card drivers. However, these seem to be restricted to two main packages, the nvidia driver for GeForce cards and the ATI firegl XFree86 package (xfree-features). It can also be checked, whether installed fonts and xine binary-plugins are distributed under GPL. This is confirmed consulting the source codes and searching the internet. (rpmfind) Other softwareKnoppix might contain other non-free software or data that is not registered as a Debian packet or with the kernel. It is difficult to search for this systematically. Knoppix 3.7 for instance does have Java installed from a tarball. So you need to remove it manually like
This leaves some broken symlinks, remove them too
5 Changing other stuffIn order to make the freedom added CD distinguishable, background pictures and documentation were adjusted. As mentioned in section 2, background pictures and html files were copied to the directorydoc if it did not exist at that point. Changes can be
made in this directory. At the same time, pictures were converted from
the patent encumbered gif format to the free PNG format. Therefore
configuration files also had to be adjusted. Files in
/etc were searched for the strings .gif.
Relevant files to adjust were found to be
Now that we've finished remastering and to update the databases used by locate, dlocate we perform the command:
6 Performing steps 4 and 5A nice way to perform the steps 4 and 5 is to use the script called knoppixFreedom.purge:
7 Changing boot.imgIn order to make the freedom added CD distinguishable, we also modified the boot.img file, thus enabling us to modify the linuxrc, boot.msg, f2 and logo.16 files. Details on how to perform this action can be found on knopper.net for example
8 Recreating CD-RomOnce the knoppixFreedom environment sadisfies your requirements, it is fairly easy to create the ISO-image. All you have to do, is to run a sh-script which was derived from Knoppix.mkcompressed (you have to be root to do this, otherwise files like /etc/sudoers will not be properly included.):
As a reminder, sorting of files in the compressed file system is usefull to reduce the positioning of the laser in the CD drive to a minimum for reasonable performance during the boot process.
Before creating the compressed file system, the script tries to read the file
The compressed file system is created much faster (5 instead of 90 minutes on a fast computer) with the alternate method based on the Another quick way to get an iso of the modified system is to use:
It is possible to test the modified version of Knoppix. To do this, you need to link the KNOPPIX directory to the root of the partition. Then the computer can be booted from a knoppix boot floppy. The KNOPPIX directory should be detected automatically. Note that this has not been tested yet.
9 DisclaimerThis documentation and the scripts are provided as is. Intevation GmbH is in no way responsible for any loss of information or other damage that you may suffer as a consequence of reading this material or using any scripts. USE AT OWN RISK.
Copyright (c) 2002-2005 Intevation GmbH
|