Customizing Knoppix for GNUmed

This is just a writup of what I did to build the KNOPPIX-GNUmed-CDs

1.) get yourself a recent KNOPPIX-CD

2.) read http://www.knoppix.net/docs/index.php/KnoppixRemasteringHowto

3.) check out the scripts provided in GNUmed CVS and adapt them to your PC
	alternatively
    copy contents , chroot etc. as mentioned in 2.)

4.) get GNUmed Debian-packages from
	http://people.debian.org/~tille/packages/gnumed/

5.) install theses packages with dpkg. There might be some unmet dependencies.
	install the missing packages with 'apt-get install <package>'

6.) Now follow 2.) again to compress the filesystem and build an iso-image
	alternatively you might want to use the scripts I wrote for this purpose.
	You can find them in GNUmed CVS

7.) Do not burn the ISO just for testing unless you really don't care about money.
	In this case consider donating it to GNUMed.
	
	1.) Use vmware - they have a trial version
	2.) create youself a boot floppy
		dd if=/cdrom_path_to/boot.img of=/dev/fd0 bs=1440
	3.)move the compressed file /master/KNOPPIX up one level
		the boot floppy will loop through all partitions and look for a file
		called KNOPPIX.

Important things you should know:

1.)the only place the default user knoppix has read/write access to is the ramdisk

2.)knoppix's homedir will show up in /ramdisk/home/knoppix

3.)if you want to permanently add files/directories to the CD and you want them
   	to appear on the CD you need to take a look at the directory '/etc/skel'
4.)if you chose to add a directory or file to the above directory you can do so but it will
   	not show up till you add one or more appropriate entries to the file '/etc/X11/Xsession.d/45xsession.

5.)you can alter the boot message and boot screen by mounting the file /master/KNOPPIX/boot.img.
	this is done by the following command :
	'mount -t msdos -o loop /foo/master/KNOPPIX/boot.img /your_mount_point'

6.)The bootscreen image is a file called 'logo.16'
	grab the perl-scripts http://cvs.berlios.de/cgi-bin/viewcvs.cgi/jollix/jollix/skripte/lss16toppm
	and
	http://cvs.berlios.de/cgi-bin/viewcvs.cgi/jollix/jollix/skripte/ppmtolss16

	lss16toppm <logo.16 >logo16.ppm
		will convert this file to ppm

		Use gimp to alter the file.
		Once you are done you need to reduce the colors to 15!
		Use the gimp (picture->mode-index <Alt-I>)
		save as ppm. You might need to flatten the image bevor saving as ppm
		Please note: if you write your ppm's with the Gimp, they will contain a
		comment line starting with a #, and ppmtolss16 will not parse that.
		So save your image, edit (remove) it with vi, then use ppmtolss16.

	ppmtolss16 <logo16.ppm >logo.16
		will convert the ppm to logo.16

7.) The boot message is hidden in the file boot.msg

8.) To make postgres work off the CD you need to pull a little trick here:
	copy /var/lib/postgresql to /etc/skel/postgresql

	add postgresql to /etc/X11/Xsession.d/45xsession
	see 4.) for details

	symlink /var/lib/postgresql into /ramdisk/home/knoppix/postgresql
	note: the symlink will only work after you have booted from the newly created CD

	copy my little scripts 'postinstall.sh' and 'startpostgres.sh' to '/etc/skel'
		don't forget to add those two filename to ,guess what, /etc/X11/Xsession.d/45xsession
	while you are there make knoppix run 'postinstall.sh' by adding line to
		/etc/X11/Xsession.d/45xsession
