<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://mail.knoppix.net/wiki3/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://mail.knoppix.net/wiki3/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=202.88.238.45</id>
		<title>Knoppix Documentation Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://mail.knoppix.net/wiki3/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=202.88.238.45"/>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Special:Contributions/202.88.238.45"/>
		<updated>2026-09-30T12:46:50Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto_French</id>
		<title>Knoppix Remastering Howto French</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto_French"/>
				<updated>2008-05-21T03:45:35Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* Démarrer les images Knoppix avec GRUB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Traductions: ==&lt;br /&gt;
* Version Anglaise: [[Knoppix Remastering Howto]]&lt;br /&gt;
* Version Allemande: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Version Espagnole: [[Knoppix Remastering Howto Spanish]]  en espagnol&lt;br /&gt;
----&lt;br /&gt;
== Voir aussi : ==&lt;br /&gt;
* Si vous voulez ajouter un noyau personnalisé, regardez le [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* Il y a aussi un guide aux éditions O'reilly sur le même sujet (mais daté de 2003!!): [[http://linux.oreillynet.com/lpt/a/4323 Utiliser et personnaliser Knoppix]]&lt;br /&gt;
----&lt;br /&gt;
=== Ceci est un guide qui va vous montrer comment remasteriser KNOPPIX ===&lt;br /&gt;
(Notes : Les commandes doivent apparaitre sur une ligne, maximisez la fenêtre s'il vous plait. Si vous avez des commentaires/suggestions, merci de les poster ci-dessous.)&lt;br /&gt;
&lt;br /&gt;
Vous voulez peut être commencer à partir d'une Knoppix déjà personnalisée, si tel est le cas vous n'avez probablement pas autant de travail à faire (comme enlever des programmes). Si vous êtes dans ce cas, voir [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Système Requis: ====&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** Au moins 1 GB de mémoire RAM+Swap libre totale (ex 256M ram, et 750M swap DISPONIBLE) (à moins que vous utilisiez un programme de compression différent - voir cette page pour [[http://projects.openoffice.nl/downloads/compressloop/ compressloop]])&lt;br /&gt;
** 3 GB de libre sur une partition '''Linux filesystem (ext2/3, xfs, etc.)''' formattée&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB de RAM + swap libre (pour le DVD en entier)&lt;br /&gt;
** 15 GB de libre sur une partition '''Linux filesystem (ext2/3, xfs, etc.)''' formattée&lt;br /&gt;
&lt;br /&gt;
==== Instructions: ====&lt;br /&gt;
&lt;br /&gt;
# Booter à partir du ''Knoppix CD''&lt;br /&gt;
# Ouvrir un shell root :&lt;br /&gt;
** Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Shell Root&lt;br /&gt;
** Note: Toutes les commandes ci-dessous s'éxecutent à partir de ce shell root.&lt;br /&gt;
# Configurer votre connexion internet (nous en aurons besoin plus tard). Si vous utilisez DHCP, cela devrait déjà être configuré.&lt;br /&gt;
** Note: Executez '''ifconfig''' pour vérifier.&lt;br /&gt;
# Trouver la partition que vous utiliserez pour travailler. Dans cet exemple, elle est appellée '''hda1''' . La partition devrait avoir au minimum 3 GB d'espace libre.&lt;br /&gt;
# Monter la partition:&lt;br /&gt;
** '''mount -rw /dev/hda1 /mnt/hda1'''&lt;br /&gt;
** Note: Soyez sûr d'avoir les droits en lecture/écriture ou vous aurez des erreurs lors du chroot plus tard. Pour vérifier: éxecuter '''mount'''&lt;br /&gt;
# Créer un repertoire racine pour travailler dedans:&lt;br /&gt;
** '''mkdir /mnt/hda1/knx'''&lt;br /&gt;
** Si vous mettez tous vos fichiers ici, ils seront plus facile à nettoyer&lt;br /&gt;
# Si vous n'avez pas 1 GB de RAM ('''cat /proc/meminfo''' (physical+swap)) alors vous devrez avoir un fichier de swap:&lt;br /&gt;
** '''cd /mnt/hda1/knx ; dd if=/dev/zero of=swapfile bs=1M count=750 ; mkswap swapfile ; swapon swapfile'''&lt;br /&gt;
# Créer 2 repertoires, un pour votre nouveau Master CD, un pour les sources, sur une partition. Créer également des répertoires additionnels sous celui-ci nommé KNOPPIX:&lt;br /&gt;
** '''mkdir -p /mnt/hda1/knx/master/KNOPPIX'''&lt;br /&gt;
** '''mkdir -p /mnt/hda1/knx/source/KNOPPIX'''&lt;br /&gt;
# Maintenant, copiez les fichiers KNOPPIX vers votre répertoire source :&lt;br /&gt;
'''cp -Rp /KNOPPIX/*''' '''/mnt/hda1/knx/source/KNOPPIX '''&lt;br /&gt;
** Note: Cela peut prendre un petit momment&lt;br /&gt;
# Copier la page HTML principale pour la page de démarrage :&lt;br /&gt;
** '''cp /cdrom/index.html /mnt/hda1/knx/master/ '''&lt;br /&gt;
# Copier tout les fichiers nécessaires execpté le fichier KNOPPIX de ~700 Mb .&lt;br /&gt;
** &amp;lt; 3.4: '''cd /cdrom/KNOPPIX;find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;'''&lt;br /&gt;
** 3.4: '''cd /cdrom;find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;'''&lt;br /&gt;
# Maintenant, vous pouvez &amp;quot;chrooter&amp;quot; dans l'arborescence copiée du fichier KNOPPIX:&lt;br /&gt;
** '''chroot /mnt/hda1/knx/source/KNOPPIX'''&lt;br /&gt;
&lt;br /&gt;
Si vous avez un ensemble d'erreurs '''/dev/null permission denied''', vous devriez faire ce qui suit. Ceci peut arriver si vous sauvez vos données configurées pour la Knoppix sur la même partition que celle que vous utilisez, ET si vous démarrrez Knoppix avec '''knoppix home=scan'''.&lt;br /&gt;
&lt;br /&gt;
Vérifiez l'état de vos montages si vous rencontrez le probleme: '''mount /dev/hdaX on /mnt/hdaX type ext3 (rw,nosuid,nodev)''' (remplacer X par le numéro de votre partition)  où &amp;quot;nodev&amp;quot; signifie que vous n'avez pas accès au système de fichier monté et que vous ne pouvez ainsi pas acceder à /dev/null. Alors que cetains scripts ont besoin de rediriger leur sortie vers /dev/null ... Pour résoudre ceci, vous devez monter la partiton cible avant de &amp;quot;chrooter&amp;quot;, comme ca :&lt;br /&gt;
 ^d  # control+d sortira de l'environnement chroot&lt;br /&gt;
 mount /dev/hda1 /mnt/hda1&lt;br /&gt;
Vous devriez ensuite voir:&lt;br /&gt;
 mount /dev/hda1 on /mnt/hda1 type ext3 (rw)&lt;br /&gt;
&lt;br /&gt;
Si les erreurs &amp;quot;/dev/null&amp;quot; persistent, faites alors avant le chroot :&lt;br /&gt;
 mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
Vous devez démonter /mnt/hda1/knx/source/KNOPPIX/dev avant de construire l'image du CD ou bien votre répertoire /dev sur le CD sera en bordel !&lt;br /&gt;
&lt;br /&gt;
Ensuite vous pouvez continuer et chrooter.&lt;br /&gt;
&lt;br /&gt;
* Vous êtes maintenant &amp;quot;chrooter&amp;quot;. &amp;quot;/&amp;quot; est en fait &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
* Pour utiliser votre connexion internet you devez monter proc '''mount -t proc /proc proc'''&lt;br /&gt;
* Maintenant éditer /etc/resolv.conf et ajouter votre serveur de nom ou &amp;quot;sortir&amp;quot; du chroot et copier le fichier resolve.conf dans le dossier chrooté: '''cp /etc/dhcpc/resolv.conf vers /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf'''&lt;br /&gt;
* Changer aussi smb.conf vers votre groupe MS  si vous voulez le support smbd (MSHOME pour XP Familliale édition, et WORKGROUP  pour les Windows 9x).&lt;br /&gt;
* Vérifiez votre connection internet chrootée : '''ping google.com'''&lt;br /&gt;
* Mettez à jour votre list de paquet avec '''apt-get update'''&lt;br /&gt;
* Maintenant vous pouvez changer des trucs.&lt;br /&gt;
* '''Attention''': apt-get upgrade est une MAUVAISE IDEE. Cela va, très probablement, rendre votre KNOPPIX remasterisée inbootable, ou cassée en quelque sorte. Une méthode bien plus sûre est de seulement mettre à jour les paquets nécessaires&lt;br /&gt;
** Avant de pouvoir ajouter des choses, vous aurez probablement besoin d'enlever quelques packages.  Pour avoir une liste des packages installé, tapez ce qui suit:&lt;br /&gt;
'''*''' '''dpkg-query -l'''&lt;br /&gt;
** Si vous voulez une liste triée par taille (de cette façon vous vous pourrez vous débarassez des plus encombrants), tapez :&lt;br /&gt;
'''*''' '''dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n'''&lt;br /&gt;
** Pour enlever un paquet (et toutes ses dépendances), tapez:&lt;br /&gt;
'''*''' '''apt-get remove &amp;lt;name-of-package-to-remove&amp;gt;'''&lt;br /&gt;
** Pour vérifier les paquets orphelins, tapez:&lt;br /&gt;
'''*''' '''deborphan'''&lt;br /&gt;
** Pour vouloir économiser plus de place en se débarrassant de ces irritants orphelins (comme c'est cruel!), tapez ('''Attention''', vous n'aurez pas à confirmer pour enlever ces paquets. Quand vous pressez Entrée après cette commande, ces paquets '''seront partis'''):&lt;br /&gt;
'''*''' '''deborphan | xargs apt-get -y remove'''&lt;br /&gt;
** Si vous êtes incertain quand à la commande précèdente et voulez voir ce qu'il va se passer sans faire de changement, ajoutez simplement l'option '''-s''' à la commande apt-get comme cela (vous pouvez faire ça avec toutes les commandes apt-get, et c'est une bonne habitude d'utiliser cette option avant des opérations &amp;quot;massive&amp;quot; comme celle la):&lt;br /&gt;
'''*''' '''deborphan | xargs apt-get -s -y remove'''&lt;br /&gt;
** Maintenant les bonnes choses. Si vous voulez ajouter un package, tapez:&lt;br /&gt;
'''*''' '''apt-get install &amp;lt;name-of-package-to-install&amp;gt;'''&lt;br /&gt;
** Quoi, vous ne savez pas quel paquet installer ?  Tapez cela. Quand la liste apparait, vous pouvez lire attentivement (13000 lignes !) ou chercher des termes en utilisant '''/&amp;lt;terme-a-recherher&amp;gt;''':&lt;br /&gt;
'''*''' '''apt-cache search .* | sort | less'''&lt;br /&gt;
** Quand vous avez fini d'enlever et d'ajouter des paquets, un bon moyen de nettoyer est de taper:&lt;br /&gt;
'''*''' '''COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P'''&lt;br /&gt;
** De même,parce que le système des paquets Debian garde en cache ce qui a été téléchargé, vous pouvez éxecuter la commande suivante pour faire le ménage :&lt;br /&gt;
'''*''' '''apt-get clean'''&lt;br /&gt;
** les paramètres utilisateurs sont dans /etc/skel&lt;br /&gt;
** astuce: ne mettez pas de fichiers dans /root ils seront seulement disponible (durant l'éxecution) dans /KNOPPIX/root&lt;br /&gt;
* Unmount /proc - très important! '''umount /proc'''&lt;br /&gt;
* Presser '''CTRL+D''' pour quitter l'environnement chrooté.&lt;br /&gt;
&lt;br /&gt;
==== Notes : ====&lt;br /&gt;
&lt;br /&gt;
Quand vous testez des programmes basés sur X, vous aurez a faire '''export DISPLAY=localhost:0.0'''&lt;br /&gt;
&lt;br /&gt;
Quand vous voulez auto-éxecuter quelques programmes, créez un script et placez le dans le repertoire  /etc/rc5.d/ (Ceci charge seulement les items avant que X ne se charge)&lt;br /&gt;
&lt;br /&gt;
trucs interessants dans /etc/init.d/knoppix-autoconfig :&lt;br /&gt;
    * Le fichier fond d'écran est /cdrom/KNOPPIX/background.gif '''(dans knoppix 3.4: background.jpg)'''&lt;br /&gt;
    * Comme pour floppyconfig, il existe cdromconfig qui lancera cdrom/KNOPPIX/knoppix.sh&lt;br /&gt;
&lt;br /&gt;
trucs intéressants dans /etc/init.d/xsession :&lt;br /&gt;
* Ca place également le fond d'écran dans /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
Maintenant, la création de l'image ISO :&lt;br /&gt;
&lt;br /&gt;
* nous avons fini de personnaliser et sommes prêt à graver !&lt;br /&gt;
* d'abord faire quelques nettoyages : ''' enlever le fichier .bash_history , les fichiers tmp etc '''&lt;br /&gt;
* '''rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved'''&lt;br /&gt;
* Maintenant, nous allons faire un gros fichier KNOPPIX qui est un système de fichier ISO 9660 cloop (compress loopback) compressé (cloop compressed ISO 9660 filesystem) : '''mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX'''&lt;br /&gt;
&lt;br /&gt;
le &amp;quot;www.knoppix.net&amp;quot; et le &amp;quot;Knoppix.net filesystem&amp;quot; peuvent être changé par le nom que vous voulez donner au fichier. Vous aurez une erreur si vous ne respectez les standards de la norme ISO9660, sans trop grande importance.&lt;br /&gt;
&lt;br /&gt;
Dans Knoppix 3.4 le script create_compressed_fs a été mis à jour, utilisez le pour obtenir les meilleurs résultats.&lt;br /&gt;
Il possède une nouvelle option '''-b''' (best), qui permet une meilleure compression en utilisant différents arrangement de compression et essaye d'optimiser ce processus, mais soyez vigilant, parce que cette option est lente (10x plus lente).&lt;br /&gt;
&lt;br /&gt;
* Si tout va bien, faisons l'image du CD final :&lt;br /&gt;
* '''cd /mnt/hda1/knx/master'''&lt;br /&gt;
* '''rm -f KNOPPIX/md5sums; find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin -exec md5sum '{}' \; &amp;gt;&amp;gt; KNOPPIX/md5sums''' (ceci va mettre à jour les hashages md5 des fichiers inclus dans l'ISO, utilisé pour les vérifications d'intégrité)&lt;br /&gt;
* Pour Knoppix &amp;lt;= 3.3: '''mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master''' (the ISO is stored in /mnt/hda1/knx/knoppix.iso)&lt;br /&gt;
* Pour Knoppix &amp;gt;= 3.4 ou autre distribution basée sur isolinux, faites:&lt;br /&gt;
'''mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master''' (l'ISO est stockée dans /mnt/hda1/knx/knoppix.iso)&lt;br /&gt;
* Voila !&lt;br /&gt;
&lt;br /&gt;
=== Astuces ===&lt;br /&gt;
Si vous êtes à la recherche des gros paquets installés, alors la commande&lt;br /&gt;
: dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
: awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
: perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
listera les paquets par taille en ordre décroissant.&lt;br /&gt;
Cette commande est 10 fois plus rapide&lt;br /&gt;
&lt;br /&gt;
: dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
&lt;br /&gt;
et vous n'avez pas besoin de dpkg-awk ou awk ou perl.&lt;br /&gt;
&lt;br /&gt;
Si vous avez des problèmes avec la commande de tri précèdente, essayez d'utiliser KPackage, elle parcoure les arborescences et trie par taille à la recherche de gros paquets.&lt;br /&gt;
&lt;br /&gt;
Regardez du côté du programme &amp;quot;deborphan&amp;quot;, il liste les paquets orphelins que vous pouvez enlever, ces paquets étaient utilisés par des paquets qui sont maintenant enlevés.&lt;br /&gt;
&lt;br /&gt;
J'ai eu des bons résultats de remastering à partir du cd en tant que root, travaillant à partir de fluxbox. Choisir &amp;quot;knoppix 2&amp;quot; lors du boot et le système va démarrer sur une invite de commande root où vous pourrez dire &amp;quot;startx /usr/bin/fluxbox&amp;quot;. J'aime utiliser le shell unicode xterm.&lt;br /&gt;
&lt;br /&gt;
Lors du travail en chroot pour le remastering, j'aime bien utiliser &amp;quot;apt-get remove --purge nom-du-paquet&amp;quot; pour enlever les paquets parce que avant de faire quoi que ce soit cela va stopper et montrer les détails sur ce que apt va supprimer; il faut confirmer par &amp;quot;oui&amp;quot; ou &amp;quot;non&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Si vous n'utilisez pas l'instruction &amp;quot;apt-get&amp;quot; ci dessus et si vous avez beaucoup de ménage à faire, la façon la plus simple de faire est :&lt;br /&gt;
 &amp;quot;COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt;topurge&amp;quot;. Ceci fera une liste de tout les paquets enlevés à purger et ensuite vous n'avez plus qu'a faire  &amp;quot;dpkg -P `cat topurge `&amp;quot; et voila.&lt;br /&gt;
 &amp;quot;COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&amp;quot; est la même chose en une ligne.&lt;br /&gt;
Aussi &amp;quot;deborphan &amp;gt;orphaned&amp;quot; puis &amp;quot;dpkg -P `cat orphaned `&amp;quot;. &amp;quot;deborphan | xargs dpkg -P &amp;quot; est une version en une seule ligne de cela.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ca y est. Ceci est une version mise à jour de mon précèdent howto. Il n'est pas destiné aux débutant sous linux, vous devriez avoir une bonne connaissance de linux pour tout faire fonctionner. Je le metterais à jour via des corrections et des améliorations bientôt.&lt;br /&gt;
&lt;br /&gt;
Merci a aay, charan, Tech2k, and #knoppix pour les quelques corrections, astuces et idées. Libre à vous d'éditer ou de compléter ce how-to&lt;br /&gt;
Note à propose de la swap:&amp;lt;br&amp;gt;&lt;br /&gt;
Vous n'avez pas réellement besoin d'1G de swap puisque il y a deux nouveaux outils de compressions de système de fichiers. Voila deux candidats pour faire des système de fichiers ''compressés'':&lt;br /&gt;
* Réecriture de Valentijn [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Port de compressloop par Quozl's pour la Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Compressloop répartis par Quozl's (utiliser plus d'un processeur pour accelerer les choses) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Patch de Justin [http://s.bouncybouncy.net/~justin/code/] (lien cassé) J'ai également écrit un compresseur réparti cloop (ou pour smp)  C'est dans le même repertoire.&lt;br /&gt;
&lt;br /&gt;
==== Astuce, tester le cd-image sans graver le cd ====&lt;br /&gt;
&lt;br /&gt;
Si vous avez une partition avec au moins 700MB  d'espace libre formattée en ext2, ext3 ou Vfat, vous pouvez l'utiliser pour tester en démarrant à partir d'une disquette. Une disquette de démarrage recherchera une partition avec /KNOPPIX dans la racine, et l'image compressée /KNOPPIX/KNOPPIX. Au lieu d'utiliser le sous répertoire /mnt/hda1/knx/master/KNOPPIX/ comme décrit précèdemment, il devrait être appellé /mnt/hda2/KNOPPIX/ . La racine index.html sera située dans /mnt/hda2/index.html et l'image compressée sera dans /mnt/hda2/KNOPPIX/KNOPPIX . Maintenant vous pouvez booter à partir de la disquette et utiliser /mnt/hda2 comme image. Pour plus d'informations voir [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
Si vous n'avez pas de partitions supplémentaires ou si vous ne voulez pas en faire autant, vous pouvez utiliser Qemu (voir&lt;br /&gt;
[http://fabrice.bellard.free.fr/qemu/] ) avec l'image ISO comme ça:&lt;br /&gt;
'''qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -user-net'''&lt;br /&gt;
Vous n'avez même pas à créer une image sur le disque dur avant, seulement installer Qemu et l'essayer. Stupéfiant!&lt;br /&gt;
&lt;br /&gt;
==== Démarrer les images Knoppix avec GRUB ====&lt;br /&gt;
* D'abord copier /boot du cd Knoppix cd vers votre partition de boot (ou même votre partition dos). J'ai nommé la mienne boot.knoppix&lt;br /&gt;
''' Copier le répertoire /KNOPPIX vers votre '''répertoire racine* d'un des diques dur. Vous pouvez le placer ailleurs que dans une partition de boot. (ext2/3, reiserfs, vfat sont supportés)&lt;br /&gt;
* Mettre les éléments suivants dans votre /boot/grub/menu.lst:&lt;br /&gt;
 title           KNOPPIX&lt;br /&gt;
 root            (hd0,0)&lt;br /&gt;
 kernel  /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
 initrd  /boot.knoppix/miniroot.gz&lt;br /&gt;
* Remarquer le paramètre &amp;quot;fromhd&amp;quot;:  c'est l'emplacement du repertoire /KNOPPIX&lt;br /&gt;
* redémarrez et appreciez.&lt;br /&gt;
&lt;br /&gt;
Si mon how-to est trop confus, ou si vous voulez une secondes opinion, regardez le très joli remastering howto de charan :&lt;br /&gt;
http://brainstorms.in/?page_id=84.&lt;br /&gt;
Un autre howto est disponible à l'adresse http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
Il y a un assistant qui connais toutes les démarches d'installation, compression et gravure de CD mentionnées ici. Il propose également un shell ou vous pouvez mettre à jour la KNOPPIX décompressée en utilisant les outils standards Debian d'installation de logiciel. Il s'appelle mmkcdrom et fait partie du packaqe plugscript: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Encore un autre Howto, pour les adeptes du shell sur http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Soyez sûr de jeter un oeil à [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] pour des idées et de l'aide concernant le remastering.&lt;br /&gt;
----&lt;br /&gt;
Une l'arborescence recommandée pour remasteriser une KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
 `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
 |-- bin&lt;br /&gt;
 |-- boot&lt;br /&gt;
 |-- cdrom&lt;br /&gt;
 |-- dev&lt;br /&gt;
 |-- etc&lt;br /&gt;
 |-- floppy&lt;br /&gt;
 |-- home&lt;br /&gt;
 |-- initrd&lt;br /&gt;
 |-- lib&lt;br /&gt;
 |-- mnt&lt;br /&gt;
 |-- none&lt;br /&gt;
 |-- opt&lt;br /&gt;
 |-- proc&lt;br /&gt;
 |-- root&lt;br /&gt;
 |-- sbin&lt;br /&gt;
 |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
 |-- usr&lt;br /&gt;
 |-- var&lt;br /&gt;
 `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
Le script suivant &amp;quot;remaster&amp;quot; fera le processus de remasterisation à votre place. Lancez le en tant que root, ou il se terminera avec des erreurs d'accès sur l'image.&lt;br /&gt;
&lt;br /&gt;
Le script a été essayé sur une Debian sid le 02-04-2002&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create''compressed''fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
The following script will loop-mount boot floppy image and initrd image for modification. The umount function will build a new initrd image and put it back on the boot floppy image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto_Brazilian_Portuguese</id>
		<title>Knoppix Remastering Howto Brazilian Portuguese</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto_Brazilian_Portuguese"/>
				<updated>2008-05-21T03:44:03Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* Veja Também */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Este guia mostrará a você como remasterizar o '''KNOPPIX''' a partir do CD original em inglês. Isto significa que muitas configurações precisarão ser feitas para deixar o sistema do jeito que você quer.&lt;br /&gt;
&lt;br /&gt;
Se quiser evitar muito trabalho na remasterização (tal como adicionar ou remover programas), você pode começar a partir de uma versão personalizada do Knoppix. Se quer isso, consulte o tópico [[Knoppix Customizations]], que trata de diversas distribuições adaptadas baseadas no Knoppix (geralmente, em inglês) e voltadas para uma área específica.&lt;br /&gt;
&lt;br /&gt;
Observações:&lt;br /&gt;
* Este guia é uma tradução livre do texto original. Alguns comentários/observações foram acrescentados por alguns usuários, manifestando experiências pessoais. Alguns pontos mal-entendidos foram marcados como &amp;quot;obscuros&amp;quot;.&lt;br /&gt;
* Os comandos de terminal mostrados neste texto devem ser digitados em uma única linha, isto é, não pode haver quebras de linha. Onde houver a barra invertida (&amp;quot;\&amp;quot;), significa que o comando continua na linha seguinte, mas a barra invertida em si não deveria ser digitada.&lt;br /&gt;
* Se você tem algum comentário/sugestão, por favor, utilize a guia ''Discussion'' na parte superior da página.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Requisitos do Sistema===&lt;br /&gt;
* CD-ISO&lt;br /&gt;
** pelo menos 1 GB de espaço total de RAM+swap (e.g. 256 MB RAM + 750 MB swap DISPON�?VEIS) (a não se que você utilize um programa de compressão diferente - procure nesta página por &amp;quot;compressloop&amp;quot;)&lt;br /&gt;
** 3 GB livres numa partição de disco formatada com '''sistema de arquivos Linux''' (ext2, ext3, reiserfs, xfs, etc.)&lt;br /&gt;
* DVD-ISO&lt;br /&gt;
** 5 GB livres de espaço de RAM+swap (para um DVD completo)&lt;br /&gt;
** 15 GB livres numa partição de disco formatada com '''sistema de arquivos Linux''' (ext2, ext3, reiserfs, xfs, etc.)&lt;br /&gt;
&lt;br /&gt;
===Preparando a Remasterização===&lt;br /&gt;
# Inicialize o computador a partir do ''CD do Knoppix''&lt;br /&gt;
# Abra um &amp;quot;shell&amp;quot; como &amp;quot;root&amp;quot;: '''KMenu =&amp;gt; Knoppix =&amp;gt; Root Shell'''&lt;br /&gt;
#* Nota: Todos os comandos seguintes são executados dentro deste &amp;quot;shell&amp;quot; como &amp;quot;root&amp;quot;.&lt;br /&gt;
# Configure sua conexão com a Internet (você precisará disto mais tarde).&lt;br /&gt;
#* Nota 1: Se você usa DHCP, pode ser que a conexão já esteja configurada.&lt;br /&gt;
#* Nota 2: Execute &amp;lt;tt&amp;gt;ifconfig&amp;lt;/tt&amp;gt; para checar as configurações.&lt;br /&gt;
# Defina a partição que você utilizará no trabalho. Neste guia, ela será chamada de '''hda1'''. A partição deverá ter um mínimo de 3 GB de espaço livre.&lt;br /&gt;
# Monte a partição:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Nota: O parâmetro &amp;lt;tt&amp;gt;-rw&amp;lt;/tt&amp;gt; serve para habilitar a partição para leitura e escrita. Isso é importante, pois do contrário o comando &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; dará erros. Utilize o comando &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; sem nenhum parâmetro para verificar essa habilitação.&lt;br /&gt;
# Crie um diretório-raiz para trabalhar nele:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*Nota: Se você puser todos os seus arquivos aqui será mais fácil fazer limpeza depois.&lt;br /&gt;
# Se você não tem RAM de 1 GB (verifique com &amp;lt;tt&amp;gt;egrep (MemTotal|SwapTotal) /proc/meminfo&amp;lt;/tt&amp;gt;(=RAM+swap) ou &amp;lt;tt&amp;gt;cat /proc/meminfo (=RAM+swap)&amp;lt;/tt&amp;gt;), então você precisará de um arquivo de trocas (&amp;quot;swap&amp;quot;):&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cd /mnt/hda1/knx&lt;br /&gt;
dd if=/dev/zero of=swapfile bs=1M count=750&lt;br /&gt;
mkswap swapfile&lt;br /&gt;
swapon swapfile&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Crie outros dois diretórios, um para seu novo CD mestre e outro para a fonte, na partição de trabalho. Crie também subdiretórios chamados &amp;quot;KNOPPIX&amp;quot; dentro de cada um:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&lt;br /&gt;
mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Agora, copie os arquivos de &amp;quot;/KNOPPIX&amp;quot; para o diretório-fonte:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Nota: Isto vai demorar muito, pois estamos copiando 2 GB.&lt;br /&gt;
#* Aviso: Para fazer a cópia mais rápido, poderíamos utilizar o comando &amp;lt;tt&amp;gt;unionfs&amp;lt;/tt&amp;gt;. Porém, a partir do Knoppix 4.0.2 há um erro no &amp;lt;tt&amp;gt;unionfs&amp;lt;/tt&amp;gt;, o que impede a sua utilização. É melhor utilizar o comando &amp;lt;tt&amp;gt;cp&amp;lt;/tt&amp;gt; mesmo.&lt;br /&gt;
# Adicionalmente, copie o diretório &amp;quot;boot&amp;quot; do CD:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Nota: Você precisará destes arquivos para construir o arquivo ISO mais tarde.&lt;br /&gt;
# Para o Knoppix 5.0.1. você também deve copiar o diretório &amp;quot;modules&amp;quot;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copie a página HTML principal para funcionar como página inicial:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copie todos os arquivos necessários, exceto o arquivo KNOPPIX (que tem cerca de 700 MB):&lt;br /&gt;
#* Para Knoppix &amp;lt; 3.4:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Para Knoppix &amp;gt;= 3.4:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Nota: Para a versão em DVD, você terá de usar &amp;lt;tt&amp;gt;-size -15000k&amp;lt;/tt&amp;gt; e copiar o diretório KNOPPIX2 assim: &amp;lt;tt&amp;gt;cp /cdrom/KNOPPIX/KNOPPIX2 /mnt/hda1/knx/master/KNOPPIX/&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Prepando o ambiente para o comando &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/nowiki&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Agora, você pode entrar como &amp;quot;chroot&amp;quot; dentro do diretório KNOPPIX copiado na partição (isto é, tornar o diretório &amp;quot;knx/source/KNOPPIX&amp;quot; a partição &amp;quot;root&amp;quot; do novo sistema):&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Se você obtiver erros relativos a &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt; aos montes, consulte a sessão [[#Problemas Comuns|Problemas Comuns]].&lt;br /&gt;
&lt;br /&gt;
Neste ponto, você estará como &amp;quot;chroot&amp;quot;. Portanto, o &amp;quot;/&amp;quot; é realmente &amp;lt;tt&amp;gt;&amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Configurando como &amp;quot;chroot&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Lembre-se de que qualquer coisa que você faça ou crie no ambiente como &amp;quot;chroot&amp;quot; será &amp;quot;queimado&amp;quot; no CD. Se você faz alguma alteração (por exemplo, configurações no APT, no proxy, etc.), tome nota destas coisas para conseguir desfazer as mudanças antes da remasterização.&lt;br /&gt;
&lt;br /&gt;
====Configurando o acesso à Internet====&lt;br /&gt;
Para usar a Internet você precisa editar o arquivo &amp;lt;tt&amp;gt;&amp;quot;/etc/resolv.conf&amp;quot;&amp;lt;/tt&amp;gt; para adicionar o nome do servidor (ou saia do modo &amp;quot;chroot&amp;quot; e copie o arquivo &amp;lt;tt&amp;gt;&amp;quot;resolv.conf&amp;quot;&amp;lt;/tt&amp;gt; exterior para o diretório de trabalho:&lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
A configuração de proxy pode ser exportada com&lt;br /&gt;
 export http_proxy=&amp;lt;nowiki&amp;gt;http://your.proxy.com&amp;lt;/nowiki&amp;gt;:&amp;lt;''porta-proxy''&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para confirmar a conexão com a Internet dentro do ambiente &amp;quot;chroot&amp;quot;, teste algo como&lt;br /&gt;
 ping google.com&lt;br /&gt;
&lt;br /&gt;
Se o ICMP for barrado em algum firewall ou semelhante, tente&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;lynx http://www.google.com&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
e verifique se obtém a página após permitir &amp;quot;cookies&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Configurando o SAMBA====&lt;br /&gt;
Se deseja suporte ao serviço &amp;quot;smbd&amp;quot;, altere o grupo de trabalho no arquivo &amp;lt;tt&amp;gt;&amp;quot;smb.conf&amp;quot;&amp;lt;/tt&amp;gt; para o grupo de trabalho da rede local Windows. No caso do Windows XP, o padrão é &amp;quot;MSHOME&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Adicionando e removendo pacotes====&lt;br /&gt;
=====Atualizando a lista de pacotes=====&lt;br /&gt;
Atualize a lista de pacotes do APT com &amp;quot;&amp;lt;tt&amp;gt;'''apt-get update'''&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* Nota: Se o comando &amp;quot;&amp;lt;tt&amp;gt;apt-get update&amp;lt;/tt&amp;gt;&amp;quot; resultar no erro &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, você precisará se certificar de que seu ambiente &amp;quot;chroot&amp;quot; está montado &amp;lt;u&amp;gt;sem&amp;lt;/u&amp;gt; a opção &amp;quot;&amp;lt;tt&amp;gt;nodev&amp;lt;/tt&amp;gt;&amp;quot;. Consulte o item sobre erros no &amp;quot;&amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;&amp;quot; quando entra com ambiente &amp;quot;chroot&amp;quot; pela primeira vez.&lt;br /&gt;
* Aviso: O comando &amp;quot;&amp;lt;tt&amp;gt;apt-get upgrade&amp;lt;/tt&amp;gt;&amp;quot; é uma ''M�? IDÉIA''. Muito provavelmente, isso tornará o disco remasterizado do KNOPPIX não-inicializável ou defeituoso de alguma forma. O método mais seguro é fazer atualização somente dos pacotes necessários.&lt;br /&gt;
* Nota: Se o &amp;quot;&amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;&amp;quot; resultar no erro &amp;quot;Dynamic NMap ran out of room&amp;quot;, você pode tentar o seguinte truque, que já resolveu o problema em alguma situação:&lt;br /&gt;
*:&amp;lt;pre&amp;gt;echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
*:Nota: Isso foi feito como &amp;quot;chroot&amp;quot; conforme descrito acima.&lt;br /&gt;
&lt;br /&gt;
=====Listando pacotes=====&lt;br /&gt;
Antes de poder adicionar programas, você provavelmente precisará remover alguns pacotes. Para obter uma lista de pacotes instalados, tecle isto:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
Se você está procurando por pacotes instalados pelo tamanho, para identificar os que ocupam mais espaço, então utilize o comando a seguir, que vai listar os pacotes em ordem decrescente de tamanho:&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
&lt;br /&gt;
O comando a seguir é, pelo menos, dez vezes mais rápido:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
e você não precisa de &amp;quot;&amp;lt;tt&amp;gt;dpkg-awk&amp;lt;/tt&amp;gt;&amp;quot; ou &amp;quot;&amp;lt;tt&amp;gt;awk&amp;lt;/tt&amp;gt;&amp;quot; ou &amp;quot;&amp;lt;tt&amp;gt;perl&amp;lt;/tt&amp;gt;&amp;quot;; entretanto, ele não exclui pacotes que não estejam instalados. Se você tiver problemas com o comando &amp;quot;&amp;lt;tt&amp;gt;sort&amp;lt;/tt&amp;gt;&amp;quot; acima, tente usar &amp;quot;&amp;lt;tt&amp;gt;KPackage&amp;lt;/tt&amp;gt;&amp;quot;, expandido em todas as árvores e ordenado pela coluna de tamanho para encontrar os maiores pacotes.&lt;br /&gt;
&lt;br /&gt;
Ou, você poderia usar este comando para obter velocidade no comando &amp;quot;&amp;lt;tt&amp;gt;dpkg-query&amp;lt;/tt&amp;gt;&amp;quot; com os pacotes não-instalados que não forem listados:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
Ele faz a mesma coisa anterior, para os que não têm o &amp;quot;&amp;lt;tt&amp;gt;dpkg-awk&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=====Removendo pacotes indesejados=====&lt;br /&gt;
Para remover um pacote (e todos os pacotes dependentes dele), tecle isto:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
Para verificar se há pacotes órfãos, tecle isto:&lt;br /&gt;
 deborphan&lt;br /&gt;
Se quer salvar mais espaço retirando os pacotes órfãos irritantes {?}(que crueldade!){?}, tecle isto (&amp;lt;u&amp;gt;Cuidado&amp;lt;/u&amp;gt;: O &amp;quot;yes/no&amp;quot; &amp;lt;u&amp;gt;não&amp;lt;/u&amp;gt; não aparecerá para confirmar a remoção destes pacotes. Quando você pressionar &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot;&amp;gt;Enter&amp;lt;/span&amp;gt; depois deste comando, os pacotes terão desaparecido!):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
Se você não está seguro sobre o comando anterior e quer ver o que acontecerá sem fazer nenhuma mudança, simplesmente adicione a opção &amp;quot;&amp;lt;tt&amp;gt;-s&amp;lt;/tt&amp;gt;&amp;quot; ao comando &amp;quot;&amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;&amp;quot; como isto (você pode fazer isto com todos os comandos &amp;quot;&amp;lt;tt&amp;gt;apt-get&amp;lt;/tt&amp;gt;&amp;quot;, e é um bom hábito usar esta opção antes de operações em massa como esta):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
&lt;br /&gt;
=====Adicionando pacotes=====&lt;br /&gt;
Agora, a parte boa. Se você deseja adicionar um pacote, tecle isto:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
Então não sabe que pacotes instalar? Tecle isto:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
Quando a lista aparecer, você pode examiná-la (mais de 13 mil linhas!) ou procurar por textos usando o comando &amp;quot;/&amp;quot;: &amp;lt;tt&amp;gt;/''texto-a-procurar''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Limpando o cachê=====&lt;br /&gt;
Quando você terminar de remover e adicionar pacotes, uma boa maneira de limpar tudo é teclando isto:&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Também, dado que o sistema de pacotes do Debian guarda em &amp;quot;cachê&amp;quot; os pacotes baixados, você pode querer fazer a seguinte limpeza daqueles arquivos inúteis:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
====Configurando as configurações de novo usuário====&lt;br /&gt;
As configurações de usuário estão em &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;. Este diretório será copiado para fazer os diretórios &amp;quot;home&amp;quot; dos novos usuários.&lt;br /&gt;
* Dica: Não coloque arquivos em &amp;quot;&amp;lt;tt&amp;gt;/root&amp;lt;/tt&amp;gt;&amp;quot; pois eles serão somente disponíveis (em tempo de execução) em &amp;quot;&amp;lt;tt&amp;gt;/KNOPPIX/root&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Observe que o usuário padrão &amp;quot;knoppix&amp;quot; não é criado com &amp;quot;&amp;lt;tt&amp;gt;adduser(1)&amp;lt;/tt&amp;gt;&amp;quot;, logo o diretório &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;&amp;quot; não é completamente copiado, mas seletivamente. Isto é, para fazer um arquivo &amp;quot;&amp;lt;tt&amp;gt;.xyrc&amp;lt;/tt&amp;gt;&amp;quot; aparecer em &amp;quot;&amp;lt;tt&amp;gt;/home/knoppix&amp;lt;/tt&amp;gt;&amp;quot; não é suficiente colocá-lo em &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;&amp;quot;. Uma possibilidade é estender o código em &amp;quot;&amp;lt;tt&amp;gt;/etc/X11/Xsession.d/45xsession&amp;lt;/tt&amp;gt;&amp;quot; o qual é responsável por preencher o diretório &amp;quot;&amp;lt;tt&amp;gt;/home/knoppix&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the default user 'knoppix' is not created by adduser(1), thus /etc/skel is not copied completely but rather selectively.  That is, to make a file .xyrc appear in /home/knoppix, it is not sufficient to place it in /etc/skel.  One possibility is to extend the code in /etc/X11/Xsession.d/45xsession which is responsible for filling /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
====Autoexecutando programas====&lt;br /&gt;
Quando você quer autoexecutar alguns programas, pode-se criar um script e pô-lo no diretório &amp;quot;&amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt;&amp;quot;, que executa itens antes de o ambiente X ser carregado. Pesquise o processo &amp;quot;init&amp;quot; para conhecer mais possibilidades.&lt;br /&gt;
&lt;br /&gt;
====Editando o script de auto-configuração do KNOPPIX====&lt;br /&gt;
Você pode encontrar muita informação interessante sobre como o KNOPPIX auto-configura seu sistema estudando o script &amp;quot;&amp;lt;tt&amp;gt;/etc/init.d/knoppix-autoconfig script&amp;lt;/tt&amp;gt;&amp;quot;. As seguintes configurações são particularmente notáveis.&lt;br /&gt;
&lt;br /&gt;
=====Trocando a figura de plano de fundo do KDE=====&lt;br /&gt;
O script de auto-configuração configura como figura do plano de fundo padrão do KDE uma figura presente no CD-ROM. Esta figura pode ser facilmente trocada quando você está remasterizando o KNOPPIX.&lt;br /&gt;
* No Knoppix 3.3 e abaixo ela está em &amp;quot;&amp;lt;tt&amp;gt;/cdrom/KNOPPIX/background.gif&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
* No Knoppix 3.5 e acima ela está em &amp;quot;&amp;lt;tt&amp;gt;/cdrom/KNOPPIX/background.jpg&amp;lt;/tt&amp;gt;&amp;quot;&lt;br /&gt;
{?}Como trocar, então?{?}&lt;br /&gt;
&lt;br /&gt;
=====Editando o uso da unidade de disquete e de CD-ROM ou adicionando um script personalizado=====&lt;br /&gt;
O script de auto-configuração configura ambas as unidade de disquete e de CD-ROM. Os comandos que fazem isso são &amp;quot;&amp;lt;tt&amp;gt;floppyconfig&amp;lt;/tt&amp;gt;&amp;quot; e &amp;quot;&amp;lt;tt&amp;gt;cdromconfig&amp;lt;/tt&amp;gt;&amp;quot;, respectivamente. O script de auto-configuração também executará &amp;quot;&amp;lt;tt&amp;gt;cdrom/KNOPPIX/knoppix.sh&amp;lt;/tt&amp;gt;&amp;quot;, o qual é um script fácil de alterar quando remasterizando.&lt;br /&gt;
&lt;br /&gt;
=====Alterando os parâmetros de inicialização padrões=====&lt;br /&gt;
Todos os parâmetros de &amp;quot;boot&amp;quot; obtêm valores padrões a partir do script &amp;quot;&amp;lt;tt&amp;gt;/etc/init.d/knoppix-autoconfig&amp;lt;/tt&amp;gt;&amp;quot;. Este é um script em &amp;quot;bash&amp;quot; muito complexo (você precisa conhecer bastante o &amp;quot;bash&amp;quot; para lidar com ele), mas é o local onde você pode editar qualquer dos parâmetros padrões. Por exemplo, você poderia procurar ocorrências de &amp;quot;kde&amp;quot; para alterar para &amp;quot;twm&amp;quot; nas variáveis que indicam o desktop padrão (DESKTOP, IIRC, etc.). Outro exemplo poderia ser a mudança do idioma padrão.&lt;br /&gt;
&lt;br /&gt;
* Nota: Se você está interessado em trocar o idioma padrão que o KDE utiliza, a maneira mais fácil é carregar o KDE (veja as instruções abaixo) e usar o utilitário de configuração do KDE para selecionar o idioma desejado.&lt;br /&gt;
&lt;br /&gt;
====Configurando a sessão do X====&lt;br /&gt;
Quando trabalha com programas baseados no ambiente X, você precisa se certificar de que o seu monitor está configurado corretamente. Você pode fazer isto manualmente quando remasteriza o KNOPPIX. Também, em dois scripts relativos à Sessão X você pode mudar ou desabilitar os sons de inicialização e desligamento.&lt;br /&gt;
&lt;br /&gt;
=====Iniciando programas baseados no ambiente X=====&lt;br /&gt;
Quando testando programas baseados no ambiente X, você terá que&lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
que permitirá a você se conectar com o a sua sessão X normal. Alternativamente (se você precisar testar gerenciadores de janelas), você pode criar uma sessão aninhada. Fora do &amp;quot;chroot&amp;quot;, execute&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
Dentro do &amp;quot;chroot&amp;quot;, configure a sua variável DISPLAY&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
Uma coisa interessante em &amp;quot;&amp;lt;tt&amp;gt;/etc/inid.d/xsession&amp;lt;/tt&amp;gt;&amp;quot;:&lt;br /&gt;
* ele TAMBÉM coloca o plano de fundo como &amp;quot;&amp;lt;tt&amp;gt;/usr/local/lib/knoppix.gif&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=====Modificando/Desabilitando o som de inicialização=====&lt;br /&gt;
O som da inicialização é tocado por &amp;quot;&amp;lt;tt&amp;gt;/etc/X11/Xsession.d/45xsession&amp;lt;/tt&amp;gt;&amp;quot;. Você pode desabilitá-lo colocando comentários (#) nas seguintes linhas:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Modificando/Desabilitando o som de finalização=====&lt;br /&gt;
O som da finalização é tocado por &amp;quot;&amp;lt;tt&amp;gt;/etc/X11/Xsession.d/45xsession&amp;lt;/tt&amp;gt;&amp;quot;. Você pode desabilitá-lo colocando comentários (#) nas linhas 210-220 do script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Trocando a imagem e a mensagem de &amp;quot;boot&amp;quot; e o texto do script de inicialização====&lt;br /&gt;
Ainda no ambiente &amp;quot;chroot&amp;quot;, você poderá facilmente trocar a imagem e as mensagens que aparecem durante a inicialização e a figura de plano de fundo padrão do KDE.&lt;br /&gt;
&lt;br /&gt;
=====Trocando a imagem de &amp;quot;boot&amp;quot;=====&lt;br /&gt;
A imagem de &amp;quot;boot&amp;quot; é a primeira imagem que você vê na tela no momento da inicialização do Knoppix com CD ou DVD. Ela é semelhante a arte de texto ASCII e é normalmente o texto &amp;quot;Knoppix&amp;quot; algo &amp;quot;brilhante&amp;quot;. Você pode trocar isto para qualquer figura que tenha resolução de 640x400 e somente 16 cores.&lt;br /&gt;
# Mude para o diretório &amp;lt;tt&amp;gt;/mnt/hda1/knx/master/boot&amp;lt;/tt&amp;gt; (altere &amp;quot;/mnt/hda1/&amp;quot; para refletir a sua configuração particular):&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Faça cópia de segurança do antigo logotipo no caso de algo dar errado:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Crie uma figura de 640x400 pixels com 16 cores e salve-a como GIF, por exemplo, &amp;quot;logo.16.gif&amp;quot;. Utilize o GIMP ou KolourPaint, por exemplo.&lt;br /&gt;
#*Nota: Você pode usar uma imagem que originalmente tenha mais de 16 cores, mas terá que forçosamente convertê-la para 16 cores antes de continuar este procedimento.&lt;br /&gt;
# Converta a figura GIF para &amp;quot;lss16&amp;quot; usando as ferramentas incluídas no CD do Knoppix:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm&lt;br /&gt;
ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Trocando a mensagem de &amp;quot;boot&amp;quot;=====&lt;br /&gt;
A mensagem de &amp;quot;boot&amp;quot; é o texto que você vê sob a imagem de &amp;quot;boot&amp;quot; na tela no momento da inicialização do Knoppix com CD ou DVD. Esse texto diz algo sobre a versão do Knoppix e um linque para o saite do Knoppix. Você pode alterar esse texto para o que quiser, mas não deve colocar muito texto ou a tela de &amp;quot;boot&amp;quot; ficará engraçada. Restrinja a apenas uma linha de texto que não seja maior do que a original.&lt;br /&gt;
&lt;br /&gt;
# Mude para o diretório &amp;lt;tt&amp;gt;/mnt/hda1/knx/master/boot&amp;lt;/tt&amp;gt; (altere &amp;quot;/mnt/hda1/&amp;quot; para refletir a sua configuração particular):&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Faça cópia de segurança da mensagem original no caso de algo dar errado:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Edite a mensagem com um editor de textos. Você verá no topo do arquivo uma mensagem: Não altere esse texto, apenas as linhas abaixo:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Alterando o texto do script de inicialização=====&lt;br /&gt;
O texto do script de inicialização é o texto que você vê depois da tela de &amp;quot;boot&amp;quot;, enquanto o Knoppix carrega e configura o sistema. Você pode alterar esse texto como melhor achar, até mesmo adicionar novas linhas ao script; entretanto não recomendamos &amp;quot;mexer&amp;quot; nesse arquivo. Limite-se a editar apenas a mensagem &amp;quot;Benvindo ao KNOPPIX&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Mude para o diretório &amp;lt;tt&amp;gt;/mnt/hda1/knx/master/boot&amp;lt;/tt&amp;gt; (altere &amp;quot;/mnt/hda1/&amp;quot; para refletir a sua configuração particular):&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Faça cópia de segurança do &amp;quot;minirt.gz&amp;quot; original no caso de algo dar errado:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Descomprima &amp;quot;minirt.gz&amp;quot;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Crie um diretório temporário para montar o sistema de arquivos &amp;quot;minirt&amp;quot;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Monte o sistema de arquivos &amp;quot;minirt&amp;quot; como &amp;quot;ext2&amp;quot;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Edite o script &amp;lt;tt&amp;gt;linuxrc&amp;lt;/tt&amp;gt; para mostrar a mensagem que você deseja. Você vai encontrar a mensagem padrão com aproximadamente 2 páginas e configurada com várias cores, i.e. ${WHITE}, ${RED}, etc., tornando difícil a leitura.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Desmonte o sistema de arquivos &amp;quot;minirt&amp;quot;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Comprima o sistema de arquivos &amp;quot;minirt&amp;quot;:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Remova o seu diretório temporário:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Abrindo o KDE para modificar menus, ícones, etc.====&lt;br /&gt;
Enquanto estiver no ambiente &amp;quot;chroot&amp;quot;, você pode carregar o KDE e usar as ferramentas de configuração do próprio KDE para modificar botões, menus, ícones, etc. Quando terminar, você pode sair do KDE e copiar os arquivos de &amp;quot;&amp;lt;tt&amp;gt;/home/knoppix&amp;lt;/tt&amp;gt;&amp;quot; para &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;&amp;quot; para manter estas mudanças. Para carregar o KDE faça o seguinte:&lt;br /&gt;
&lt;br /&gt;
# Se você não está no &amp;quot;runlevel&amp;quot; 2 (i.e., se você ainda está no KDE), mude para o &amp;quot;runlevel&amp;quot; 2.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copie os arquivos de &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;&amp;quot; para &amp;quot;&amp;lt;tt&amp;gt;/home/knoppix&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Mude as permissões de dono do diretório &amp;quot;&amp;lt;tt&amp;gt;/home/knoppix&amp;lt;/tt&amp;gt;&amp;quot; para o usuário &amp;quot;knoppix&amp;quot;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copie a configuração de X11 exterior sobrepondo a do ambiente do &amp;quot;chroot&amp;quot; (pressione &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot;&amp;gt;Ctrl+Alt+F2&amp;lt;/span&amp;gt; para ir para um terminal &amp;quot;não-chroot&amp;quot; e então pressione &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot;&amp;gt;Ctrl+Alt+F1&amp;lt;/span&amp;gt; para voltar quando tiver feito a cópia).&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#** Nota: No Knoppix 3.7 é o arquivo &amp;quot;&amp;lt;tt&amp;gt;XF86Config-4&amp;lt;/tt&amp;gt;&amp;quot; no lugar de &amp;quot;&amp;lt;tt&amp;gt;xorg.conf&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
# (Opcional) Mude para o usuário &amp;quot;knoppix&amp;quot;. Se você quiser desinstalar pacotes, fique como &amp;quot;root&amp;quot; e pule este passo. Se você quer configurar botões, ícones, plano de fundo, etc. que você vê quando o KDE inicia, assegure-se de fazer este passo.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Inicie o KDE&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Faça as mudanças no KDE&lt;br /&gt;
# Saia do KDE&lt;br /&gt;
#(Opcional - faça este passo somente se você fez o passo 5) Saia do &amp;quot;su&amp;quot; e volte para o usuário &amp;quot;knoppix&amp;quot;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copie o diretório &amp;quot;&amp;lt;tt&amp;gt;/home/knoppix&amp;lt;/tt&amp;gt;&amp;quot; de volta a &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;&amp;quot; para manter as mudanças.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /etc/skel /etc/skel-old&lt;br /&gt;
mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Reconfigure o dono de &amp;quot;&amp;lt;tt&amp;gt;/etc/skel&amp;lt;/tt&amp;gt;&amp;quot; como &amp;quot;root&amp;quot;.&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Remova o arquivo &amp;quot;&amp;lt;tt&amp;gt;xorg.conf&amp;lt;/tt&amp;gt;&amp;quot; {?}por quê?{?} &lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Trocando a imagem &amp;quot;ksplash&amp;quot; do KDE=====&lt;br /&gt;
Você pode mudar a imagem que o KDE exibe via &amp;quot;ksplash&amp;quot; quando ele inicializa. Estas imagens estão no diretório &amp;quot;&amp;lt;tt&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/tt&amp;gt;&amp;quot;. Você provavelmente vai querer trocar o arquivo &amp;quot;&amp;lt;tt&amp;gt;splash_top.png&amp;lt;/tt&amp;gt;&amp;quot; por uma figura PNG personalizada de 400x248 de resolução. Note que o &amp;quot;ksplash&amp;quot; não colocará automaticamente uma borda ao redor da figura. Se você quiser uma borda, terá que manualmente editar a figura.&lt;br /&gt;
&lt;br /&gt;
====Saindo do &amp;quot;chroot&amp;quot;====&lt;br /&gt;
Isto deve acontecer só depois das configurações e antes da criação do arquivo ISO.&lt;br /&gt;
&lt;br /&gt;
Se você montou &amp;quot;&amp;lt;tt&amp;gt;/proc&amp;lt;/tt&amp;gt;&amp;quot;, você precisará desmontá-lo -- isto é muito importante!&lt;br /&gt;
 umount /proc&lt;br /&gt;
Pressione &amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot;&amp;gt;Ctrl+D&amp;lt;/span&amp;gt; para voltar à raiz original (ou seja, sair de &amp;quot;chroot&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Remasterizando o arquivo ISO===&lt;br /&gt;
Terminada a parte da personalização, estamos prontos para &amp;quot;queimar&amp;quot; o CD/DVD!&lt;br /&gt;
Primeiro, façamos algumas limpezas:&lt;br /&gt;
* remova qualquer arquivo .bash_history, tmp, etc.&lt;br /&gt;
* reverta qualquer mudança que você não deseja que vá para o disco&lt;br /&gt;
*:&amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====KNOPPIX Compressed Image====&lt;br /&gt;
====Imagem compactada do KNOPPIXX====&lt;br /&gt;
Agora, vamos fazer o grande arquivo &amp;quot;&amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt;&amp;quot; que é um sistema de arquivos ISO 9660 compactado para ser utilizado com o dispositivo &amp;quot;&amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt;&amp;quot;:&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
  | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
Os textos &amp;quot;www.knoppix.net&amp;quot; e &amp;quot;Knoppix.net filesystem&amp;quot; podem ser trocados para qualquer texto com que você queira nomear o arquivo. Você vai obter um erro sobre não estar em conformidade com padrões ISO -- você pode ignorar isto. Note que, para executar &amp;quot;&amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;&amp;quot;, você vai precisar ter bastante espaço para armazenar o arquivo ISO inteiro na RAM/Swap. Certifique-se de ter, pelo menos, 800 MB de espaço livre antes de começar.&lt;br /&gt;
&lt;br /&gt;
No Knoppix 3.4 o script &amp;quot;&amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;&amp;quot; foi atualizado. Logo, certifique-se de utilizá-lo para obter o melhor resultado. Ele tem uma nova opção &amp;quot;-b&amp;quot; (de &amp;quot;best&amp;quot;), que habilita a&lt;br /&gt;
melhor compressão pela utilização de diferentes esquemas de compressão e tenta otimizar dessa maneira. Mas, seja cuidadoso, porque essa opção torna a compressão 10 vezes mais lenta.&lt;br /&gt;
&lt;br /&gt;
* Nota: Isso acima não funcionou para mim usando o último script &amp;quot;create_compressed_fs&amp;quot;. Eu pude criar o ISO mas ele não pode ler a imagem compactada propriamente quando inicializa (erros de E/S quando lendo o dispositivo &amp;quot;cloop0&amp;quot;). Eu penso que isto foi porque o &amp;quot;create_compressed_fs&amp;quot; não teve bastante RAM e fracassou silenciosamente. O comando abaixo funcionou, todavia. Ele usa um&lt;br /&gt;
arquivo temporário ao invés da memória para armazenamento temporário:&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
    -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
      | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
   65536 -f /mnt/sda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
====O Live-CD ISO====&lt;br /&gt;
Se tudo correu bem, vamos fazer a imagem de CD-ROM final:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(isto vai atualizar os códigos &amp;quot;md5&amp;quot; dos arquivos incluídos no ISO, que são usados para verificar a integridade)&lt;br /&gt;
Agora, vamos queimar a imagem:&lt;br /&gt;
Para Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
Para Knoppix &amp;gt;= 3.4 ou outras distribuições baseadas em &amp;quot;isolinux&amp;quot;:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(o ISO é armazenado em &amp;quot;&amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Queime o ISO no CD/DVD utilizando sua ferramenta de gravação favorita, e você está feito!&lt;br /&gt;
&lt;br /&gt;
===Dicas===&lt;br /&gt;
====No Fluxbox====&lt;br /&gt;
Eu tenho tido bons resultados remasterizando a partir do CD como &amp;quot;root&amp;quot; dentro do &amp;quot;Fluxbox&amp;quot;. Apenas digite &amp;quot;knoppix 2&amp;quot; no prompt de &amp;quot;boot&amp;quot; e ele inicializará para você um prompt de &amp;quot;root&amp;quot; onde você poderá fazer &amp;quot;start x /usr/bin/fluxbox&amp;quot;. Eu gosto de usar o &amp;quot;shell&amp;quot; do &amp;quot;xterm&amp;quot; em modo &amp;quot;unicode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Gerenciamento de pacotes====&lt;br /&gt;
Enquanto estou no modo &amp;quot;chroot&amp;quot; fazendo a remasterização eu gosto de usar&lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
para remover pacotes, porque antes de fazer algo, ele parará e mostrará detalhes sobre o que está programando para remover e deixará você responder &amp;quot;yes&amp;quot; ou &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você não usar as instruções do &amp;quot;apt-get&amp;quot; acima e tiver muita coisa para limpar e expurgar, aqui está uma maneira fácil de fazer isso:&lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge&lt;br /&gt;
Isso vai fazer uma lista de todos os pacotes removidos para expurgo e então você só precisará fazer:&lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
e estará terminado.&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
é a mesma coisa, mas em uma única linha.&lt;br /&gt;
Use também isso: &lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
====Alternativas para máquinas com pouca memória====&lt;br /&gt;
Você não precisa realmente de 1 GB de &amp;quot;swap&amp;quot; já que existem duas novas ferramentas para criar sistemas de arquivos compactados. Aqui estão alguns candidatos para fazer compressão:&lt;br /&gt;
* &amp;quot;Rewrite&amp;quot; de Valentijn -- http://projects.openoffice.nl/downloads/compressloop/&lt;br /&gt;
* Portagem do &amp;quot;compressloop&amp;quot; para Knoppix 3.4 de Quozl -- http://quozl.linux.org.au/compressloop-1.9-64bit.c&lt;br /&gt;
* &amp;quot;Compressloop&amp;quot; distribuído de Quozl (usa mais que um processador para acelerar as coisas) -- http://quozl.linux.org.au/knoppix/compressloop/ ou http://quozl.netrek.org/knoppix/compressloop/&lt;br /&gt;
* Remendo do Justin -- http://s.bouncybouncy.net/~justin/code/ (linque quebrado) -- Eu também escrevi um compressor &amp;quot;cloop&amp;quot; distribuído (ou para &amp;quot;smp&amp;quot;). Ele não está no mesmo diretório. {?}onde está, então?{?}&lt;br /&gt;
&lt;br /&gt;
====Testando a imagem de CD sem queimar um CD====&lt;br /&gt;
Se você tem uma partição livre com pelo menos 700 MB de espaço formatado com ext2, ext3 ou vfat, você pode usar isto para testar, inicializando a partir de um disquete. Um disquete de &amp;quot;boot&amp;quot; procurará por uma partição com o diretório &amp;quot;/KNOPPIX&amp;quot; na raiz, e a imagem compactada &amp;quot;/KNOPPIX/KNOPPIX&amp;quot;. Em vez de usar o subdiretório &amp;quot;/mnt/hda1/knx/master/KNOPPIX/&amp;quot; como descrito acima, ele deveria ser chamado &amp;quot;/mnt/hda2/KNOPPIX&amp;quot;. O arquivo &amp;quot;index.html&amp;quot; da raiz será então localizado em &amp;quot;/mnt/hda2/index.html&amp;quot; e a imagem compactada estará em &amp;quot;/mnt/hda2/KNOPPIX/KNOPPIX&amp;quot;. Agora, você pode inicializar a partir do disquete e usar &amp;quot;/mnt/hda2&amp;quot; como sua imagem. Para mais informações veja [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
Se você não tem uma partição extra e não quer (ou pode) criar uma, você pode utilizar o Qemu (veja http://fabrice.bellard.free.fr/qemu/ ou a distribuição brasileira chamada Kurumin) para inicializar a imagem ISO assim:&lt;br /&gt;
 qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -net user&lt;br /&gt;
Você nem mesmo terá que construir uma imagem de disco rígido antes, apenas instale o Qemu e tente isto. Incrível! {?}obscuro{?}&lt;br /&gt;
&lt;br /&gt;
====Testando a versão remasterizada sem criar o arquivo &amp;quot;cloop&amp;quot; ou ISO====&lt;br /&gt;
Eu uso uma configuração similar ao servidor de terminal do knoppix para testar os arquivos remasterizados sem ter que recriar uma imagem &amp;quot;cloop&amp;quot; cada vez: os arquivos remasterizados ficam num sistema de arquivos do tipo &amp;quot;ext2&amp;quot; num dispositivo &amp;quot;loopfile&amp;quot; (&amp;quot;knoppix_loop&amp;quot;) montado em modo &amp;quot;rw&amp;quot; (este é onde eu faço &amp;quot;chroot&amp;quot;). Quando eu quero testar a configuração corrente, eu tenho outra máquina com &amp;quot;boot&amp;quot; de rede e uso os arquivos do &amp;quot;loopfile&amp;quot; diretamente (é necessário outro &amp;quot;miniroot.gz&amp;quot;). Veja [[User:Ml#dev_setup]]&lt;br /&gt;
&lt;br /&gt;
Se você quer usar somente uma máquina, você precisará reinicializar (ou usar o &amp;quot;qemu&amp;quot;) e usar os macetes &amp;quot;loopfile&amp;quot; e &amp;quot;fromhd&amp;quot; (veja [[User:Ml#miniroot_changes]]). Por exemplo, isto é o que minha entrada de boot no GRUB parece:&lt;br /&gt;
&lt;br /&gt;
 title           Remastered Knoppix&lt;br /&gt;
 root            (hd0,0)&lt;br /&gt;
 kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
 initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&lt;br /&gt;
====Inicializando imagens Knoppix com GRUB====&lt;br /&gt;
* Primeiramente, copie &amp;quot;/boot&amp;quot; do CD do Knoppix para sua partição de &amp;quot;boot&amp;quot; (ou mesmo sua partição DOS). Eu nomeei a minha com &amp;quot;boot.knoppix&amp;quot;.&lt;br /&gt;
Copie o diretório master/Knoppix para o seu diretório-raiz de qualquer disco rígido. Você pode colocá-lo em algum lugar que não seja a partição de &amp;quot;boot&amp;quot; (ext2, ext3, reiserfs, vfat são suportados).&lt;br /&gt;
* Para Knoppix &amp;lt;= 3.3, ponha o seguinte no seu &amp;quot;/boot/grub/menu.lst&amp;quot;:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* Para Knoppix &amp;gt;= 3.4 ou outras distribuições do tipo &amp;quot;isolinux&amp;quot;:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* Note o parâmetro &amp;quot;fromhd&amp;quot;: é o local do diretório &amp;quot;/KNOPPIX&amp;quot;.&lt;br /&gt;
* Reinicialize e divirta-se.&lt;br /&gt;
&lt;br /&gt;
====Scripts úteis====&lt;br /&gt;
----&lt;br /&gt;
Este é o layout recomendado para o diretório de remasterização do KNOPPIX:&lt;br /&gt;
&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
O script de remasterização a seguir fará o processo de remasterização para você. Utilize-o como &amp;quot;root&amp;quot;, senão você obterá erros de acesso à imagem, devido às permissões.&lt;br /&gt;
&lt;br /&gt;
O script foi testado pela última vez com Debian &amp;quot;sid&amp;quot; em 02/04/2004.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
O script a seguir fará uma montagem de disquete de &amp;quot;boot&amp;quot; no modo &amp;quot;loop&amp;quot; e da imagem &amp;quot;initrd&amp;quot; para modificação. A função &amp;quot;umount&amp;quot; formará uma nova imagem &amp;quot;initrd&amp;quot; e a recolocará na imagem do disquete de &amp;quot;boot&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
O script foi testado pela última vez no Debian &amp;quot;sid&amp;quot; em 13/01/2004.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- lines starting with space are preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt; &amp;quot;`id -u`&amp;quot; -ne 0 &amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt; &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; &amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt; -e &amp;quot;$BOOTIMGFILE&amp;quot; &amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if &amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt; -e &amp;quot;$nofile&amp;quot; &amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
====Dicas sobre &amp;quot;apt-get&amp;quot; para instalar/atualizar/remover aplicações====&lt;br /&gt;
(por 'gnarvaja')&lt;br /&gt;
* Se você inicializou a partir de CD, ou mesmo de uma instalação em HD (exemplo: instalação Pivot), em vez de copiar o CD e o diretório KNOPPIX originais para o HD, você pode usá-los diretamente a partir do ponto de montagem deles.{?}obscuro{?}&lt;br /&gt;
* Outra alternativa é montar uma imagem ISO do CD original como um dispositivo &amp;quot;loop&amp;quot; e montar a imagem do KNOPPIX como um dispositivo &amp;quot;cloop&amp;quot;. Você poupará perto de 2 GB de espaço. O script para montar a partir de uma imagem ISO é:&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assume que o diretório corrente é o espaço de trabalho&lt;br /&gt;
 # &amp;quot;original.iso&amp;quot; é uma imagem do CD que vamos utilizar como mestre:&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # inicialize o dispositivo de &amp;quot;loop&amp;quot; comprimindo&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
* Instale o &amp;quot;apt-spy&amp;quot; e use-o para modificar o arquivo &amp;quot;sources.list&amp;quot; com os melhores servidores-espelho na sua região. Isso vai aumentar a velocidade de descarregamento. Faça cópia do arquivo &amp;quot;sources.list&amp;quot; original para o caso de algo dar errado.&lt;br /&gt;
* Outra técnica consiste em modificar o arquivo &amp;quot;sources.list&amp;quot;. Substitua o termo &amp;quot;.de.&amp;quot; nos endereços de &amp;quot;ftp&amp;quot; (por exemplo: &amp;quot;ftp.de.debian.org&amp;quot;) com o código correspondente ao seu país. Por exemplo: EUA: &amp;quot;ftp.us.debian.org&amp;quot;, Brasil: &amp;quot;ftp.b.debian.org&amp;quot;. Verifique no saite da Debian os servidores-espelho existentes no seu país.&lt;br /&gt;
* Lembre-se de descomentar (retirar o &amp;quot;#&amp;quot;) os endereços com &amp;quot;linuxtag&amp;quot; para obter o mais recente e maior {?} do Knoppix.&lt;br /&gt;
* Utilize &amp;quot;apt-get update&amp;quot; para obter as listas com as últimas versões e correções. Não atualize um pacote se você não precisa dele, pois isso pode levar a ocupar mais espaço em disco (tendo sempre em mente que tudo deve ficar abaixo de 700 MB em CD) e você pode, sem saber, &amp;quot;prejudicar&amp;quot; algo que esteja funcionando plenamente. Abuse da opção &amp;quot;-s&amp;quot; para simular a instalação (e verificar as &amp;quot;desinstalações&amp;quot; sugeridas, principalmente).&lt;br /&gt;
* Antes de fazer a atualização, eu modifiquei minhas versões padrão para &amp;quot;testing&amp;quot;, o que significa que o software que eu estarei utilizando terá um bom balanço entre estabilidade e características. Knoppix utiliza &amp;quot;unstable&amp;quot; por default, o que é muito arriscado no meu modo pessoal de ver.&lt;br /&gt;
* Obtenha &amp;quot;apt-get install locale&amp;quot; e configure-o com os &amp;quot;locales&amp;quot; que você vai utilizar. Isso vai poupar bastante espaço quando baixar aplicações com muitos módulos de &amp;quot;locales&amp;quot; e páginas de documentação localizadas.&lt;br /&gt;
* Eu utilizo &amp;quot;aptitude&amp;quot; para obter/remover aplicações. Ele opera em modo caractere, de forma que funciona com &amp;quot;runlevel&amp;quot; 2. Quando você marca os pacotes para instalar/atualizar/remover, ele informa quando de espaço em disco você poupará/usará, tenta resolver problemas com dependências de pacotes e dá a você total controle para corrigi-los manualmente quando possível.&lt;br /&gt;
* Quando instalar aplicações, é provável que os diretórios &amp;quot;/etc/rc?.d&amp;quot; ganhem novas entradas, muitas delas indesejadas ou não-requisitas. Certifique-se de verificar e remover as novas entradas baseando-se nas suas preferências. Eu geralmente deixo &amp;quot;/etc/rc2.d&amp;quot; e &amp;quot;/etc/rc5.d&amp;quot; tão próximo quanto possível ao original e modifico &amp;quot;/etc/rc3.d&amp;quot; e &amp;quot;/etc/rc4.d&amp;quot; para testar as novas coisas. Por exemplo: Você pode querer ter &amp;quot;ntfs&amp;quot; instalado, mas não necessariamente executando por padrão. O mesmo em relação ao &amp;quot;apache&amp;quot;, &amp;quot;mysql&amp;quot; e muitos outros serviços.&lt;br /&gt;
* Quando removendo/expurgando aplicações, eles podem deixar diretórios não-vazios para trás. Geralmente isto é revelado pelo &amp;quot;aptitude&amp;quot;, &amp;quot;apt-get&amp;quot; ou qualquer outro utilitário de instalação. Certifique-se de verificar as mensagens e manualmente remover aqueles diretórios.&lt;br /&gt;
* Depois de terminar, &amp;quot;aptitude&amp;quot; pode deixar alguns arquivos temporários para trás. Aqui está um script para fazer a limpeza:&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Limpa os arquivos de pacotes gerados pelo &amp;quot;aptitude&amp;quot;&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
===Problemas Comuns===&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] -- trata de problemas de &amp;quot;chroot&amp;quot; no acesso a arquivos de dispositivos.&lt;br /&gt;
&lt;br /&gt;
* Você fez &amp;lt;tt&amp;gt;startx&amp;lt;/tt&amp;gt; para chamar algum ambiente de janelas que você tenha e iniciou um terminal (&amp;quot;gnome-terminal&amp;quot;, &amp;quot;konsole&amp;quot;, &amp;quot;xterm&amp;quot;, etc.), mas nada aconteceu ou talvez um erro seja exibido como:&lt;br /&gt;
 get_pty: not enough ptys&lt;br /&gt;
: Consegui resolver isso assim:  &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 # FORA do ambiente &amp;quot;chroot&amp;quot;&lt;br /&gt;
 cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
 MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
 # DENTRO do ambiente &amp;quot;chroot&amp;quot;&lt;br /&gt;
 chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
 # e montando &amp;quot;/dev/pts&amp;quot;&lt;br /&gt;
 mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
: Pode ser que dê o erro &amp;quot;fstab not found&amp;quot; que dá na montagem de &amp;quot;proc&amp;quot;, então você ignora, apenas.&lt;br /&gt;
* Inicie o X novamente e tente entrar no terminal, pois deve funcionar. &lt;br /&gt;
* Obrigado a: 'technovelty' em http://www.technovelty.org/linux/tips/xinchroot.html pela iluminação.&lt;br /&gt;
&lt;br /&gt;
===Veja Também===&lt;br /&gt;
&lt;br /&gt;
Se este tutorial é muito confuso, ou você quer uma segunda opinião, examine este tutorial de remasterização do 'charan': http://brainstorms.in/?page_id=84 Outro tutorial está em http://www.stirnimann.com/mystuff/doc/knoppix.txt.&lt;br /&gt;
&lt;br /&gt;
Há um assistente que sabe tudo sobre os passos de descompactação, compressão e gravação em CD mencionados aqui. Ele também mostra um &amp;quot;shell&amp;quot; onde você pode atualizar o sistema KNOPPIX descompactado usando ferramentas de instalação de software padrão do Debian. É chamado de &amp;quot;mmkcdrom&amp;quot; e é parte do pacote &amp;quot;plugscript&amp;quot;: http://rcswww.urz.tu-dresden.de/~holzhey/plugscript.&lt;br /&gt;
&lt;br /&gt;
Há ainda outro tutorial em http://quozl.linux.org.au/knoppix/.&lt;br /&gt;
&lt;br /&gt;
Certifique-se de checar o [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] para idéias e ajudas com remasterização.&lt;br /&gt;
&lt;br /&gt;
* Se você quer adicionar um kernel personalizado na remasterização, examine o [[Knoppix Custom Kernel Howto]].&lt;br /&gt;
* Há também uma guia na O'Reilly sobre o mesmo tópico: [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
===Conclusão===&lt;br /&gt;
É isso. Esta é uma versão atualizada do meu tutorial anterior. Não foi feito para iniciantes, pois é preciso conhecer as &amp;quot;entranhas&amp;quot; do Linux para fazer isto funcionar. Eu atualizarei este tutorial na medida que novas correções/melhoramentos aparecerem.&lt;br /&gt;
&lt;br /&gt;
===Agradecimentos===&lt;br /&gt;
Tenho que agradecer a estes: 'aay', 'charan', 'Tech2k' e '#knoppix' por algumas correções, dicas e idéias. Sinta-se à vontade para editar or aumentar este tutorial.&lt;br /&gt;
Nota sobre o &amp;quot;swap&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
===Traduções===&lt;br /&gt;
* Versão em inglês: [[Knoppix Remastering Howto]]&lt;br /&gt;
* Versão em alemão: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Versão em espanhol: [[Knoppix Remastering Howto Spanish]]&lt;br /&gt;
* Versão em francês: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Versão em indonésio: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Versão em russo: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto_Italiano</id>
		<title>Knoppix Remastering Howto Italiano</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto_Italiano"/>
				<updated>2008-05-21T03:42:51Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* Altre Indicazioni */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questa è una guida che illustra come eseguire il remaster della KNOPPIX. (Note: I comandi appaiono in  una riga, massimalizate il Vs. Browser per una corretta lettura. Se avete commenti/suggerimenti usate il post qui sotto.)&lt;br /&gt;
&lt;br /&gt;
Potete intanto cominciare da una versione di Knoppix già su misura, in modo che non dobbiate fare tanto lavoro (vedendo quali programmi rimuovere). In caso affermativo, vedete [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
=Sistema Richiesto=&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** Almeno 1 GB di RAM+Swap liberi (esempio: 256M RAM, and 750M SWAP Disponibili) (unless you use a different compression program - look in this page for compressloop)&lt;br /&gt;
** 3 GB di filesystem  '''Linux filesystem (ext2/3, xfs, etc.)''' liberi in una partizione formattata&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB RAM + swap libera (per un DVD a dimensione completa)&lt;br /&gt;
** 15 GB di filesystem '''Linux filesystem (ext2/3, xfs, etc.)''' liberi in una partizione formattata&lt;br /&gt;
&lt;br /&gt;
=Istruzioni=&lt;br /&gt;
==Settaggio per il Remastering==&lt;br /&gt;
# Boot di una qualunque ''Knoppix CD''&lt;br /&gt;
# aprite un terminale e andate in root o aprite un terminale in root shell:&lt;br /&gt;
#* Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Root Shell&lt;br /&gt;
#* Note: tutti i comandi sotto vanno eseguiti in root shell.&lt;br /&gt;
# Configurate la vostra connessione Internet (ne avremo bisogno sucessivamente). se usate il DHCP, dovete avere una rete che vi da tale supporto ( router, DHCP server,ecc....).&lt;br /&gt;
#* Note: Eseguite il comando '''ifconfig''' per una verifica.&lt;br /&gt;
# Trovate la partizione che volete usare per lavorare. In questo esempio si usa un disco '''hda1''' .  La partizione deve avere un minimo di 3 GB  di spazio libero&lt;br /&gt;
# Mountare la partizione con il comando:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: accertatevi che sia in read/write oppure incorrete in errore quando dopo usate la chroot. Per Verificare: eseguite '''mount'''&lt;br /&gt;
# Create una root directory per lavorare -- Se voi mettere qui i vostri file poi potete cancellarli facilmente&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Se il Vs.PC non ha almeno 1 GB RAM (  '''egrep &amp;quot;(MemTotal|SwapTotal)&amp;quot; /proc/meminfo &amp;amp;&amp;amp; echo &amp;quot;(physical+swap)&amp;quot;''' ) Allora avete bisogno di una SWAP creata su un swapfile:&lt;br /&gt;
 &amp;lt;code&amp;gt;cd /mnt/hda1/knx&lt;br /&gt;
 dd if=/dev/zero of=swapfile bs=1M count=750&lt;br /&gt;
 mkswap swapfile&lt;br /&gt;
 swapon swapfile&amp;lt;/code&amp;gt;&lt;br /&gt;
# Costruite 2 directori, uno per il vostro nuovo Master CD, uno per sourgente, nella vostra partizione. Create le directori come sotto con il nome KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Ora, copiate i KNOPPIX del vostro live CD nella directori sorgente :&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: Questo richiede un lungo tempo (state copiando circa 2GByte).  ATTENZIONE: sarete tentati di sostituire questo ordine di copia con una procedura molto più veloce: il risultato genera un indice vuoto. Tuttavia, a partire da Knoppix 4.0.2, vi è un bug nei unionfs che rende questa procedura più veloce si ma con perdita di dat. Per ora, copiate il comando ed usatelo cosi come si trova.&lt;br /&gt;
# In Aggiunta, copiare la cartella di 'boot' dal vostro cdrom - abbiamo bisogno di queste informazioni per creare la ISO image del CDROM verso la fine.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Per la Knoppix 5.0.1 dovete avere la copia della cartella che contiene i 'modules':&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copia le main page HTML dello startup:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copiare tutto il resto dei file circa ~700 Mb di KNOPPIX file.&lt;br /&gt;
#* &amp;lt; 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;gt;= 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Per la versione in DVD usete -size -15000k e copiate la cartella KNOPPIX2 come sotto qui:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;cp /KNOPPIX2 /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Preparate gli environment di ambiente per attivare il chroot&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Ora potete entare in &amp;quot;chroot&amp;quot; nella copia di KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Se vedete errori dei  &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;, datte uno sguardo alla guida [[#Common Problems|common problems]] nella apposita sezione&lt;br /&gt;
Ora siete in chroot . &amp;quot;/&amp;quot; che si trova in &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Lavorare in Chroot Environment==&lt;br /&gt;
Ricordate che qualunque cosa voi facciate o modficate in chroot viene concretizzato nel CD. Se fate cambiamenti fatevi una nota che vi aiuta a capire quale variazioni avete apportato ( configurazione, desktop, file di sistema, script, eccc...) prima della masterizzazione.&lt;br /&gt;
===Accesso a Internet===&lt;br /&gt;
Per usare internet avete bisogno di editare &amp;lt;tt&amp;gt;/etc/resolv.conf&amp;lt;/tt&amp;gt; per aggiungere il nome del Server  Dns del Vs. Provider o della Vs. rete  oppure uscite dal chroot e copiate il &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; nella cartella di chroot: &lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
(proxy (nel caso ne abbiate uno sulla Vs.Rete): digitate &amp;quot;export http_proxy=http://your.proxy.com:&amp;lt;port&amp;gt;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
Per controllare la vostra connessione internet in chroot,&lt;br /&gt;
 ping google.com&lt;br /&gt;
(se l'ICMP e filtrato dal vostro firewall potete fare una verifica del funzionamento di internet con &amp;quot;lynx http://www.google.com&amp;quot; e verificate se riceve la pagina dopo avere risposto &amp;quot;allow&amp;quot; alla richiesta di accettare i cookie)&lt;br /&gt;
&lt;br /&gt;
===Accesso SMB (Samba o Domini Windows)===&lt;br /&gt;
Cambiate smb.conf con il vostro gruppo MS se avete bisogno del supporto smbd (MSHOME, DOMAIN e XP Home  sono usaualmente con WORKGROUP per Windows 9x i nomi di gruppo usati, consultate il Vs. control pannel di una stazione Windows con l'icona &amp;quot;Sistema&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
===Accesso APT ( repositor di aggiornamento e upload pacchetti)===&lt;br /&gt;
Aggiornate la lista pacchetti con  '''apt-get update'''.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Nota: Se ''''apt-get update''' termina con il messaggio &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, È necessario assicurarsi che il proprio chroot è montato senza le option &amp;quot;nodev&amp;quot;. (Vedi sopra, dove si parla di errori /dev/null quando avete inserito il chroot, per la prima volta)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Warning''': apt-get upgrade e una ''CATTIVA IDEA''. Esso conclude , con una buona probabilita', rendendo la vostra KNOPPIX remaster non bootabe, o da buttare. Una buona cosa e' aggiornare solo i pacchetti necessari alla vostra distribuzione Live.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Nota: Se apt-get termina con il messaggio &amp;quot;Dynamic NMap ran out of room&amp;quot; ''' Potresti provare questo piccolo gioiello, che fissa il problema per me:&lt;br /&gt;
 #echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&lt;br /&gt;
(Va fatto questo, mentre siete in chroot, come descritto in precedenza.)&lt;br /&gt;
&lt;br /&gt;
Prima di poter aggiungere roba, si avrà probabilmente bisogno di rimuovere alcuni pacchetti. Per ottenere una lista dei pacchetti installati, digitate questo comando:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
Se siete alla ricerca di grossi pacchetti installati allora il comando:&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
ottenete una lista dei pacchetti in ordine discendente.&lt;br /&gt;
	&lt;br /&gt;
Almeno dieci volte più veloce è il comando:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
e non avete bisogno dei pacchetti dpkg-awk or awk or perl; Tuttavia non esclude che i pacchetti non sono installati. Se hai problemi con il comando di ordinamento, provare a utilizzare KPackage, ampliati tutti gli alberi e ordinati in base alla colonna dimensione cercate i grandi pacchetti.&lt;br /&gt;
&lt;br /&gt;
Oppure, si potrebbe usare questo comando per ottenere velocemente da qpkg-query la lista dei pachetti non  installati:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
Si fa la stessa cosa, come sopra. Solo che non ho potuto ottenere i risultati perché non ho dpkg-awk.&lt;br /&gt;
&lt;br /&gt;
Per rimuovere i pachetti (e tutte le dipendenze incrociate), digitate:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
Per verificare i pacchetti orfani, digitate:&lt;br /&gt;
 deborphan&lt;br /&gt;
Vuoi risparmiare più spazio e per sbarazzarsi di questi strani orfani (come crudele!), il messaggio ('''Warning''', non ti chiederà sì / no per rimuovere questi pacchetti. Quando si preme Invio dopo questo comando , Questi pacchetti saranno processati''''):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
Se siete incerti circa il comando precedente e volete vedere cosa accadrà senza apportare eventuali modifiche, è sufficiente aggiungere il'''-s''' opzione per il comando apt-get (potete farlo con tutti i comandi Apt-get, si tratta di una buona abitudine fare uso di questa opzione prima di operazioni di massa come queste):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
Ora il comando giusto. Se si desidera aggiungere un pacchetto, digitate questo:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
	&lt;br /&gt;
Quando non si sa quali sono i pacchetti da installare? Digitate questo comando: Quando viene visualizzato l'elenco, è possibile esaminalo (sono &amp;gt;13k! linee) o usare la ricerca rapida usando &amp;lt;tt&amp;gt;/''search-term''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
Quando hai finito di aggiungere e rimuovere i pacchetti, un buon modo per ripulire è digitando questo comando:&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Inoltre, poiché il sistema dei pacchetti Debian mantiene una cache dei pacchetti scaricati, è possibile che si desideri eseguire il seguente comando per eliminare quei file appoggio:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
===Settaggio degli utenti===&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
Impostazioni utente le trovate in /etc/skel. Questa directory viene copiata quando create nuove home directory degli utenti.&lt;br /&gt;
&amp;lt;blockquote&amp;gt; Consiglio: non mettete i file in /root saranno disponibili solo (in fase di runtime), in&lt;br /&gt;
/KNOPPIX/root&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nota: L'utente di default 'knoppix' non è creata con adduser (1), quindi /etc/skel non viene copiato completamente, ma piuttosto in modeo selettivo. Se dovete mettere un file .xyrc in /home/knoppix, non è sufficiente a metterelo in /etc/skel. Una possibilità è quella di modifcare il codice  di /etc/X11/Xsession.d/45xsession che è responsabile per la costruzione del contenuto di /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
===AutoEsecuzione programmi===&lt;br /&gt;
Quando si desidera il lancio automatico di alcuni programmi, si può creare uno script e metterlo nella directory &amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt; (Questo per i soli programmi caricabili prima del server X). Leggete i processi di SysV init per altre possibilità operative.&lt;br /&gt;
&lt;br /&gt;
''Per i programmi X considerate &amp;lt;tt&amp;gt;/home/knoppix/.kde/Autostart&amp;lt;/tt&amp;gt; ma questo può trasferire il controllo a &amp;lt;tt&amp;gt;/etc/skel/.kde/Autostart&amp;lt;/tt&amp;gt; on boot''--[[User:12.106.237.2|12.106.237.2]] 18:08, 7 December 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Edit del KNOPPIX auto-configuration script==&lt;br /&gt;
	&lt;br /&gt;
Potete trovare un sacco di informazioni interessanti su come KNOPPIX si autoconfigura il Vs. sistema guardando in /etc/init.d/knoppix-autoconfig script. Una serie particolare di note la trovate qui sotto.&lt;br /&gt;
&lt;br /&gt;
===Cambire la default KDE background image===&lt;br /&gt;
L'auto-script di configurazione di default imposta l'immagine di sfondo di KDE per essere un'immagine caricata da CD-ROM. Un'immagine che è possibile modificare facilmente quando si rimasterizzazione KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
** In KNOPPIX 3.3 e precedenti la trovate /cdrom/KNOPPIX/background.gif&lt;br /&gt;
** In KNOPPIX 3.4 e successive la trovate /cdrom/KNOPPIX/background.jpg&lt;br /&gt;
&lt;br /&gt;
===Editare i file di autoconfigurazione di floppy e CD-ROM===&lt;br /&gt;
La configurazione automatica di script imposta sia il CD-ROM sia il vostro disco floppy. I comandi per fare questo sono, rispettivamente 'floppyconfig' e 'cdromconfig'. La configurazione automatica con lo script anche cdrom/KNOPPIX/knoppix.sh, che è un semplice script per cambiare quando rimasterizzate KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
===Cambiare i parametri del boot alla partenza===&lt;br /&gt;
Tutti i parametri di boot ottngono i valori di default in /etc/init.d/knoppix-autoconfig script. Si tratta di uno script di BASH massiccio (è meglio conoscere bene BASH per giocare con questo file), ma è il luogo dove è possibile modificare uno qualsiasi dei parametri di boot di default. Per esempio, per passare da 'kde' a 'twm' come desktop di default cercate dove 'kde' è definito come valore di default (variabile DESKTOP, IIRC). Un altro esempio sarebbe quello di cambiare la lingua di default che può essere cambiato.&lt;br /&gt;
&lt;br /&gt;
Notate che, se siete interessati a cambiare la lingua di default usata da KDE, la cosa più semplice da fare è caricare ilKDE, le istruzioni si trovano al di sotto, e utilizzare l'utility di configurazione di KDE per selezionare la lingua di vostro interesse.&lt;br /&gt;
&lt;br /&gt;
==Configurazione delle sessioni X==&lt;br /&gt;
Quando si lavora con programmi basati su X, si dovrà fare in modo che lo schermo è impostato adeguatamente. Puoi farlo manualmente quando rimasterizzazione KNOPPIX. Inoltre,ci sono due script correlati a X Session è dove è possibile modificare o disattivare il suono di avvio e di arresto.&lt;br /&gt;
&lt;br /&gt;
===Start dei programmi della interfaccia X===&lt;br /&gt;
Quando testate i programmi basati su X voi dovete avere attivato le variabili di ambiente&lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
Questo consente di connettere le vostre applicazioni alle sessioni del server X. In alternativa (se avete lda testare il windows manager),Potete creare un successiva sessione X. Fuori da chroot, eseguite&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
All'interno di chroot, Settate così le variabili di ambiente&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
&lt;br /&gt;
Indicazioni interessati le trovate in /etc/init.d/xsession :&lt;br /&gt;
* Potete personalizzare il background modificando /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
===Modifica/Disattivazione del sound alla partenza===&lt;br /&gt;
Il suono alla attivazione di X è eseguito mediante le indicazioni presenti in /etc/X11/Xsession.d/45xsession. Potete disattivare il suono commentando le linee seguenti nello script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifica/disabilita il suono in shutdown===&lt;br /&gt;
Il suono allo shutdown ( spegnimento) è eseguito mediante le indicazioni presenti in /etc/init.d/xsession. Potete disattivare il suono commentando le linee 210-220 nello script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cambiare il windows manager di default===&lt;br /&gt;
&lt;br /&gt;
Aprire /etc/init.d/knoppix-autoconfig  e guardare o trovate la linea qui sotto:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Allow only supported windowmanagers                                           &lt;br /&gt;
# Actually, this check is useless because it's done again in 45xsession. -KK    &lt;br /&gt;
# case &amp;quot;$DESKTOP&amp;quot; in gnome|enlightenment|kde|larswm|xfce|xfce4|lg3d|ratpoison|blackbox|openbox|windowmaker|wmaker|icewm|fluxbox|twm|nx|rdp|kiosk) ;; *) DESKTOP=&amp;quot;kde&amp;quot;; ;; esac                                                                  &lt;br /&gt;
[ -n &amp;quot;$DESKTOP&amp;quot; ] || DESKTOP=&amp;quot;kde&amp;quot;                                          &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cambiate &amp;quot;kde&amp;quot; tra gli apici della vostra interfaccia preferita, per esempio ( gdm, fluxbox, twm, ecc...).&lt;br /&gt;
&lt;br /&gt;
==Cambiare la grafica al boot, il messaggio di boot, e gli script di start==&lt;br /&gt;
Quando siete in ambiente chroot potete cambiare facilmente il boot message, la grafica al boot e lo sfondo della grafica KDE.&lt;br /&gt;
&lt;br /&gt;
===Cambiare la grafica del boot===&lt;br /&gt;
La Grafica di boot e' la prima immagine quando il CD/DVD partono. It looks similar to ASCII art and it is normally something flashy that says 'Knoppix'. You can change this to be any graphic that you please, but you must use a 640x400 graphic that has only 16 colors.&lt;br /&gt;
&lt;br /&gt;
#Cambiate posizione di lavoro andando a /mnt/hda1/knx/master/boot. Scambiate '/mnt/hda1/' con il disco che si sta utilizzando.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Fate una copia del vecchio logo nel caso abbiate problemi.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Costruite una immagine 640x400 16 colori e salvatela in formato GIF, es: 'logo.16.gif'. GIMP è favoloso per questo processo. Nota: Si può utilizzare una immagine grafica che originariamente ha più di 16 colori, ma è fondamentale che la conversione grafica a 16 colori avvenga prima di fare il passo successivo. &lt;br /&gt;
#Convertite le gif in lss16 usando i tools inclusi nella Knoppix CD.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm &lt;br /&gt;
ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cambiare il messaggio di boot===&lt;br /&gt;
The 'boot message' is the message that you see under the 'boot graphic' on the initial screen when the Knoppix CD or DVD loads. It normally says something along the lines of Knoppix with the version number and includes a link to the Knoppix website. You can change this text to be whatever you please, but you shouldn't add too much text or it will make the boot screen look funny. Restricting yourself to a singly line of text that is no larger than the default one is a good idea.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old message in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the message with a text editor. You'll see at the top of the message that it shows the graphic. Don't change this text, just the line under.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cambiare lo script di startup ===&lt;br /&gt;
The 'startup script text' is the text that you see after the initial boot screen, while Knoppix loads and configures your system. You can change as much of this text as you please. You can even add addition lines to the script; however, it is recommended that you don't play with this file. Limiting yourself to editing the 'Welcome to KNOPPIX' message is a good idea. &lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old minirt.gz in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Uncompress minirt.gz&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a temporary directory to mount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Mount the minirt filesystem as an ext2 filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#::or if the above does not work use&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o loop&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the linuxrc script to display the message you want. You'll find the default message approximately 2 pages down and it'll be using several colors, i.e. ${WHITE}, ${RED}, etc., so it might be slightly tricky to spot.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#unmount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Compress the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove your temporary directory.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Lanciare KDE per cambiare Menu,Icone,ecc...==&lt;br /&gt;
While you are in the chroot environment you can load KDE and use the configuration tools to change buttons, icons, etc. Once you are finished you can exit KDE and copy /home/knoppix to /etc/skel to keep these changes. To load KDE do the following.&lt;br /&gt;
&lt;br /&gt;
#If you are not at runlevel 2 (i.e. if you are already in KDE), switch to runlevel 2.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /etc/skel to /home/knoppix&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Change permissions to the user 'knoppix'&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy over your X11 configuration to the chroot'd environment (press ctrl+alt+F2 to switch to a non-chroot'd terminal, then ctrl+alt+F1 to switch back when done)&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*&amp;lt;blockquote&amp;gt;'' Knoppix 3.7: I think it's XF86Config-4 rather than xorg.conf.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#(Optional)Switch to user 'knoppix'. If you want to uninstall packages, stay as root -- e.g. skip this step. If you want to configure the buttons, icons, background, etc., that you see when KDE boots, be sure to do this step.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Launch KDE&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Do your KDE changes&lt;br /&gt;
##Exit KDE&lt;br /&gt;
##Exit su and switch back to user 'root'.&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /home/knoppix back to /etc/skel to keep the changes&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /etc/skel /etc/skel-old&lt;br /&gt;
mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Set the owner back to root&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove the xorg.conf file&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you find that some of your settings are not persistent after booting the new image, check the initialization file at /etc/X11/Xsession.d/45xsession.  By default, Knoppix does '''not''' simply copy over all files from /etc/skel.  You may need to make modifications here if you wish to do something different.&lt;br /&gt;
&lt;br /&gt;
===Cambiare la grafica del ksplash di KDE ===&lt;br /&gt;
Puoi cambiare la grafica di KDE che mostra attraverso ksplash quando carichi il KDE. Queste immagini sono in &lt;br /&gt;
&amp;lt;b&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/b&amp;gt;. E' probabile che volgiate cambiare&lt;br /&gt;
&amp;lt;b&amp;gt;splash_top.png&amp;lt;/b&amp;gt; con la Vs. grafica personalizzata in un PNG 400x248. Nota che il ksplash automaticamente non genera il bordo attorno alla Vs. immagine. Se desideri un bordo lo dovete aggiungere manualmente al vostro grafico.&lt;br /&gt;
&lt;br /&gt;
==Lasciare l'ambiente Chroot==&lt;br /&gt;
Se voi montate chroot, dovete smontare /proc - Molto IMPORTANTE!!!!!&lt;br /&gt;
&lt;br /&gt;
 umount /proc&lt;br /&gt;
Premere '''CTRL+D''' per rilasciare chroot.&lt;br /&gt;
&lt;br /&gt;
==Rientrare in modo chroot==&lt;br /&gt;
	&lt;br /&gt;
Se hai lasciato il chroot, ma si desidera tornare indietro e modificare alcune cose...&lt;br /&gt;
&lt;br /&gt;
rimontare il Vs. hard disk locale (se necessario)&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Settaggio delle variabili di ambiente per chroot&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Ora potete entrare in &amp;quot;chroot&amp;quot; nella copia di KNOPPIX:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Rimasterizzare la ISO==&lt;br /&gt;
Quando siete pronti per bruciare il vostro CD:&lt;br /&gt;
Iniziate con un po di pulizia: &lt;br /&gt;
* rimovere i .bash_history file, tmp file, etc.&lt;br /&gt;
* Riordinare i cambiamenti che non si desidera trovare quando si masterizza il CD&lt;br /&gt;
* &amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===KNOPPIX Immagine Compressa===&lt;br /&gt;
Ora creiamo l'immagine del file &amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt; che è un file system compresso ISO 9660 per l'uso da parte del &amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt; driver:&lt;br /&gt;
  mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
      -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX &lt;br /&gt;
   | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&amp;quot;www.knoppix.net&amp;quot; e &amp;quot;Knoppix.net filesystem&amp;quot; possono essere cambiati con quello che volete. Verrà visualizzato un messaggio di errore che non è conforme alle norme ISO - potete ignorare questo messaggio. Si noti che, per eseguire &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;, devi avere spazio sufficiente per memorizzare tutto l'ISO e RAM/swap. Assicurare di avere almeno 800M di spazio libero prima di cominciare.&lt;br /&gt;
&lt;br /&gt;
Knoppix 3,4 e il &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt; script è stato aggiornato in modo da assicurarsi di utilizzare per ottenere il miglior risultato. Ha una nuova opzione'' '-b''' (migliore), che consente la migliore compressione utilizzando differenti schemi di compressione e cerca di ottimizzare questo modo, ma fate attenzione, perché questa opzione è lenta (10x più lenta).&lt;br /&gt;
&lt;br /&gt;
Nota: La suddetta non ha funzionato per me, con le ultime create_compressed_fs. Ho potuto creare la ISO, ma potrebbe non leggere correttamente l'immagine compressa quando si avvia (I/O errori durante la lettura del dispositivo cloop0). Penso che questo è stato perché create_compressed_fs non ha abbastanza RAM e anche se funzionava il comando non ha eseguito la compressione correttamente. Esso utilizza un file di memoria temporaneo per lo stoccaggio:&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX &lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
    65536 -f /mnt/hda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
===Live CD ISO===&lt;br /&gt;
Bene quando avete finito, potete procedere a produrre l'immagine finale del CD-ROM:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(Questo aggiona il marker MD5 calcolando l'hash dei file includi nell'ISO, usato per verificare l'integrità) ora potete masterizzare; per Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
per Knoppix &amp;gt;= 3.4 o altre distribuzioni isolinux:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(la ISO è memorizzata in &amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Trasferite la vostra ISO usando il vostro tool preferito, è il CD e pronto per l'uso.&lt;br /&gt;
&lt;br /&gt;
=Trucchi=&lt;br /&gt;
Ho avuto buoni risultati rimasterizzazione di lavoro dal CD di lavoro come root da Fluxbox. Basta dire &amp;quot;Knoppix 2&amp;quot; al prompt boot e si avvio a un prompt di root dove si può poi dire &amp;quot;startx /usr/bin/fluxbox&amp;quot;. Mi piace utilizzare la shell di xterm unicode.&lt;br /&gt;
&lt;br /&gt;
==Gestione dei pacchetti Software==&lt;br /&gt;
Prima di fare il lavoro di rimasterizzazione da chroot e meglio usare&lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
per rimuovere i pacchetti, perché prima di tutto non si blocchi la masterizzazione e vi mostra dettagli su ciò che è lo stato delle dipendenze segnalando &amp;quot;sì o no&amp;quot; per la rimozione del superfluo.&lt;br /&gt;
&lt;br /&gt;
Se non si utilizza il sopra &amp;quot;apt-get&amp;quot; e la lunga sequenza di controllo pacchetti, ecco il modo più semplice per farlo: &lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge	&lt;br /&gt;
Che farà un elenco di tutti i pacchetti rimossi da spurgare &lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
se si purgano con:&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
il comando che completa l'opera:&lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
==Alternativa per macchine con poca Memoria==&lt;br /&gt;
	&lt;br /&gt;
Non si ha realmente bisogno 1G di swap in quanto vi sono due nuovi strumenti per creare i filesystem compresso. Ecco alcuni dei candidati a sostituire il sistema di fs ''compresso'':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Valentijn's riscrive il compressore [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Quozl's porting di compressloop per Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Quozl's distribuisce compressloop (Utilizzate più di un processore per velocizzare le cose) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Justin's patch [http://s.bouncybouncy.net/~justin/code/] (link broken)che a distribuito il cloop (anche per smp) Che trovate in questa stessa directory.&lt;br /&gt;
&lt;br /&gt;
==Test della immagine CD senza creare il supporto CD==&lt;br /&gt;
Se avete un partizione con almeno 700MB di spazio libero formattato con ext2, ext3 o Vfat, è possibile utilizzarla per questo test per il boot da un floppy disk. Un floppy di boot vengono cercate un partizione con /KNOPPIX/ nella root, e la compressa immagine /KNOPPIX/KNOPPIX. Invece di usare la sotto-directory /mnt/hda1/knx/master/KNOPPIX/ come descritto sopra, deve essere chiamato /mnt/hda2/KNOPPIX/. La root index.html si trova in /mnt/hda2/index.html e immagine compressa sarà in /mnt/hda2/KNOPPIX/KNOPPIX. Ora potete fare il boot da dischetto e usare /mnt/hda2 come immagine. Per ulteriori informazioni, vedere [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
Se non si dispone di una partizione o non si vuole usare il metodo precedente si può usare Qemu (vedi [http://fabrice.bellard.free.fr/qemu/]), con l'immagine ISO come questo comando:&lt;br /&gt;
  Qemu-m 128 -cdrom /temp/Knoppix-custom.iso -boot d -net user&lt;br /&gt;
Come vedete la ISO deve essere pronta prima di lanciare il comando, provate Qemu è un emulatore che funziona bene per questo test.&lt;br /&gt;
&lt;br /&gt;
==Test della versione rimasterizzata senza creare il cloop file/iso==&lt;br /&gt;
Ho usato una configurazione simile a Knoppix server terminal per testare il file remasterizzato senza dover ricreare una immagine &lt;br /&gt;
Cloop ogni volta: il file remasterizzato vivere in un filesystem ext2 in un loopfile (knoppix_loop) montato in rw (questo è in chroot). Quando volte testare la configurazione attuale, ho un altro computer di rete in boot remoto e utilizzo i file della loopfile directory (si ha bisogno di un altro miniroot.gz). Vedi [[Utente: Ml # dev_setup]]&lt;br /&gt;
&lt;br /&gt;
Se si desidera utilizzare una sola macchina, dovrete riavviare (o utilizzare qemu) e usare il &amp;quot;loopfile&amp;quot; e &amp;quot;fromhd&amp;quot; cheatcodes (vedi [[Utente: Ml # miniroot_changes]]). Ad esempio, questo è ciò che ho usato nel mio avvio di grub:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title           Remastered Knoppix&lt;br /&gt;
root            (hd0,0)&lt;br /&gt;
kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot della immagine Knoppix con GRUB==&lt;br /&gt;
* Prima copiate /boot fuori dal Knoppix cd nella vostra partizione di booto (o la vostra partizione dos). Io la ho chiamata boot.knoppix&lt;br /&gt;
copate la master/KNOPPIX directory nella vostra directori di root. È possibile collocarlo altrove rispetto alla partizione di boot (ext2/3, reiserfs, vfat sono supportete).&lt;br /&gt;
* Per Knoppix &amp;lt;= 3.3, ponete queste righe nel vostro: /boot/grub/menu.lst:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* per Knoppix &amp;gt;= 3.4 o altre distribuzioni basate su isolinux:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* Note: il parametro fromhd: è la locazione della directory /KNOPPIX &lt;br /&gt;
* reboot è buon divertimento.&lt;br /&gt;
&lt;br /&gt;
==Script Utili al vostro remastering==&lt;br /&gt;
----&lt;br /&gt;
Questa e una struttura di directory raccomandata per il vostro remastering di KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
Il seguente script &amp;quot;remaster&amp;quot; farà il processo di rimasterizzare per voi. Utilizzatelo come root, o vi ritroverete con errori ai diritti di accesso e dell'immagine ISO.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-04-02.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
Il seguente script loop-mount floppy di boot di immagine e di immagine initrd per la modifica. La funzione umount costruire una nuova immagine initrd e reinserirla sul floppy di boot di immagine.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
==Spunti Intorno all'uso di apt-get per installare/update/rimozione applicazioni==&lt;br /&gt;
(by gnarvaja)&lt;br /&gt;
* If you booted from CD, even on a HD install (example: Pivot Install) instead of copying the original CD and KNOPPIX directory to the HD, you can use them directly from their mount points.&lt;br /&gt;
* Another alternative is to mount an ISO image of the original CD as a loop device and mount the KNOPPIX image as a '''cloop''' device. You will save close to 2GB of space. Script to mount from an ISO image:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assumes that the current directory is the working space&lt;br /&gt;
 # original.iso is an image of the CD we will be using as master&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # initialize the compressed loop device&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
&lt;br /&gt;
* Get '''apt-spy''' and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original '''sources.list''' just in case.&lt;br /&gt;
* Another technique is to modify '''sources.list'''. Replace the string '''.de.''' in the ftp addresses (ftp.de.debian.org) with the code corresponding to your country. Examples: USA -&amp;gt; .us. (ftp.us.debian.org), Brazil -&amp;gt; .br. (ftp.br.debian.org). Check the Debian site for debian.org mirrors in your country.&lt;br /&gt;
* Remember to uncomment the '''linuxtag''' ftp addresses to get the latest and greatest from Knoppix&lt;br /&gt;
* Use '''apt-get update''' to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the '''-s''' option to simulate the installation.&lt;br /&gt;
* Before doing the update, I modified my default releases to '''testing''', that means that the software I'll be using will have a good balance of stability and features. Knoppix uses '''unstable''' by default, which is too risky for my personal taste.&lt;br /&gt;
* Get '''[apt-get install] locale''' and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules and localized manual pages.&lt;br /&gt;
* I use '''aptitude''' to get/remove applications, it is character based so it works with init 2. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.&lt;br /&gt;
* When installing applications it is likely that your '''/etc/rc?.d''' directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave '''/etc/rc2.d''' and '''/etc/rc5.d''' as close as the originals as possible and modify '''/etc/rc3.d''' and '''/etc/rc4.d''' to test new stuff. '''Example:''' You may want to have ntfs installed, but not necessarily running by default. Same with apache, mysql and many others.&lt;br /&gt;
* When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other installation utilty. Make sure to check the messages and manually remove those directories.&lt;br /&gt;
* After you are done, '''aptitude''' may leave some files behind. Here's a clean up script I use:&lt;br /&gt;
&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Clean package files generated by aptitude&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
=Problemi Comuni riscontrati=&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] Chroot problems accessing device files&lt;br /&gt;
&lt;br /&gt;
* You've &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt;'d (into whatever window manager you like) and you start a terminal (gnome-terminal, konsole, xterm).  Nothing happens (such is the case in fluxbox, and you'll see an error in you &amp;lt;code&amp;gt;~/.xsession-errors&amp;lt;/code&amp;gt; file).  Or perhaps the error is helpfully displayed: &amp;lt;code&amp;gt;&lt;br /&gt;
  get_pty: not enough ptys&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I had plenty yesterday... but then I &amp;lt;code&amp;gt;chroot&amp;lt;/code&amp;gt;ed so, to solve this, &amp;lt;code&amp;gt;&lt;br /&gt;
  # NOT in your chroot environment&lt;br /&gt;
  cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
  MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
  # enter your chroot environment&lt;br /&gt;
  chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
  # and mount /dev/pts&lt;br /&gt;
  mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
it might give that same &amp;quot;fstab not found&amp;quot; error as mounting proc&lt;br /&gt;
does.  so do what you'd do then, disregard.&lt;br /&gt;
&lt;br /&gt;
start your X up again and try your terminal, should work.&lt;br /&gt;
thanks to: technovelty[http://www.technovelty.org/linux/tips/xinchroot.html] for the final enlightenment&lt;br /&gt;
&lt;br /&gt;
=Altre Indicazioni=&lt;br /&gt;
&lt;br /&gt;
Se la mia guida è troppo confusa, o desideri un secondo parere, guardate questo altro Howto per rimasterizzazione: http://brainstorms.in/?page_id=84 &lt;br /&gt;
Un altro Howto lo trovate qui http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
There is a wizard, which knows all the unpacking, compressing and CD-recording steps mentioned here. It also shows a shell where you can update the uncompressed KNOPPIX system using debian's standard software installation tools. It is called mmkcdrom and part of the plugscript package: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Vedete questo HOWTO, per smanettoni delle shell, a http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Potete dare uno sguardo a [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] per altre idee ad aiuto al vostro remastering.&lt;br /&gt;
&lt;br /&gt;
* Se volete introdurre un kernel personalizzato, vedete questo link [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* Trovate alcune utili quide alla O'Reilly con molte varianti: [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
=Conclusioni=&lt;br /&gt;
Questa è una versione aggiornata del mio howto precedente. Un suggerimento ai principianti del linux; Dovete conoscere bene come utilizzate i comandi del linux e apprendere delle singole funzioni l'esito dei comandi. Evitate se non avete una buona esperienza di Linux potreste fare danni alla Vs. installazione. Continueremo ad aggiornare e dettagliare la procedura in funzione anche dei vostri suggerimenti.&lt;br /&gt;
&lt;br /&gt;
=Ringraziamenti=&lt;br /&gt;
Traduzione a cura di [http://www.mcmax.info mcmax], e a [http://www.knoppix.org knoppix] per le correzioni i trucchi e le idee.  Ritenetevi liberi di operare modifiche per aggiornamenti sulle procedure.&lt;br /&gt;
&lt;br /&gt;
Note sullo swap:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
* German Version: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Spanish Version: [[Knoppix Remastering Howto Spanish]]  en español&lt;br /&gt;
* French Version: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Indonesian Version: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Russian Version: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
* Brazilian Portuguese Version: [[Knoppix Remastering Howto Brazilian Portuguese]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto</id>
		<title>Knoppix Remastering Howto</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto"/>
				<updated>2008-05-19T12:06:34Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide that will show you how to remaster KNOPPIX. (Note: commands should appear on one line, so please maximize the window. If you have any comments/suggestions please post below.)&lt;br /&gt;
&lt;br /&gt;
You may wish to start from an already customized Knoppix, so you don't have to do as much work (such as removing programs). If so, see [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
=System Requirements=&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** at least 1 GB of FREE RAM+Swap total (e.g. 256M ram, and 750M swap AVAILABLE) (unless you use a different compression program - look in this page for compressloop)&lt;br /&gt;
** 3 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB free RAM + swap (for fullsized DVD)&lt;br /&gt;
** 15 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
==Setting up for Remastering==&lt;br /&gt;
# Boot from the ''Knoppix CD''&lt;br /&gt;
# Open a root shell:&lt;br /&gt;
#* Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Root Shell&lt;br /&gt;
#* Note: All commands below are run from this root shell.&lt;br /&gt;
# Configure your Internet connection (we'll need this later). If you use DHCP, it should already be configured.&lt;br /&gt;
#* Note: Run '''ifconfig''' to check.&lt;br /&gt;
# Find the partition you will use to work on. In this example it is called '''hda1''' . The partition should have a minimum of 3 GB free space&lt;br /&gt;
# Mount the partition:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: Make sure that it is read/write or you will get errors when you later chroot. To check: run '''mount'''&lt;br /&gt;
# Create a root directory to work in -- if you put all your files here it will be easy to clean up&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you don't have 1 GB RAM (  '''egrep &amp;quot;(MemTotal|SwapTotal)&amp;quot; /proc/meminfo &amp;amp;&amp;amp; echo &amp;quot;(physical+swap)&amp;quot;''' ) then you will need a swapfile:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;cd /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;dd if=/dev/zero of=swapfile bs=1M count=750&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkswap swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;swapon swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make 2 directories, one for your new Master CD, one for the source, on a disk partition. Also, make additional directories under these named KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now, copy the KNOPPIX files to your source directory :&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: This will take a long time (you are copying 2GB).  Warning: you will be tempted to replace this copy command with a much faster procedure: create an empty directory, then use unionfs to merge the empty directory with /KNOPPIX in order to create the read-write copy.  However, as of Knoppix 4.0.2, there is a bug in unionfs that causes this faster procedure to fail.  For now, stick with the copy-command shown above.&lt;br /&gt;
# Additionally, copy the 'boot' folder from your cdrom - you'll need these files to build the ISO later.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# For Knoppix 5.0.1 you also have to copy the 'modules' folder:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy the main HTML page for the startup page:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy everything necessary files except the ~700 Mb KNOPPIX file.&lt;br /&gt;
#* &amp;lt; 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;gt;= 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* for the DVD Version you have to use -size -15000k and copy the KNOPPIX2 folder like this&lt;br /&gt;
#** &amp;lt;pre&amp;gt;cp -ar /KNOPPIX2/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# setup the environment for chroot&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you see errors regarding &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;, see the [[#Common Problems|common problems]] section&lt;br /&gt;
You are now chrooted. &amp;quot;/&amp;quot; is actually &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Working in the Chroot Environment==&lt;br /&gt;
Remember that anything you do or create in the chrooted environment will get burned to the CD.  If you make any changes (e.g,. to the APT configuration, proxy settings, etc.), make a note to back the changes out before remastering.&lt;br /&gt;
===Internet Access===&lt;br /&gt;
To use the Internet you need to edit &amp;lt;tt&amp;gt;/etc/resolv.conf&amp;lt;/tt&amp;gt; to add your nameserver or exit the chroot and copy the outer &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; into the chroot folder: &lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
(proxies (a.k.a. doing it at work): you can type &amp;quot;export http_proxy=http://your.proxy.com:&amp;lt;port&amp;gt;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
To check your chrooted internet connection,&lt;br /&gt;
 ping google.com&lt;br /&gt;
(if ICMP is barred at some corporate firewall or something then try &amp;quot;lynx http://www.google.com&amp;quot; and see if you get the page -after a cookie &amp;quot;allow&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===SMB access===&lt;br /&gt;
Also change smb.conf to your MS group if you want smbd support (MSHOME is XP Home ed. usually, and WORKGROUP is 9x Windows)&lt;br /&gt;
===APT===&lt;br /&gt;
Update your package list with '''apt-get update'''.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: If ''''apt-get update''' fails with &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, you need to make sure your chrooted environment is mounted without the &amp;quot;nodev&amp;quot; option. (see above where it talks about the /dev/null errors when entering the chroot environment for the first time)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Warning''': apt-get upgrade is a ''BAD IDEA''. It will, quite probably, render your KNOPPIX remaster unbootable, or broken in some way. A far safer method is to only upgrade packages as necessary.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note: If apt-get fails with &amp;quot;Dynamic NMap ran out of room&amp;quot; ''' you might try this little gem, which fixed the problem for me:&lt;br /&gt;
 #echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&lt;br /&gt;
(I did this while chrooted as described above.)&lt;br /&gt;
&lt;br /&gt;
Before you can add stuff, you will probably need to remove some packages.  To get a list of packages installed, type this:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
If you are looking for big installed packages then the command&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
will list the  packages  with size in descending order.&lt;br /&gt;
&lt;br /&gt;
At least ten times faster is the command&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
and you don't need dpkg-awk or awk or perl; however it does not exclude packages that are not installed.  If you have trouble with the above sort command, try using KPackage, expanded all the trees and sorted by the size column to find big packages.&lt;br /&gt;
&lt;br /&gt;
Or, you could use this command to get the qpkg-query speed with the non-installed packages not listed:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
It does the same thing as above, I assume.  I couldn't get the first one to work because I don't have dpkg-awk.&lt;br /&gt;
&lt;br /&gt;
To remove a package (and all packages dependant on it), type this:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
To check for orphaned packages, type this:&lt;br /&gt;
 deborphan&lt;br /&gt;
Want to save more space by getting rid of those pesky orphans (how cruel!), type this ('''Warning''', you won't be prompted yes/no to remove these packages.  When you press Enter after this command, those packages ''will be gone''):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
Now the good stuff.  If you wish to add a package, type this:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
What, don't know what packages to install?  Type this.  When the list appears, you can peruse (over 13k lines!) or search for things using &amp;lt;tt&amp;gt;/''search-term''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
When you're done removing and adding packages, a good way to clean up is by typing this&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Also, because the Debian package system keeps a cache of downloaded packages, you may want to run the following to clear out those spare files:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
===User Settings===&lt;br /&gt;
User settings are in /etc/skel.  This directory will be copied to make new user home directories.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;tip: don't put files in /root they will be only available (at runtime) in /KNOPPIX/root&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the default user 'knoppix' is not created by adduser(1), thus /etc/skel is not copied completely but rather selectively.  That is, to make a file .xyrc appear in /home/knoppix, it is not sufficient to place it in /etc/skel.  One possibility is to extend the code in /etc/X11/Xsession.d/45xsession which is responsible for filling /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
===Autorunning Programs===&lt;br /&gt;
When you want to autorun some programs, one can create a script and put it in the directory &amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt; (This only loads items before X loads).  Read up on the SysV init process for more possibilities.&lt;br /&gt;
&lt;br /&gt;
''For X-programs consider &amp;lt;tt&amp;gt;/home/knoppix/.kde/Autostart&amp;lt;/tt&amp;gt; but this may transfer form &amp;lt;tt&amp;gt;/etc/skel/.kde/Autostart&amp;lt;/tt&amp;gt; on boot''--[[User:12.106.237.2|12.106.237.2]] 18:08, 7 December 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Editing the KNOPPIX auto-configuration script==&lt;br /&gt;
You can find a lot of interesting information about how KNOPPIX auto-configures you system by looking in the /etc/init.d/knoppix-autoconfig script. Of particular note are the following.&lt;br /&gt;
&lt;br /&gt;
===Changing the default KDE background image===&lt;br /&gt;
The auto-configuration script sets the default KDE background image to be an image from the CD-ROM. An image that you can easily change when you are remastering KNOPPIX.&lt;br /&gt;
** In KNOPPIX 3.3 and below it is /cdrom/KNOPPIX/background.gif&lt;br /&gt;
** In KNOPPIX 3.4 and above it is /cdrom/KNOPPIX/background.jpg&lt;br /&gt;
&lt;br /&gt;
===Editing floppy and CD-ROM use or adding a custom script===&lt;br /&gt;
The auto-configuration script sets up both your CD-ROM and your floppy disk. The commands for doing this are 'floppyconfig' and 'cdromconfig', respectively. The auto-configuration script will also run cdrom/KNOPPIX/knoppix.sh, which is an easy script to change when remastering KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
===Changing the default boot parameters===&lt;br /&gt;
All boot parameters obtain default values from the /etc/init.d/knoppix-autoconfig script. This is one massive BASH script (you best know your BASH to play with this), but it is the place that you can edit any of the default boot parameters.  For example, to switch from 'kde' to 'twm' as default desktop just search for the place where 'kde' is provided as default value (variable DESKTOP, IIRC). Another example would be changing the default language.&lt;br /&gt;
&lt;br /&gt;
Note, if you are interested in changing the default language KDE uses, the easiest thing to do is to load KDE, instructions are below, and use the KDE configuration utility to select your language of interest.&lt;br /&gt;
&lt;br /&gt;
==X Session Configuration==&lt;br /&gt;
When working with X-based programs you will have to make sure that your display is set appropriately. You can do this manually when remastering KNOPPIX. Also, two scripts related to X Session is where you can change or disable the startup and shutdown sounds.&lt;br /&gt;
&lt;br /&gt;
===Starting X-based programs===&lt;br /&gt;
When testing X-based programs, you will have to &lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
which will allow you to connect to your normal X session.  Alternately (if you need to test window managers), you can create a nested X session.  Outside of the chroot, run&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
Within the chroot, set your DISPLAY variable&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
&lt;br /&gt;
Interesting stuff in /etc/init.d/xsession :&lt;br /&gt;
* it ALSO sets background as /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the startup sound===&lt;br /&gt;
The startup sound is played by /etc/X11/Xsession.d/45xsession. You can disable it by commenting out the following lines.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the shutdown sound===&lt;br /&gt;
The shutdown sound is played by /etc/init.d/xsession. You can disable it by commenting out lines 210-220 from the script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change default window manager===&lt;br /&gt;
&lt;br /&gt;
Open /etc/init.d/knoppix-autoconfig and look for lines which look like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Allow only supported windowmanagers                                           &lt;br /&gt;
# Actually, this check is useless because it's done again in 45xsession. -KK    &lt;br /&gt;
# case &amp;quot;$DESKTOP&amp;quot; in gnome|enlightenment|kde|larswm|xfce|xfce4|lg3d|ratpoison|blackbox|openbox|windowmaker|wmaker|icewm|fluxbox|twm|nx|rdp|kiosk) ;; *) DESKTOP=&amp;quot;kde&amp;quot;; ;; esac                                                                  &lt;br /&gt;
[ -n &amp;quot;$DESKTOP&amp;quot; ] || DESKTOP=&amp;quot;kde&amp;quot;                                          &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change &amp;quot;kde&amp;quot; in the last quoted line to whatever you like, for example to &amp;quot;fluxbox&amp;quot; or &amp;quot;twm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Changing the boot graphic, boot message, and startup script text==&lt;br /&gt;
While you are in the chroot environment you can easily change the boot messages, the boot graphic, and the default KDE background graphic.&lt;br /&gt;
&lt;br /&gt;
===Changing the boot graphic===&lt;br /&gt;
The 'boot graphic' is the first image you see when the CD or DVD boots. It looks similar to ASCII art and it is normally something flashy that says 'Knoppix'. You can change this to be any graphic that you please, but you must use a 640x400 graphic that has only 16 colors.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old logo in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a 640x400 pixel 16 color graphic and save it as a GIF, e.g. 'logo.16.gif'. GIMP can easily do this. Note, you can use a graphic that originally had more than 16 colors, but it is critical that you convert the graphic to 16 colors before doing the next step. &lt;br /&gt;
#Convert the GIF to lss16 using the tools included on the Knoppix CD.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the boot message===&lt;br /&gt;
The 'boot message' is the message that you see under the 'boot graphic' on the initial screen when the Knoppix CD or DVD loads. It normally says something along the lines of Knoppix with the version number and includes a link to the Knoppix website. You can change this text to be whatever you please, but you shouldn't add too much text or it will make the boot screen look funny. Restricting yourself to a single line of text that is no larger than the default one is a good idea.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old message in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the message with a text editor. You'll see at the top of the message that it shows the graphic. Don't change this text, just the line under.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the startup script text===&lt;br /&gt;
The 'startup script text' is the text that you see after the initial boot screen, while Knoppix loads and configures your system. You can change as much of this text as you please. You can even add addition lines to the script; however, it is recommended that you don't play with this file. Limiting yourself to editing the 'Welcome to KNOPPIX' message is a good idea. &lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old minirt.gz in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Uncompress minirt.gz&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a temporary directory to mount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Mount the minirt filesystem as an ext2 filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#::or if the above does not work use&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o loop&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the linuxrc script to display the message you want. You'll find the default message approximately 2 pages down and it'll be using several colors, i.e. ${WHITE}, ${RED}, etc., so it might be slightly tricky to spot.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#unmount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Compress the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove your temporary directory.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching KDE to Change Menus, Icons, etc.==&lt;br /&gt;
While you are in the chroot environment you can load KDE and use the configuration tools to change buttons, icons, etc. Once you are finished you can exit KDE and copy /home/knoppix to /etc/skel to keep these changes. To load KDE do the following.&lt;br /&gt;
&lt;br /&gt;
#If you are not at runlevel 2 (i.e. if you are already in KDE), switch to runlevel 2.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /etc/skel to /home/knoppix&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Change permissions to the user 'knoppix'&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy over your X11 configuration to the chroot'd environment (press ctrl+alt+F2 to switch to a non-chroot'd terminal, then ctrl+alt+F1 to switch back when done)&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*&amp;lt;blockquote&amp;gt;'' Knoppix 3.7: I think it's XF86Config-4 rather than xorg.conf.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#(Optional)Switch to user 'knoppix'. If you want to uninstall packages, stay as root -- e.g. skip this step. If you want to configure the buttons, icons, background, etc., that you see when KDE boots, be sure to do this step.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Launch KDE&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Do your KDE changes&lt;br /&gt;
##Exit KDE&lt;br /&gt;
##Exit su and switch back to user 'root'.&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /home/knoppix back to /etc/skel to keep the changes&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; mv /etc/skel /etc/skel-old&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Set the owner back to root&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove the xorg.conf file&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you find that some of your settings are not persistent after booting the new image, check the initialization file at /etc/X11/Xsession.d/45xsession.  By default, Knoppix does '''not''' simply copy over all files from /etc/skel.  You may need to make modifications here if you wish to do something different.&lt;br /&gt;
&lt;br /&gt;
===Changing the ksplash KDE graphics===&lt;br /&gt;
You can change the graphics that KDE shows via ksplash when it first loads. These graphics are in the &amp;lt;b&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/b&amp;gt; directory. You'll most likely want to swap out &amp;lt;b&amp;gt;splash_top.png&amp;lt;/b&amp;gt; for a custom 400x248 PNG graphic. Note that ksplash will not automatically put a border around your graphic. If you'd like a border, you have to manually add it to your graphic.&lt;br /&gt;
&lt;br /&gt;
==Leaving the Chroot==&lt;br /&gt;
If you mounted it, you'll need to unmount /proc - very important! &lt;br /&gt;
 umount /proc&lt;br /&gt;
Press '''CTRL+D''' to leave being chrooted.&lt;br /&gt;
&lt;br /&gt;
==Re-Entering the chroot==&lt;br /&gt;
If you've left the chroot, but you want to go back in and modify some things...&lt;br /&gt;
&lt;br /&gt;
Remount the local hard disk (if needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setup the environment for chroot&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&lt;br /&gt;
mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remastering the ISO==&lt;br /&gt;
We've finished customizing and ready to burn!&lt;br /&gt;
First do some cleanup: &lt;br /&gt;
* remove any .bash_history files, tmp files, etc.&lt;br /&gt;
* back out any changes you don't want burned back to the disc&lt;br /&gt;
* make sure you umount /proc /dev /sys or mkisofs will not work properly&lt;br /&gt;
* &amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===KNOPPIX Compressed Image===&lt;br /&gt;
Now we'll make the big &amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt; file which is an ISO 9660 filesystem compressed for use by the &amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt; driver: &lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
      -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
   | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
the &amp;quot;www.knoppix.net&amp;quot; and &amp;quot;Knoppix.net filesystem&amp;quot; can be changed to what you want to call the file. You will get an error that it doesn't conform to ISO standards -- you can ignore this.  Note that, to run &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;, you'll need to have enough space to store the entire ISO in RAM/swap.  Ensure you have at least 800M of free space before starting.&lt;br /&gt;
&lt;br /&gt;
In Knoppix 3.4 the &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt; script has been updated so be sure to use it to obtain the best result. It has a new option '''-b''' (best), which enables the best compression by using different compression schemes and tries to optimize that way, but be careful, because that option is slow (10x slower).&lt;br /&gt;
&lt;br /&gt;
Note: The above didn't work for me using the latest create_compressed_fs. I could create the ISO but it couldn't read the compressed image properly when booting (I/O errors when reading the cloop0 device). I think this was because create_compressed_fs didn't have enough RAM and it was just failing silently. The command below did work though. It uses a file rather than memory for temporary storage:&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
    65536 -f /mnt/hda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
------I tried this ,but it report a error,so i think there is some mistake in the command,it may be like follow,tell me if anyone confirm it-------&lt;br /&gt;
----------(by zhblue(newsclanATgmail.com))-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -b \&lt;br /&gt;
    -f /mnt/hda1/isotemp -B 65536 - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
I noted several problems with the commands above:&amp;lt;br&amp;gt;&lt;br /&gt;
1) The option &amp;quot;-no-bak&amp;quot; excludes files with the ending &amp;quot;.bak&amp;quot;. Non-backup files with this ending are found in some software packages, e.g. glest. It is safer not to use this option.&amp;lt;br&amp;gt;&lt;br /&gt;
2) Just calling &amp;quot;create_compressed_fs - 65536&amp;quot; gives a warning about old command syntax. The compatible parameters are &amp;quot;-m -B 65536&amp;quot;. The later examples here already fixed this, the first example still uses the deprecated version.&lt;br /&gt;
&lt;br /&gt;
===Live CD ISO===&lt;br /&gt;
If all went well, onto making the final CD-ROM Image:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(this will update the md5 hashes of the files included in the ISO, used for integrity checking) Now to burn the image; for Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(the ISO is stored in &amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Burn the ISO using your favorite tools, and you're ready!&lt;br /&gt;
&lt;br /&gt;
==How to add new device driver to KNOPPIX==&lt;br /&gt;
&lt;br /&gt;
Recently in a client project, I added the Digital Persona’s finger print driver to the Knoppix 5.1 distribution as an embedded solution to this project. This is a typical case where both the kernel level driver and the user level drivers and libraries are involved. &lt;br /&gt;
&lt;br /&gt;
Most of the Knoppix books and online documentation have documented about how to keep a persistent storage of user configuration and user data. But those persistent configuration only saves the data in /home and /etc directories. If you have added kernel level drivers and/or other system libraries which are not in above two directories, you have to save the file images as a whole right after the boot. The saved file image can be big and may not what you want as a regular usage model. If you are building a customed Knoppix image for a long term solution, definitely you want to remaster the Knoppix to make the new drives be a permanent part of it.&lt;br /&gt;
&lt;br /&gt;
The Digital Persona’s OneTouch SDK for their finger print scanner driver comes with a kernel level driver source code, plus a set of user level application libraries, as well as a sample test application.  The SDK do not have a ready made binary for Debian or Knoppix. So I have to compile it from the source SDK.  However, the CD version of Knoppix 5.1 do not even come with the source include header files to compile a kernel level driver. So I have to compile it under the DVD version of the Knoppix 5.1 and copy the compiled binary to the CD version of Knoppix 5.1 to do testing and remastering. The steps I have tried to make it work under Knoppix are as follows:&lt;br /&gt;
&lt;br /&gt;
1.	First compile the driver under DVD version of the Knoppix. Change the source code build scripts so that the include files and library path are matching what we have in Knoppix. The details are specific to the OneTouch SDK itself. If you are interested about this detail, write to me.&lt;br /&gt;
&lt;br /&gt;
2.	Install the just built kernel driver, the user libraries to their regular location as we will show in following step 4. And then build and run their sample applications per Digital Persona’s instruction. This proves that the basic kernel module build steps are built correctly and the user level libraries are working properly in a standard installation. This is important before we moved to chroot environment to make this changes permanent to our remastered Knoppix.&lt;br /&gt;
&lt;br /&gt;
3.	Then I followed the Knoppix remastering instructions documented in the book of “Live Linux CD” by Christoper Negus.&lt;br /&gt;
&lt;br /&gt;
4.	In the above remastering instructions, there is a step to update all the Debian packages and other software under the chroot environment.  It is at this step that I re-run the drivers installation steps like I have done in above step 2 in the real root environment.  In this particular case, it is make a directory and copy the kernel module file mod_usbdpfp.ko to that directory as follows:&lt;br /&gt;
&lt;br /&gt;
mkdir /lib/modules/2.6.19/kernel/drivers/biometric&lt;br /&gt;
cp mod_usbdpfp.ko /lib/modules/2.6.19/mod_usbdpfp.ko&lt;br /&gt;
&lt;br /&gt;
And also copy all those Digital Persona user level libraries to following location:&lt;br /&gt;
&lt;br /&gt;
cp libdpfp* /usr/lib&lt;br /&gt;
&lt;br /&gt;
5.	I then run /sbin/depmod to let system detects the new kernel mode driver I have installed. This will refresh the /dev directory so it will have entries like:&lt;br /&gt;
&lt;br /&gt;
/dev/usbdpfpPNP&lt;br /&gt;
/dev/usbdpfp0&lt;br /&gt;
&lt;br /&gt;
At this time, if all works right, when you run command lsmod, you will also see something like:&lt;br /&gt;
&lt;br /&gt;
	mod_usbdpfp&lt;br /&gt;
&lt;br /&gt;
shows up in the loaded module list&lt;br /&gt;
&lt;br /&gt;
6.	At this time, you are ready to make a remaster of the Knoppix. Next time when you boot up with this remastered Knoppix, it will have the kernel driver and user level libraries setup ready for you to run the sample applications. Just as if you have done above step 2 and step 4 right after a refresh reboot from the original Knoppix CD.     &lt;br /&gt;
&lt;br /&gt;
John Xu, USA.  ( johnxu at n2k.net )&lt;br /&gt;
&lt;br /&gt;
=Tips=&lt;br /&gt;
I have had good results remastering working from the CD as root working from fluxbox. Just say &amp;quot;knoppix 2&amp;quot; at the boot prompt and it will boot you to a root prompt where you can then say &amp;quot;startx /usr/bin/fluxbox&amp;quot;. I like to use the xterm unicode shell.&lt;br /&gt;
&lt;br /&gt;
==Package Management==&lt;br /&gt;
While working chroot doing the remastering I like to use &lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
to remove packages because before it does anything it will stop and show details on what it is fixing to remove and let you say &amp;quot;yes or no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you don't use the above &amp;quot;apt-get&amp;quot; instructions and have a lot to cleanup and purge, here's the easy way to do it: &lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge&lt;br /&gt;
That will make a list of all removed packages to purge and then you just say &lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
and you're all done. &lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
is a one-line version of this. Also use &lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
==Alternatives for Low-Memory Machines==&lt;br /&gt;
You don't really need 1G swap as there are two new tools to create compressed filesystems. Here are some candidates to make ''compressed'' fs:&lt;br /&gt;
* Valentijn's rewrite [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Quozl's port of compressloop for Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Quozl's distributed compressloop (use more than one processor to speed things up) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Justin's patch [http://s.bouncybouncy.net/~justin/code/] (link broken) I also just wrote a distributed cloop compressor(or for smp)  It's in that same directory.&lt;br /&gt;
&lt;br /&gt;
==Test CD Image Without Burning a CD==&lt;br /&gt;
If you have a spare partition with at least 700MB free space formatted with ext2, ext3 or Vfat, you can use this for test by booting from a floppy disk. A floppy boot will look for a partiton with /KNOPPIX/ in the root, and the compressed image /KNOPPIX/KNOPPIX. Instead of using the sub-directory /mnt/hda1/knx/master/KNOPPIX/ as described above, it should be called /mnt/hda2/KNOPPIX/ . The root index.html will then be located at /mnt/hda2/index.html and the compressed image will be at /mnt/hda2/KNOPPIX/KNOPPIX . Now you can boot from floppy and use /mnt/hda2 as your image. For further information see [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
If you don't have an extra partition or you don't want to do so much for it, you can use Qemu ( see [http://fabrice.bellard.free.fr/qemu/] ) with the ISO image like this:&lt;br /&gt;
 qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -net user&lt;br /&gt;
You even do not have to build a hard disk image before, just install Qemu and try this. Amazing!&lt;br /&gt;
&lt;br /&gt;
==Test remastered version without creating cloop file/iso==&lt;br /&gt;
i use a setup similar to knoppix terminal server to test the remastered files without having to recreate a&lt;br /&gt;
cloop image every time: the remastered files live in an ext2 filesytem in a loopfile (knoppix_loop) mounted rw (this is where i chroot in). when i want to test the current setup, i have another machine network boot and use the files from the loopfile directly (needs another miniroot.gz). See [[User:Ml#dev_setup]]&lt;br /&gt;
&lt;br /&gt;
If you want to use only one machine, you'll have to reboot (or use qemu) and use the &amp;quot;loopfile&amp;quot; and &amp;quot;fromhd&amp;quot; cheatcodes (see [[User:Ml#miniroot_changes]]). For example, this is what my grub boot entry looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title           Remastered Knoppix&lt;br /&gt;
root            (hd0,0)&lt;br /&gt;
kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Booting Knoppix images with GRUB==&lt;br /&gt;
* First copy /boot off the Knoppix cd to your boot partition (or even your dos partition). I named mine boot.knoppix&lt;br /&gt;
Copy the master/KNOPPIX directory to your root directory of any hard disk. You may place it somewhere other than the boot partition (ext2/3, reiserfs, vfat are supported).&lt;br /&gt;
* for Knoppix &amp;lt;= 3.3, put the following in your /boot/grub/menu.lst:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* notice the fromhd parameter: it's the location of the /KNOPPIX directory&lt;br /&gt;
* reboot and have fun.&lt;br /&gt;
&lt;br /&gt;
==Helpful Scripts==&lt;br /&gt;
----&lt;br /&gt;
This is the recommended directory layout for remastering KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
the following script &amp;quot;remaster&amp;quot; will do the remaster process for you. Use as root, or you will end up with wrong access rights in the image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-04-02.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
The following script will loop-mount boot floppy image and initrd image for modification. The umount function will build a new initrd image and put it back on the boot floppy image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
==Tips around apt-get to install/update/remove applications==&lt;br /&gt;
(by gnarvaja)&lt;br /&gt;
* If you booted from CD, even on a HD install (example: Pivot Install) instead of copying the original CD and KNOPPIX directory to the HD, you can use them directly from their mount points.&lt;br /&gt;
* Another alternative is to mount an ISO image of the original CD as a loop device and mount the KNOPPIX image as a '''cloop''' device. You will save close to 2GB of space. Script to mount from an ISO image:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assumes that the current directory is the working space&lt;br /&gt;
 # original.iso is an image of the CD we will be using as master&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # initialize the compressed loop device&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
&lt;br /&gt;
* Get '''apt-spy''' and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original '''sources.list''' just in case.&lt;br /&gt;
* Another technique is to modify '''sources.list'''. Replace the string '''.de.''' in the ftp addresses (ftp.de.debian.org) with the code corresponding to your country. Examples: USA -&amp;gt; .us. (ftp.us.debian.org), Brazil -&amp;gt; .br. (ftp.br.debian.org). Check the Debian site for debian.org mirrors in your country.&lt;br /&gt;
* Remember to uncomment the '''linuxtag''' ftp addresses to get the latest and greatest from Knoppix&lt;br /&gt;
* Use '''apt-get update''' to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the '''-s''' option to simulate the installation.&lt;br /&gt;
* Before doing the update, I modified my default releases to '''testing''', that means that the software I'll be using will have a good balance of stability and features. Knoppix uses '''unstable''' by default, which is too risky for my personal taste.&lt;br /&gt;
* Get '''[apt-get install] locale''' and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules and localized manual pages.&lt;br /&gt;
* I use '''aptitude''' to get/remove applications, it is character based so it works with init 2. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.&lt;br /&gt;
* When installing applications it is likely that your '''/etc/rc?.d''' directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave '''/etc/rc2.d''' and '''/etc/rc5.d''' as close as the originals as possible and modify '''/etc/rc3.d''' and '''/etc/rc4.d''' to test new stuff. '''Example:''' You may want to have ntfs installed, but not necessarily running by default. Same with apache, mysql and many others.&lt;br /&gt;
* When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other installation utilty. Make sure to check the messages and manually remove those directories.&lt;br /&gt;
* After you are done, '''aptitude''' may leave some files behind. Here's a clean up script I use:&lt;br /&gt;
&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Clean package files generated by aptitude&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
=Common Problems=&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] Chroot problems accessing device files&lt;br /&gt;
&lt;br /&gt;
* You've &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt;'d (into whatever window manager you like) and you start a terminal (gnome-terminal, konsole, xterm).  Nothing happens (such is the case in fluxbox, and you'll see an error in you &amp;lt;code&amp;gt;~/.xsession-errors&amp;lt;/code&amp;gt; file).  Or perhaps the error is helpfully displayed: &amp;lt;code&amp;gt;&lt;br /&gt;
  get_pty: not enough ptys&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I had plenty yesterday... but then I &amp;lt;code&amp;gt;chroot&amp;lt;/code&amp;gt;ed so, to solve this, &amp;lt;code&amp;gt;&lt;br /&gt;
  # NOT in your chroot environment&lt;br /&gt;
  cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
  MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
  # enter your chroot environment&lt;br /&gt;
  chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
  # and mount /dev/pts&lt;br /&gt;
  mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
it might give that same &amp;quot;fstab not found&amp;quot; error as mounting proc&lt;br /&gt;
does.  so do what you'd do then, disregard.&lt;br /&gt;
&lt;br /&gt;
start your X up again and try your terminal, should work.&lt;br /&gt;
thanks to: technovelty[http://www.technovelty.org/linux/tips/xinchroot.html] for the final enlightenment&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
If my howto is too confusing, or you'd like a second opinion, check out charan's very nice remastering howto: http://brainstorms.in/?page_id=84&lt;br /&gt;
Another Howto is at  http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
There is a wizard, which knows all the unpacking, compressing and CD-recording steps mentioned here. It also shows a shell where you can update the uncompressed KNOPPIX system using debian's standard software installation tools. It is called mmkcdrom and part of the plugscript package: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Yet another HOWTO, for shell freaks, is at http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Be sure to check out the [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] for ideas and help with remastering.&lt;br /&gt;
&lt;br /&gt;
* If you want to add a custom kernel, check out the [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* There also a guide at O'Reilly on the same topic : [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
Thats it. This is an updated version of my previous howto. This is not meant for linux beginners, you will need to know your way around linux to get this to work. I'll update this as corrections/improvements/etc come through.&lt;br /&gt;
&lt;br /&gt;
=Thanks=&lt;br /&gt;
Thanks to aay, charan, Tech2k, and #knoppix for some corrections and tips and ideas.  Feel free to edit or add to this howto.&lt;br /&gt;
Note about swap:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
* German Version: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Spanish Version: [[Knoppix Remastering Howto Spanish]]  en español&lt;br /&gt;
* French Version: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Indonesian Version: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Russian Version: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
* Brazilian Portuguese Version: [[Knoppix Remastering Howto Brazilian Portuguese]]&lt;br /&gt;
* Italian Version: [[Knoppix Remastering Howto Italiano]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto</id>
		<title>Knoppix Remastering Howto</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto"/>
				<updated>2008-05-19T11:57:19Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide that will show you how to remaster KNOPPIX. (Note: commands should appear on one line, so please maximize the window. If you have any comments/suggestions please post below.)&lt;br /&gt;
&lt;br /&gt;
You may wish to start from an already customized Knoppix, so you don't have to do as much work (such as removing programs). If so, see [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
=System Requirements=&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** at least 1 GB of FREE RAM+Swap total (e.g. 256M ram, and 750M swap AVAILABLE) (unless you use a different compression program - look in this page for compressloop)&lt;br /&gt;
** 3 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB free RAM + swap (for fullsized DVD)&lt;br /&gt;
** 15 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
==Setting up for Remastering==&lt;br /&gt;
# Boot from the ''Knoppix CD''&lt;br /&gt;
# Open a root shell:&lt;br /&gt;
#* Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Root Shell&lt;br /&gt;
#* Note: All commands below are run from this root shell.&lt;br /&gt;
# Configure your Internet connection (we'll need this later). If you use DHCP, it should already be configured.&lt;br /&gt;
#* Note: Run '''ifconfig''' to check.&lt;br /&gt;
# Find the partition you will use to work on. In this example it is called '''hda1''' . The partition should have a minimum of 3 GB free space&lt;br /&gt;
# Mount the partition:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: Make sure that it is read/write or you will get errors when you later chroot. To check: run '''mount'''&lt;br /&gt;
# Create a root directory to work in -- if you put all your files here it will be easy to clean up&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you don't have 1 GB RAM (  '''egrep &amp;quot;(MemTotal|SwapTotal)&amp;quot; /proc/meminfo &amp;amp;&amp;amp; echo &amp;quot;(physical+swap)&amp;quot;''' ) then you will need a swapfile:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;cd /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;dd if=/dev/zero of=swapfile bs=1M count=750&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkswap swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;swapon swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make 2 directories, one for your new Master CD, one for the source, on a disk partition. Also, make additional directories under these named KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now, copy the KNOPPIX files to your source directory :&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: This will take a long time (you are copying 2GB).  Warning: you will be tempted to replace this copy command with a much faster procedure: create an empty directory, then use unionfs to merge the empty directory with /KNOPPIX in order to create the read-write copy.  However, as of Knoppix 4.0.2, there is a bug in unionfs that causes this faster procedure to fail.  For now, stick with the copy-command shown above.&lt;br /&gt;
# Additionally, copy the 'boot' folder from your cdrom - you'll need these files to build the ISO later.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# For Knoppix 5.0.1 you also have to copy the 'modules' folder:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy the main HTML page for the startup page:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy everything necessary files except the ~700 Mb KNOPPIX file.&lt;br /&gt;
#* &amp;lt; 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;gt;= 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* for the DVD Version you have to use -size -15000k and copy the KNOPPIX2 folder like this&lt;br /&gt;
#** &amp;lt;pre&amp;gt;cp -ar /KNOPPIX2/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# setup the environment for chroot&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you see errors regarding &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;, see the [[#Common Problems|common problems]] section&lt;br /&gt;
You are now chrooted. &amp;quot;/&amp;quot; is actually &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Working in the Chroot Environment==&lt;br /&gt;
Remember that anything you do or create in the chrooted environment will get burned to the CD.  If you make any changes (e.g,. to the APT configuration, proxy settings, etc.), make a note to back the changes out before remastering.&lt;br /&gt;
===Internet Access===&lt;br /&gt;
To use the Internet you need to edit &amp;lt;tt&amp;gt;/etc/resolv.conf&amp;lt;/tt&amp;gt; to add your nameserver or exit the chroot and copy the outer &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; into the chroot folder: &lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
(proxies (a.k.a. doing it at work): you can type &amp;quot;export http_proxy=http://your.proxy.com:&amp;lt;port&amp;gt;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
To check your chrooted internet connection,&lt;br /&gt;
 ping google.com&lt;br /&gt;
(if ICMP is barred at some corporate firewall or something then try &amp;quot;lynx http://www.google.com&amp;quot; and see if you get the page -after a cookie &amp;quot;allow&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===SMB access===&lt;br /&gt;
Also change smb.conf to your MS group if you want smbd support (MSHOME is XP Home ed. usually, and WORKGROUP is 9x Windows)&lt;br /&gt;
===APT===&lt;br /&gt;
Update your package list with '''apt-get update'''.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: If ''''apt-get update''' fails with &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, you need to make sure your chrooted environment is mounted without the &amp;quot;nodev&amp;quot; option. (see above where it talks about the /dev/null errors when entering the chroot environment for the first time)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Warning''': apt-get upgrade is a ''BAD IDEA''. It will, quite probably, render your KNOPPIX remaster unbootable, or broken in some way. A far safer method is to only upgrade packages as necessary.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note: If apt-get fails with &amp;quot;Dynamic NMap ran out of room&amp;quot; ''' you might try this little gem, which fixed the problem for me:&lt;br /&gt;
 #echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&lt;br /&gt;
(I did this while chrooted as described above.)&lt;br /&gt;
&lt;br /&gt;
Before you can add stuff, you will probably need to remove some packages.  To get a list of packages installed, type this:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
If you are looking for big installed packages then the command&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
will list the  packages  with size in descending order.&lt;br /&gt;
&lt;br /&gt;
At least ten times faster is the command&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
and you don't need dpkg-awk or awk or perl; however it does not exclude packages that are not installed.  If you have trouble with the above sort command, try using KPackage, expanded all the trees and sorted by the size column to find big packages.&lt;br /&gt;
&lt;br /&gt;
Or, you could use this command to get the qpkg-query speed with the non-installed packages not listed:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
It does the same thing as above, I assume.  I couldn't get the first one to work because I don't have dpkg-awk.&lt;br /&gt;
&lt;br /&gt;
To remove a package (and all packages dependant on it), type this:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
To check for orphaned packages, type this:&lt;br /&gt;
 deborphan&lt;br /&gt;
Want to save more space by getting rid of those pesky orphans (how cruel!), type this ('''Warning''', you won't be prompted yes/no to remove these packages.  When you press Enter after this command, those packages ''will be gone''):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
Now the good stuff.  If you wish to add a package, type this:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
What, don't know what packages to install?  Type this.  When the list appears, you can peruse (over 13k lines!) or search for things using &amp;lt;tt&amp;gt;/''search-term''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
When you're done removing and adding packages, a good way to clean up is by typing this&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Also, because the Debian package system keeps a cache of downloaded packages, you may want to run the following to clear out those spare files:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
===User Settings===&lt;br /&gt;
User settings are in /etc/skel.  This directory will be copied to make new user home directories.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;tip: don't put files in /root they will be only available (at runtime) in /KNOPPIX/root&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the default user 'knoppix' is not created by adduser(1), thus /etc/skel is not copied completely but rather selectively.  That is, to make a file .xyrc appear in /home/knoppix, it is not sufficient to place it in /etc/skel.  One possibility is to extend the code in /etc/X11/Xsession.d/45xsession which is responsible for filling /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
===Autorunning Programs===&lt;br /&gt;
When you want to autorun some programs, one can create a script and put it in the directory &amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt; (This only loads items before X loads).  Read up on the SysV init process for more possibilities.&lt;br /&gt;
&lt;br /&gt;
''For X-programs consider &amp;lt;tt&amp;gt;/home/knoppix/.kde/Autostart&amp;lt;/tt&amp;gt; but this may transfer form &amp;lt;tt&amp;gt;/etc/skel/.kde/Autostart&amp;lt;/tt&amp;gt; on boot''--[[User:12.106.237.2|12.106.237.2]] 18:08, 7 December 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Editing the KNOPPIX auto-configuration script==&lt;br /&gt;
You can find a lot of interesting information about how KNOPPIX auto-configures you system by looking in the /etc/init.d/knoppix-autoconfig script. Of particular note are the following.&lt;br /&gt;
&lt;br /&gt;
===Changing the default KDE background image===&lt;br /&gt;
The auto-configuration script sets the default KDE background image to be an image from the CD-ROM. An image that you can easily change when you are remastering KNOPPIX.&lt;br /&gt;
** In KNOPPIX 3.3 and below it is /cdrom/KNOPPIX/background.gif&lt;br /&gt;
** In KNOPPIX 3.4 and above it is /cdrom/KNOPPIX/background.jpg&lt;br /&gt;
&lt;br /&gt;
===Editing floppy and CD-ROM use or adding a custom script===&lt;br /&gt;
The auto-configuration script sets up both your CD-ROM and your floppy disk. The commands for doing this are 'floppyconfig' and 'cdromconfig', respectively. The auto-configuration script will also run cdrom/KNOPPIX/knoppix.sh, which is an easy script to change when remastering KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
===Changing the default boot parameters===&lt;br /&gt;
All boot parameters obtain default values from the /etc/init.d/knoppix-autoconfig script. This is one massive BASH script (you best know your BASH to play with this), but it is the place that you can edit any of the default boot parameters.  For example, to switch from 'kde' to 'twm' as default desktop just search for the place where 'kde' is provided as default value (variable DESKTOP, IIRC). Another example would be changing the default language.&lt;br /&gt;
&lt;br /&gt;
Note, if you are interested in changing the default language KDE uses, the easiest thing to do is to load KDE, instructions are below, and use the KDE configuration utility to select your language of interest.&lt;br /&gt;
&lt;br /&gt;
==X Session Configuration==&lt;br /&gt;
When working with X-based programs you will have to make sure that your display is set appropriately. You can do this manually when remastering KNOPPIX. Also, two scripts related to X Session is where you can change or disable the startup and shutdown sounds.&lt;br /&gt;
&lt;br /&gt;
===Starting X-based programs===&lt;br /&gt;
When testing X-based programs, you will have to &lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
which will allow you to connect to your normal X session.  Alternately (if you need to test window managers), you can create a nested X session.  Outside of the chroot, run&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
Within the chroot, set your DISPLAY variable&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
&lt;br /&gt;
Interesting stuff in /etc/init.d/xsession :&lt;br /&gt;
* it ALSO sets background as /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the startup sound===&lt;br /&gt;
The startup sound is played by /etc/X11/Xsession.d/45xsession. You can disable it by commenting out the following lines.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the shutdown sound===&lt;br /&gt;
The shutdown sound is played by /etc/init.d/xsession. You can disable it by commenting out lines 210-220 from the script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change default window manager===&lt;br /&gt;
&lt;br /&gt;
Open /etc/init.d/knoppix-autoconfig and look for lines which look like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Allow only supported windowmanagers                                           &lt;br /&gt;
# Actually, this check is useless because it's done again in 45xsession. -KK    &lt;br /&gt;
# case &amp;quot;$DESKTOP&amp;quot; in gnome|enlightenment|kde|larswm|xfce|xfce4|lg3d|ratpoison|blackbox|openbox|windowmaker|wmaker|icewm|fluxbox|twm|nx|rdp|kiosk) ;; *) DESKTOP=&amp;quot;kde&amp;quot;; ;; esac                                                                  &lt;br /&gt;
[ -n &amp;quot;$DESKTOP&amp;quot; ] || DESKTOP=&amp;quot;kde&amp;quot;                                          &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change &amp;quot;kde&amp;quot; in the last quoted line to whatever you like, for example to &amp;quot;fluxbox&amp;quot; or &amp;quot;twm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Changing the boot graphic, boot message, and startup script text==&lt;br /&gt;
While you are in the chroot environment you can easily change the boot messages, the boot graphic, and the default KDE background graphic.&lt;br /&gt;
&lt;br /&gt;
===Changing the boot graphic===&lt;br /&gt;
The 'boot graphic' is the first image you see when the CD or DVD boots. It looks similar to ASCII art and it is normally something flashy that says 'Knoppix'. You can change this to be any graphic that you please, but you must use a 640x400 graphic that has only 16 colors.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old logo in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a 640x400 pixel 16 color graphic and save it as a GIF, e.g. 'logo.16.gif'. GIMP can easily do this. Note, you can use a graphic that originally had more than 16 colors, but it is critical that you convert the graphic to 16 colors before doing the next step. &lt;br /&gt;
#Convert the GIF to lss16 using the tools included on the Knoppix CD.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the boot message===&lt;br /&gt;
The 'boot message' is the message that you see under the 'boot graphic' on the initial screen when the Knoppix CD or DVD loads. It normally says something along the lines of Knoppix with the version number and includes a link to the Knoppix website. You can change this text to be whatever you please, but you shouldn't add too much text or it will make the boot screen look funny. Restricting yourself to a single line of text that is no larger than the default one is a good idea.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old message in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the message with a text editor. You'll see at the top of the message that it shows the graphic. Don't change this text, just the line under.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the startup script text===&lt;br /&gt;
The 'startup script text' is the text that you see after the initial boot screen, while Knoppix loads and configures your system. You can change as much of this text as you please. You can even add addition lines to the script; however, it is recommended that you don't play with this file. Limiting yourself to editing the 'Welcome to KNOPPIX' message is a good idea. &lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old minirt.gz in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Uncompress minirt.gz&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a temporary directory to mount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Mount the minirt filesystem as an ext2 filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#::or if the above does not work use&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o loop&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the linuxrc script to display the message you want. You'll find the default message approximately 2 pages down and it'll be using several colors, i.e. ${WHITE}, ${RED}, etc., so it might be slightly tricky to spot.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#unmount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Compress the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove your temporary directory.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching KDE to Change Menus, Icons, etc.==&lt;br /&gt;
While you are in the chroot environment you can load KDE and use the configuration tools to change buttons, icons, etc. Once you are finished you can exit KDE and copy /home/knoppix to /etc/skel to keep these changes. To load KDE do the following.&lt;br /&gt;
&lt;br /&gt;
#If you are not at runlevel 2 (i.e. if you are already in KDE), switch to runlevel 2.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /etc/skel to /home/knoppix&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Change permissions to the user 'knoppix'&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy over your X11 configuration to the chroot'd environment (press ctrl+alt+F2 to switch to a non-chroot'd terminal, then ctrl+alt+F1 to switch back when done)&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*&amp;lt;blockquote&amp;gt;'' Knoppix 3.7: I think it's XF86Config-4 rather than xorg.conf.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#(Optional)Switch to user 'knoppix'. If you want to uninstall packages, stay as root -- e.g. skip this step. If you want to configure the buttons, icons, background, etc., that you see when KDE boots, be sure to do this step.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Launch KDE&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Do your KDE changes&lt;br /&gt;
##Exit KDE&lt;br /&gt;
##Exit su and switch back to user 'root'.&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /home/knoppix back to /etc/skel to keep the changes&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; mv /etc/skel /etc/skel-old&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Set the owner back to root&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove the xorg.conf file&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you find that some of your settings are not persistent after booting the new image, check the initialization file at /etc/X11/Xsession.d/45xsession.  By default, Knoppix does '''not''' simply copy over all files from /etc/skel.  You may need to make modifications here if you wish to do something different.&lt;br /&gt;
&lt;br /&gt;
===Changing the ksplash KDE graphics===&lt;br /&gt;
You can change the graphics that KDE shows via ksplash when it first loads. These graphics are in the &amp;lt;b&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/b&amp;gt; directory. You'll most likely want to swap out &amp;lt;b&amp;gt;splash_top.png&amp;lt;/b&amp;gt; for a custom 400x248 PNG graphic. Note that ksplash will not automatically put a border around your graphic. If you'd like a border, you have to manually add it to your graphic.&lt;br /&gt;
&lt;br /&gt;
==Leaving the Chroot==&lt;br /&gt;
If you mounted it, you'll need to unmount /proc - very important! &lt;br /&gt;
 umount /proc&lt;br /&gt;
Press '''CTRL+D''' to leave being chrooted.&lt;br /&gt;
&lt;br /&gt;
==Re-Entering the chroot==&lt;br /&gt;
If you've left the chroot, but you want to go back in and modify some things...&lt;br /&gt;
&lt;br /&gt;
Remount the local hard disk (if needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setup the environment for chroot&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&lt;br /&gt;
mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remastering the ISO==&lt;br /&gt;
We've finished customizing and ready to burn!&lt;br /&gt;
First do some cleanup: &lt;br /&gt;
* remove any .bash_history files, tmp files, etc.&lt;br /&gt;
* back out any changes you don't want burned back to the disc&lt;br /&gt;
* make sure you umount /proc /dev /sys or mkisofs will not work properly&lt;br /&gt;
* &amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===KNOPPIX Compressed Image===&lt;br /&gt;
Now we'll make the big &amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt; file which is an ISO 9660 filesystem compressed for use by the &amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt; driver: &lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
      -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
   | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
the &amp;quot;www.knoppix.net&amp;quot; and &amp;quot;Knoppix.net filesystem&amp;quot; can be changed to what you want to call the file. You will get an error that it doesn't conform to ISO standards -- you can ignore this.  Note that, to run &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;, you'll need to have enough space to store the entire ISO in RAM/swap.  Ensure you have at least 800M of free space before starting.&lt;br /&gt;
&lt;br /&gt;
In Knoppix 3.4 the &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt; script has been updated so be sure to use it to obtain the best result. It has a new option '''-b''' (best), which enables the best compression by using different compression schemes and tries to optimize that way, but be careful, because that option is slow (10x slower).&lt;br /&gt;
&lt;br /&gt;
Note: The above didn't work for me using the latest create_compressed_fs. I could create the ISO but it couldn't read the compressed image properly when booting (I/O errors when reading the cloop0 device). I think this was because create_compressed_fs didn't have enough RAM and it was just failing silently. The command below did work though. It uses a file rather than memory for temporary storage:&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
    65536 -f /mnt/hda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
------I tried this ,but it report a error,so i think there is some mistake in the command,it may be like follow,tell me if anyone confirm it-------&lt;br /&gt;
----------(by zhblue(newsclanATgmail.com))-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -b \&lt;br /&gt;
    -f /mnt/hda1/isotemp -B 65536 - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
I noted several problems with the commands above:&amp;lt;br&amp;gt;&lt;br /&gt;
1) The option &amp;quot;-no-bak&amp;quot; excludes files with the ending &amp;quot;.bak&amp;quot;. Non-backup files with this ending are found in some software packages, e.g. glest. It is safer not to use this option.&amp;lt;br&amp;gt;&lt;br /&gt;
2) Just calling &amp;quot;create_compressed_fs - 65536&amp;quot; gives a warning about old command syntax. The compatible parameters are &amp;quot;-m -B 65536&amp;quot;. The later examples here already fixed this, the first example still uses the deprecated version.&lt;br /&gt;
&lt;br /&gt;
===Live CD ISO===&lt;br /&gt;
If all went well, onto making the final CD-ROM Image:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(this will update the md5 hashes of the files included in the ISO, used for integrity checking) Now to burn the image; for Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(the ISO is stored in &amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Burn the ISO using your favorite tools, and you're ready!&lt;br /&gt;
&lt;br /&gt;
==How to add new device driver to KNOPPIX==&lt;br /&gt;
&lt;br /&gt;
Recently in a client project, I added the Digital Persona’s finger print driver to the Knoppix 5.1 distribution as an embedded solution to this project. This is a typical case where both the kernel level driver and the user level drivers and libraries are involved. &lt;br /&gt;
&lt;br /&gt;
Most of the Knoppix books and online documentation have documented about how to keep a persistent storage of user configuration and user data. But those persistent configuration only saves the data in /home and /etc directories. If you have added kernel level drivers and/or other system libraries which are not in above two directories, you have to save the file images as a whole right after the boot. The saved file image can be big and may not what you want as a regular usage model. If you are building a customed Knoppix image for a long term solution, definitely you want to remaster the Knoppix to make the new drives be a permanent part of it.&lt;br /&gt;
&lt;br /&gt;
The Digital Persona’s OneTouch SDK for their finger print scanner driver comes with a kernel level driver source code, plus a set of user level application libraries, as well as a sample test application.  The SDK do not have a ready made binary for Debian or Knoppix. So I have to compile it from the source SDK.  However, the CD version of Knoppix 5.1 do not even come with the source include header files to compile a kernel level driver. So I have to compile it under the DVD version of the Knoppix 5.1 and copy the compiled binary to the CD version of Knoppix 5.1 to do testing and remastering. The steps I have tried to make it work under Knoppix are as follows:&lt;br /&gt;
&lt;br /&gt;
1.	First compile the driver under DVD version of the Knoppix. Change the source code build scripts so that the include files and library path are matching what we have in Knoppix. The details are specific to the OneTouch SDK itself. If you are interested about this detail, write to me.&lt;br /&gt;
&lt;br /&gt;
2.	Install the just built kernel driver, the user libraries to their regular location as we will show in following step 4. And then build and run their sample applications per Digital Persona’s instruction. This proves that the basic kernel module build steps are built correctly and the user level libraries are working properly in a standard installation. This is important before we moved to chroot environment to make this changes permanent to our remastered Knoppix.&lt;br /&gt;
&lt;br /&gt;
3.	Then I followed the Knoppix remastering instructions documented in the book of “Live Linux CD” by Christoper Negus.&lt;br /&gt;
&lt;br /&gt;
4.	In the above remastering instructions, there is a step to update all the Debian packages and other software under the chroot environment.  It is at this step that I re-run the drivers installation steps like I have done in above step 2 in the real root environment.  In this particular case, it is make a directory and copy the kernel module file mod_usbdpfp.ko to that directory as follows:&lt;br /&gt;
&lt;br /&gt;
mkdir /lib/modules/2.6.19/kernel/drivers/biometric&lt;br /&gt;
cp mod_usbdpfp.ko /lib/modules/2.6.19/mod_usbdpfp.ko&lt;br /&gt;
&lt;br /&gt;
And also copy all those Digital Persona user level libraries to following location:&lt;br /&gt;
&lt;br /&gt;
cp libdpfp* /usr/lib&lt;br /&gt;
&lt;br /&gt;
5.	I then run /sbin/depmod to let system detects the new kernel mode driver I have installed. This will refresh the /dev directory so it will have entries like:&lt;br /&gt;
&lt;br /&gt;
/dev/usbdpfpPNP&lt;br /&gt;
/dev/usbdpfp0&lt;br /&gt;
&lt;br /&gt;
At this time, if all works right, when you run command lsmod, you will also see something like:&lt;br /&gt;
&lt;br /&gt;
	mod_usbdpfp&lt;br /&gt;
&lt;br /&gt;
shows up in the loaded module list&lt;br /&gt;
&lt;br /&gt;
6.	At this time, you are ready to make a remaster of the Knoppix. Next time when you boot up with this remastered Knoppix, it will have the kernel driver and user level libraries setup ready for you to run the sample applications. Just as if you have done above step 2 and step 4 right after a refresh reboot from the original Knoppix CD.     &lt;br /&gt;
&lt;br /&gt;
John Xu, USA.  ( johnxu at n2k.net )&lt;br /&gt;
&lt;br /&gt;
=Tips=&lt;br /&gt;
I have had good results remastering working from the CD as root working from fluxbox. Just say &amp;quot;knoppix 2&amp;quot; at the boot prompt and it will boot you to a root prompt where you can then say &amp;quot;startx /usr/bin/fluxbox&amp;quot;. I like to use the xterm unicode shell.&lt;br /&gt;
&lt;br /&gt;
==Package Management==&lt;br /&gt;
While working chroot doing the remastering I like to use &lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
to remove packages because before it does anything it will stop and show details on what it is fixing to remove and let you say &amp;quot;yes or no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you don't use the above &amp;quot;apt-get&amp;quot; instructions and have a lot to cleanup and purge, here's the easy way to do it: &lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge&lt;br /&gt;
That will make a list of all removed packages to purge and then you just say &lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
and you're all done. &lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
is a one-line version of this. Also use &lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
==Alternatives for Low-Memory Machines==&lt;br /&gt;
You don't really need 1G swap as there are two new tools to create compressed filesystems. Here are some candidates to make ''compressed'' fs:&lt;br /&gt;
* Valentijn's rewrite [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Quozl's port of compressloop for Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Quozl's distributed compressloop (use more than one processor to speed things up) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Justin's patch [http://s.bouncybouncy.net/~justin/code/] (link broken) I also just wrote a distributed cloop compressor(or for smp)  It's in that same directory.&lt;br /&gt;
&lt;br /&gt;
==Test CD Image Without Burning a CD==&lt;br /&gt;
If you have a spare partition with at least 700MB free space formatted with ext2, ext3 or Vfat, you can use this for test by booting from a floppy disk. A floppy boot will look for a partiton with /KNOPPIX/ in the root, and the compressed image /KNOPPIX/KNOPPIX. Instead of using the sub-directory /mnt/hda1/knx/master/KNOPPIX/ as described above, it should be called /mnt/hda2/KNOPPIX/ . The root index.html will then be located at /mnt/hda2/index.html and the compressed image will be at /mnt/hda2/KNOPPIX/KNOPPIX . Now you can boot from floppy and use /mnt/hda2 as your image. For further information see [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
If you don't have an extra partition or you don't want to do so much for it, you can use Qemu ( see [http://fabrice.bellard.free.fr/qemu/] ) with the ISO image like this:&lt;br /&gt;
 qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -net user&lt;br /&gt;
You even do not have to build a hard disk image before, just install Qemu and try this. Amazing!&lt;br /&gt;
&lt;br /&gt;
==Test remastered version without creating cloop file/iso==&lt;br /&gt;
i use a setup similar to knoppix terminal server to test the remastered files without having to recreate a&lt;br /&gt;
cloop image every time: the remastered files live in an ext2 filesytem in a loopfile (knoppix_loop) mounted rw (this is where i chroot in). when i want to test the current setup, i have another machine network boot and use the files from the loopfile directly (needs another miniroot.gz). See [[User:Ml#dev_setup]]&lt;br /&gt;
&lt;br /&gt;
If you want to use only one machine, you'll have to reboot (or use qemu) and use the &amp;quot;loopfile&amp;quot; and &amp;quot;fromhd&amp;quot; cheatcodes (see [[User:Ml#miniroot_changes]]). For example, this is what my grub boot entry looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title           Remastered Knoppix&lt;br /&gt;
root            (hd0,0)&lt;br /&gt;
kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Booting Knoppix images with GRUB==&lt;br /&gt;
* First copy /boot off the Knoppix cd to your boot partition (or even your dos partition). I named mine boot.knoppix&lt;br /&gt;
Copy the master/KNOPPIX directory to your root directory of any hard disk. You may place it somewhere other than the boot partition (ext2/3, reiserfs, vfat are supported).&lt;br /&gt;
* for Knoppix &amp;lt;= 3.3, put the following in your /boot/grub/menu.lst:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* notice the fromhd parameter: it's the location of the /KNOPPIX directory&lt;br /&gt;
* reboot and have fun.&lt;br /&gt;
&lt;br /&gt;
==Helpful Scripts==&lt;br /&gt;
----&lt;br /&gt;
This is the recommended directory layout for remastering KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
the following script &amp;quot;remaster&amp;quot; will do the remaster process for you. Use as root, or you will end up with wrong access rights in the image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-04-02.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
The following script will loop-mount boot floppy image and initrd image for modification. The umount function will build a new initrd image and put it back on the boot floppy image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
==Tips around apt-get to install/update/remove applications==&lt;br /&gt;
(by gnarvaja)&lt;br /&gt;
* If you booted from CD, even on a HD install (example: Pivot Install) instead of copying the original CD and KNOPPIX directory to the HD, you can use them directly from their mount points.&lt;br /&gt;
* Another alternative is to mount an ISO image of the original CD as a loop device and mount the KNOPPIX image as a '''cloop''' device. You will save close to 2GB of space. Script to mount from an ISO image:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assumes that the current directory is the working space&lt;br /&gt;
 # original.iso is an image of the CD we will be using as master&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # initialize the compressed loop device&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
&lt;br /&gt;
* Get '''apt-spy''' and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original '''sources.list''' just in case.&lt;br /&gt;
* Another technique is to modify '''sources.list'''. Replace the string '''.de.''' in the ftp addresses (ftp.de.debian.org) with the code corresponding to your country. Examples: USA -&amp;gt; .us. (ftp.us.debian.org), Brazil -&amp;gt; .br. (ftp.br.debian.org). Check the Debian site for debian.org mirrors in your country.&lt;br /&gt;
* Remember to uncomment the '''linuxtag''' ftp addresses to get the latest and greatest from Knoppix&lt;br /&gt;
* Use '''apt-get update''' to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the '''-s''' option to simulate the installation.&lt;br /&gt;
* Before doing the update, I modified my default releases to '''testing''', that means that the software I'll be using will have a good balance of stability and features. Knoppix uses '''unstable''' by default, which is too risky for my personal taste.&lt;br /&gt;
* Get '''[apt-get install] locale''' and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules and localized manual pages.&lt;br /&gt;
* I use '''aptitude''' to get/remove applications, it is character based so it works with init 2. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.&lt;br /&gt;
* When installing applications it is likely that your '''/etc/rc?.d''' directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave '''/etc/rc2.d''' and '''/etc/rc5.d''' as close as the originals as possible and modify '''/etc/rc3.d''' and '''/etc/rc4.d''' to test new stuff. '''Example:''' You may want to have ntfs installed, but not necessarily running by default. Same with apache, mysql and many others.&lt;br /&gt;
* When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other installation utilty. Make sure to check the messages and manually remove those directories.&lt;br /&gt;
* After you are done, '''aptitude''' may leave some files behind. Here's a clean up script I use:&lt;br /&gt;
&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Clean package files generated by aptitude&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
=Common Problems=&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] Chroot problems accessing device files&lt;br /&gt;
&lt;br /&gt;
* You've &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt;'d (into whatever window manager you like) and you start a terminal (gnome-terminal, konsole, xterm).  Nothing happens (such is the case in fluxbox, and you'll see an error in you &amp;lt;code&amp;gt;~/.xsession-errors&amp;lt;/code&amp;gt; file).  Or perhaps the error is helpfully displayed: &amp;lt;code&amp;gt;&lt;br /&gt;
  get_pty: not enough ptys&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I had plenty yesterday... but then I &amp;lt;code&amp;gt;chroot&amp;lt;/code&amp;gt;ed so, to solve this, &amp;lt;code&amp;gt;&lt;br /&gt;
  # NOT in your chroot environment&lt;br /&gt;
  cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
  MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
  # enter your chroot environment&lt;br /&gt;
  chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
  # and mount /dev/pts&lt;br /&gt;
  mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
it might give that same &amp;quot;fstab not found&amp;quot; error as mounting proc&lt;br /&gt;
does.  so do what you'd do then, disregard.&lt;br /&gt;
&lt;br /&gt;
start your X up again and try your terminal, should work.&lt;br /&gt;
thanks to: technovelty[http://www.technovelty.org/linux/tips/xinchroot.html] for the final enlightenment&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
If my howto is too confusing, or you'd like a second opinion, check out charan's very nice remastering howto: http://brainstorms.in/?page_id=83&lt;br /&gt;
Another Howto is at  http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
There is a wizard, which knows all the unpacking, compressing and CD-recording steps mentioned here. It also shows a shell where you can update the uncompressed KNOPPIX system using debian's standard software installation tools. It is called mmkcdrom and part of the plugscript package: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Yet another HOWTO, for shell freaks, is at http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Be sure to check out the [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] for ideas and help with remastering.&lt;br /&gt;
&lt;br /&gt;
* If you want to add a custom kernel, check out the [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* There also a guide at O'Reilly on the same topic : [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
Thats it. This is an updated version of my previous howto. This is not meant for linux beginners, you will need to know your way around linux to get this to work. I'll update this as corrections/improvements/etc come through.&lt;br /&gt;
&lt;br /&gt;
=Thanks=&lt;br /&gt;
Thanks to aay, charan, Tech2k, and #knoppix for some corrections and tips and ideas.  Feel free to edit or add to this howto.&lt;br /&gt;
Note about swap:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
* German Version: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Spanish Version: [[Knoppix Remastering Howto Spanish]]  en español&lt;br /&gt;
* French Version: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Indonesian Version: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Russian Version: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
* Brazilian Portuguese Version: [[Knoppix Remastering Howto Brazilian Portuguese]]&lt;br /&gt;
* Italian Version: [[Knoppix Remastering Howto Italiano]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto</id>
		<title>Knoppix Remastering Howto</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto"/>
				<updated>2008-05-17T06:11:21Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: Undo revision 7799 by 202.88.238.45 (Talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide that will show you how to remaster KNOPPIX. (Note: commands should appear on one line, so please maximize the window. If you have any comments/suggestions please post below.)&lt;br /&gt;
&lt;br /&gt;
You may wish to start from an already customized Knoppix, so you don't have to do as much work (such as removing programs). If so, see [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
=System Requirements=&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** at least 1 GB of FREE RAM+Swap total (e.g. 256M ram, and 750M swap AVAILABLE) (unless you use a different compression program - look in this page for compressloop)&lt;br /&gt;
** 3 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB free RAM + swap (for fullsized DVD)&lt;br /&gt;
** 15 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
==Setting up for Remastering==&lt;br /&gt;
# Boot from the ''Knoppix CD''&lt;br /&gt;
# Open a root shell:&lt;br /&gt;
#* Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Root Shell&lt;br /&gt;
#* Note: All commands below are run from this root shell.&lt;br /&gt;
# Configure your Internet connection (we'll need this later). If you use DHCP, it should already be configured.&lt;br /&gt;
#* Note: Run '''ifconfig''' to check.&lt;br /&gt;
# Find the partition you will use to work on. In this example it is called '''hda1''' . The partition should have a minimum of 3 GB free space&lt;br /&gt;
# Mount the partition:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: Make sure that it is read/write or you will get errors when you later chroot. To check: run '''mount'''&lt;br /&gt;
# Create a root directory to work in -- if you put all your files here it will be easy to clean up&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you don't have 1 GB RAM (  '''egrep &amp;quot;(MemTotal|SwapTotal)&amp;quot; /proc/meminfo &amp;amp;&amp;amp; echo &amp;quot;(physical+swap)&amp;quot;''' ) then you will need a swapfile:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;cd /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;dd if=/dev/zero of=swapfile bs=1M count=750&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkswap swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;swapon swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make 2 directories, one for your new Master CD, one for the source, on a disk partition. Also, make additional directories under these named KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now, copy the KNOPPIX files to your source directory :&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: This will take a long time (you are copying 2GB).  Warning: you will be tempted to replace this copy command with a much faster procedure: create an empty directory, then use unionfs to merge the empty directory with /KNOPPIX in order to create the read-write copy.  However, as of Knoppix 4.0.2, there is a bug in unionfs that causes this faster procedure to fail.  For now, stick with the copy-command shown above.&lt;br /&gt;
# Additionally, copy the 'boot' folder from your cdrom - you'll need these files to build the ISO later.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# For Knoppix 5.0.1 you also have to copy the 'modules' folder:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy the main HTML page for the startup page:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy everything necessary files except the ~700 Mb KNOPPIX file.&lt;br /&gt;
#* &amp;lt; 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;gt;= 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* for the DVD Version you have to use -size -15000k and copy the KNOPPIX2 folder like this&lt;br /&gt;
#** &amp;lt;pre&amp;gt;cp -ar /KNOPPIX2/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# setup the environment for chroot&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you see errors regarding &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;, see the [[#Common Problems|common problems]] section&lt;br /&gt;
You are now chrooted. &amp;quot;/&amp;quot; is actually &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Working in the Chroot Environment==&lt;br /&gt;
Remember that anything you do or create in the chrooted environment will get burned to the CD.  If you make any changes (e.g,. to the APT configuration, proxy settings, etc.), make a note to back the changes out before remastering.&lt;br /&gt;
===Internet Access===&lt;br /&gt;
To use the Internet you need to edit &amp;lt;tt&amp;gt;/etc/resolv.conf&amp;lt;/tt&amp;gt; to add your nameserver or exit the chroot and copy the outer &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; into the chroot folder: &lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
(proxies (a.k.a. doing it at work): you can type &amp;quot;export http_proxy=http://your.proxy.com:&amp;lt;port&amp;gt;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
To check your chrooted internet connection,&lt;br /&gt;
 ping google.com&lt;br /&gt;
(if ICMP is barred at some corporate firewall or something then try &amp;quot;lynx http://www.google.com&amp;quot; and see if you get the page -after a cookie &amp;quot;allow&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===SMB access===&lt;br /&gt;
Also change smb.conf to your MS group if you want smbd support (MSHOME is XP Home ed. usually, and WORKGROUP is 9x Windows)&lt;br /&gt;
===APT===&lt;br /&gt;
Update your package list with '''apt-get update'''.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: If ''''apt-get update''' fails with &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, you need to make sure your chrooted environment is mounted without the &amp;quot;nodev&amp;quot; option. (see above where it talks about the /dev/null errors when entering the chroot environment for the first time)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Warning''': apt-get upgrade is a ''BAD IDEA''. It will, quite probably, render your KNOPPIX remaster unbootable, or broken in some way. A far safer method is to only upgrade packages as necessary.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note: If apt-get fails with &amp;quot;Dynamic NMap ran out of room&amp;quot; ''' you might try this little gem, which fixed the problem for me:&lt;br /&gt;
 #echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&lt;br /&gt;
(I did this while chrooted as described above.)&lt;br /&gt;
&lt;br /&gt;
Before you can add stuff, you will probably need to remove some packages.  To get a list of packages installed, type this:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
If you are looking for big installed packages then the command&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
will list the  packages  with size in descending order.&lt;br /&gt;
&lt;br /&gt;
At least ten times faster is the command&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
and you don't need dpkg-awk or awk or perl; however it does not exclude packages that are not installed.  If you have trouble with the above sort command, try using KPackage, expanded all the trees and sorted by the size column to find big packages.&lt;br /&gt;
&lt;br /&gt;
Or, you could use this command to get the qpkg-query speed with the non-installed packages not listed:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
It does the same thing as above, I assume.  I couldn't get the first one to work because I don't have dpkg-awk.&lt;br /&gt;
&lt;br /&gt;
To remove a package (and all packages dependant on it), type this:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
To check for orphaned packages, type this:&lt;br /&gt;
 deborphan&lt;br /&gt;
Want to save more space by getting rid of those pesky orphans (how cruel!), type this ('''Warning''', you won't be prompted yes/no to remove these packages.  When you press Enter after this command, those packages ''will be gone''):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
Now the good stuff.  If you wish to add a package, type this:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
What, don't know what packages to install?  Type this.  When the list appears, you can peruse (over 13k lines!) or search for things using &amp;lt;tt&amp;gt;/''search-term''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
When you're done removing and adding packages, a good way to clean up is by typing this&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Also, because the Debian package system keeps a cache of downloaded packages, you may want to run the following to clear out those spare files:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
===User Settings===&lt;br /&gt;
User settings are in /etc/skel.  This directory will be copied to make new user home directories.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;tip: don't put files in /root they will be only available (at runtime) in /KNOPPIX/root&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the default user 'knoppix' is not created by adduser(1), thus /etc/skel is not copied completely but rather selectively.  That is, to make a file .xyrc appear in /home/knoppix, it is not sufficient to place it in /etc/skel.  One possibility is to extend the code in /etc/X11/Xsession.d/45xsession which is responsible for filling /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
===Autorunning Programs===&lt;br /&gt;
When you want to autorun some programs, one can create a script and put it in the directory &amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt; (This only loads items before X loads).  Read up on the SysV init process for more possibilities.&lt;br /&gt;
&lt;br /&gt;
''For X-programs consider &amp;lt;tt&amp;gt;/home/knoppix/.kde/Autostart&amp;lt;/tt&amp;gt; but this may transfer form &amp;lt;tt&amp;gt;/etc/skel/.kde/Autostart&amp;lt;/tt&amp;gt; on boot''--[[User:12.106.237.2|12.106.237.2]] 18:08, 7 December 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Editing the KNOPPIX auto-configuration script==&lt;br /&gt;
You can find a lot of interesting information about how KNOPPIX auto-configures you system by looking in the /etc/init.d/knoppix-autoconfig script. Of particular note are the following.&lt;br /&gt;
&lt;br /&gt;
===Changing the default KDE background image===&lt;br /&gt;
The auto-configuration script sets the default KDE background image to be an image from the CD-ROM. An image that you can easily change when you are remastering KNOPPIX.&lt;br /&gt;
** In KNOPPIX 3.3 and below it is /cdrom/KNOPPIX/background.gif&lt;br /&gt;
** In KNOPPIX 3.4 and above it is /cdrom/KNOPPIX/background.jpg&lt;br /&gt;
&lt;br /&gt;
===Editing floppy and CD-ROM use or adding a custom script===&lt;br /&gt;
The auto-configuration script sets up both your CD-ROM and your floppy disk. The commands for doing this are 'floppyconfig' and 'cdromconfig', respectively. The auto-configuration script will also run cdrom/KNOPPIX/knoppix.sh, which is an easy script to change when remastering KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
===Changing the default boot parameters===&lt;br /&gt;
All boot parameters obtain default values from the /etc/init.d/knoppix-autoconfig script. This is one massive BASH script (you best know your BASH to play with this), but it is the place that you can edit any of the default boot parameters.  For example, to switch from 'kde' to 'twm' as default desktop just search for the place where 'kde' is provided as default value (variable DESKTOP, IIRC). Another example would be changing the default language.&lt;br /&gt;
&lt;br /&gt;
Note, if you are interested in changing the default language KDE uses, the easiest thing to do is to load KDE, instructions are below, and use the KDE configuration utility to select your language of interest.&lt;br /&gt;
&lt;br /&gt;
==X Session Configuration==&lt;br /&gt;
When working with X-based programs you will have to make sure that your display is set appropriately. You can do this manually when remastering KNOPPIX. Also, two scripts related to X Session is where you can change or disable the startup and shutdown sounds.&lt;br /&gt;
&lt;br /&gt;
===Starting X-based programs===&lt;br /&gt;
When testing X-based programs, you will have to &lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
which will allow you to connect to your normal X session.  Alternately (if you need to test window managers), you can create a nested X session.  Outside of the chroot, run&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
Within the chroot, set your DISPLAY variable&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
&lt;br /&gt;
Interesting stuff in /etc/init.d/xsession :&lt;br /&gt;
* it ALSO sets background as /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the startup sound===&lt;br /&gt;
The startup sound is played by /etc/X11/Xsession.d/45xsession. You can disable it by commenting out the following lines.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the shutdown sound===&lt;br /&gt;
The shutdown sound is played by /etc/init.d/xsession. You can disable it by commenting out lines 210-220 from the script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change default window manager===&lt;br /&gt;
&lt;br /&gt;
Open /etc/init.d/knoppix-autoconfig and look for lines which look like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Allow only supported windowmanagers                                           &lt;br /&gt;
# Actually, this check is useless because it's done again in 45xsession. -KK    &lt;br /&gt;
# case &amp;quot;$DESKTOP&amp;quot; in gnome|enlightenment|kde|larswm|xfce|xfce4|lg3d|ratpoison|blackbox|openbox|windowmaker|wmaker|icewm|fluxbox|twm|nx|rdp|kiosk) ;; *) DESKTOP=&amp;quot;kde&amp;quot;; ;; esac                                                                  &lt;br /&gt;
[ -n &amp;quot;$DESKTOP&amp;quot; ] || DESKTOP=&amp;quot;kde&amp;quot;                                          &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change &amp;quot;kde&amp;quot; in the last quoted line to whatever you like, for example to &amp;quot;fluxbox&amp;quot; or &amp;quot;twm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Changing the boot graphic, boot message, and startup script text==&lt;br /&gt;
While you are in the chroot environment you can easily change the boot messages, the boot graphic, and the default KDE background graphic.&lt;br /&gt;
&lt;br /&gt;
===Changing the boot graphic===&lt;br /&gt;
The 'boot graphic' is the first image you see when the CD or DVD boots. It looks similar to ASCII art and it is normally something flashy that says 'Knoppix'. You can change this to be any graphic that you please, but you must use a 640x400 graphic that has only 16 colors.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old logo in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a 640x400 pixel 16 color graphic and save it as a GIF, e.g. 'logo.16.gif'. GIMP can easily do this. Note, you can use a graphic that originally had more than 16 colors, but it is critical that you convert the graphic to 16 colors before doing the next step. &lt;br /&gt;
#Convert the GIF to lss16 using the tools included on the Knoppix CD.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the boot message===&lt;br /&gt;
The 'boot message' is the message that you see under the 'boot graphic' on the initial screen when the Knoppix CD or DVD loads. It normally says something along the lines of Knoppix with the version number and includes a link to the Knoppix website. You can change this text to be whatever you please, but you shouldn't add too much text or it will make the boot screen look funny. Restricting yourself to a single line of text that is no larger than the default one is a good idea.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old message in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the message with a text editor. You'll see at the top of the message that it shows the graphic. Don't change this text, just the line under.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the startup script text===&lt;br /&gt;
The 'startup script text' is the text that you see after the initial boot screen, while Knoppix loads and configures your system. You can change as much of this text as you please. You can even add addition lines to the script; however, it is recommended that you don't play with this file. Limiting yourself to editing the 'Welcome to KNOPPIX' message is a good idea. &lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old minirt.gz in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Uncompress minirt.gz&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a temporary directory to mount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Mount the minirt filesystem as an ext2 filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#::or if the above does not work use&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o loop&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the linuxrc script to display the message you want. You'll find the default message approximately 2 pages down and it'll be using several colors, i.e. ${WHITE}, ${RED}, etc., so it might be slightly tricky to spot.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#unmount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Compress the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove your temporary directory.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching KDE to Change Menus, Icons, etc.==&lt;br /&gt;
While you are in the chroot environment you can load KDE and use the configuration tools to change buttons, icons, etc. Once you are finished you can exit KDE and copy /home/knoppix to /etc/skel to keep these changes. To load KDE do the following.&lt;br /&gt;
&lt;br /&gt;
#If you are not at runlevel 2 (i.e. if you are already in KDE), switch to runlevel 2.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /etc/skel to /home/knoppix&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Change permissions to the user 'knoppix'&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy over your X11 configuration to the chroot'd environment (press ctrl+alt+F2 to switch to a non-chroot'd terminal, then ctrl+alt+F1 to switch back when done)&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*&amp;lt;blockquote&amp;gt;'' Knoppix 3.7: I think it's XF86Config-4 rather than xorg.conf.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#(Optional)Switch to user 'knoppix'. If you want to uninstall packages, stay as root -- e.g. skip this step. If you want to configure the buttons, icons, background, etc., that you see when KDE boots, be sure to do this step.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Launch KDE&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Do your KDE changes&lt;br /&gt;
##Exit KDE&lt;br /&gt;
##Exit su and switch back to user 'root'.&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /home/knoppix back to /etc/skel to keep the changes&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; mv /etc/skel /etc/skel-old&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Set the owner back to root&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove the xorg.conf file&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you find that some of your settings are not persistent after booting the new image, check the initialization file at /etc/X11/Xsession.d/45xsession.  By default, Knoppix does '''not''' simply copy over all files from /etc/skel.  You may need to make modifications here if you wish to do something different.&lt;br /&gt;
&lt;br /&gt;
===Changing the ksplash KDE graphics===&lt;br /&gt;
You can change the graphics that KDE shows via ksplash when it first loads. These graphics are in the &amp;lt;b&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/b&amp;gt; directory. You'll most likely want to swap out &amp;lt;b&amp;gt;splash_top.png&amp;lt;/b&amp;gt; for a custom 400x248 PNG graphic. Note that ksplash will not automatically put a border around your graphic. If you'd like a border, you have to manually add it to your graphic.&lt;br /&gt;
&lt;br /&gt;
==Leaving the Chroot==&lt;br /&gt;
If you mounted it, you'll need to unmount /proc - very important! &lt;br /&gt;
 umount /proc&lt;br /&gt;
Press '''CTRL+D''' to leave being chrooted.&lt;br /&gt;
&lt;br /&gt;
==Re-Entering the chroot==&lt;br /&gt;
If you've left the chroot, but you want to go back in and modify some things...&lt;br /&gt;
&lt;br /&gt;
Remount the local hard disk (if needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setup the environment for chroot&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&lt;br /&gt;
mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remastering the ISO==&lt;br /&gt;
We've finished customizing and ready to burn!&lt;br /&gt;
First do some cleanup: &lt;br /&gt;
* remove any .bash_history files, tmp files, etc.&lt;br /&gt;
* back out any changes you don't want burned back to the disc&lt;br /&gt;
* make sure you umount /proc /dev /sys or mkisofs will not work properly&lt;br /&gt;
* &amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===KNOPPIX Compressed Image===&lt;br /&gt;
Now we'll make the big &amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt; file which is an ISO 9660 filesystem compressed for use by the &amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt; driver: &lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
      -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
   | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
the &amp;quot;www.knoppix.net&amp;quot; and &amp;quot;Knoppix.net filesystem&amp;quot; can be changed to what you want to call the file. You will get an error that it doesn't conform to ISO standards -- you can ignore this.  Note that, to run &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;, you'll need to have enough space to store the entire ISO in RAM/swap.  Ensure you have at least 800M of free space before starting.&lt;br /&gt;
&lt;br /&gt;
In Knoppix 3.4 the &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt; script has been updated so be sure to use it to obtain the best result. It has a new option '''-b''' (best), which enables the best compression by using different compression schemes and tries to optimize that way, but be careful, because that option is slow (10x slower).&lt;br /&gt;
&lt;br /&gt;
Note: The above didn't work for me using the latest create_compressed_fs. I could create the ISO but it couldn't read the compressed image properly when booting (I/O errors when reading the cloop0 device). I think this was because create_compressed_fs didn't have enough RAM and it was just failing silently. The command below did work though. It uses a file rather than memory for temporary storage:&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
    65536 -f /mnt/hda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
------I tried this ,but it report a error,so i think there is some mistake in the command,it may be like follow,tell me if anyone confirm it-------&lt;br /&gt;
----------(by zhblue(newsclanATgmail.com))-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -b \&lt;br /&gt;
    -f /mnt/hda1/isotemp -B 65536 - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
I noted several problems with the commands above:&amp;lt;br&amp;gt;&lt;br /&gt;
1) The option &amp;quot;-no-bak&amp;quot; excludes files with the ending &amp;quot;.bak&amp;quot;. Non-backup files with this ending are found in some software packages, e.g. glest. It is safer not to use this option.&amp;lt;br&amp;gt;&lt;br /&gt;
2) Just calling &amp;quot;create_compressed_fs - 65536&amp;quot; gives a warning about old command syntax. The compatible parameters are &amp;quot;-m -B 65536&amp;quot;. The later examples here already fixed this, the first example still uses the deprecated version.&lt;br /&gt;
&lt;br /&gt;
===Live CD ISO===&lt;br /&gt;
If all went well, onto making the final CD-ROM Image:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(this will update the md5 hashes of the files included in the ISO, used for integrity checking) Now to burn the image; for Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(the ISO is stored in &amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Burn the ISO using your favorite tools, and you're ready!&lt;br /&gt;
&lt;br /&gt;
==How to add new device driver to KNOPPIX==&lt;br /&gt;
&lt;br /&gt;
Recently in a client project, I added the Digital Persona’s finger print driver to the Knoppix 5.1 distribution as an embedded solution to this project. This is a typical case where both the kernel level driver and the user level drivers and libraries are involved. &lt;br /&gt;
&lt;br /&gt;
Most of the Knoppix books and online documentation have documented about how to keep a persistent storage of user configuration and user data. But those persistent configuration only saves the data in /home and /etc directories. If you have added kernel level drivers and/or other system libraries which are not in above two directories, you have to save the file images as a whole right after the boot. The saved file image can be big and may not what you want as a regular usage model. If you are building a customed Knoppix image for a long term solution, definitely you want to remaster the Knoppix to make the new drives be a permanent part of it.&lt;br /&gt;
&lt;br /&gt;
The Digital Persona’s OneTouch SDK for their finger print scanner driver comes with a kernel level driver source code, plus a set of user level application libraries, as well as a sample test application.  The SDK do not have a ready made binary for Debian or Knoppix. So I have to compile it from the source SDK.  However, the CD version of Knoppix 5.1 do not even come with the source include header files to compile a kernel level driver. So I have to compile it under the DVD version of the Knoppix 5.1 and copy the compiled binary to the CD version of Knoppix 5.1 to do testing and remastering. The steps I have tried to make it work under Knoppix are as follows:&lt;br /&gt;
&lt;br /&gt;
1.	First compile the driver under DVD version of the Knoppix. Change the source code build scripts so that the include files and library path are matching what we have in Knoppix. The details are specific to the OneTouch SDK itself. If you are interested about this detail, write to me.&lt;br /&gt;
&lt;br /&gt;
2.	Install the just built kernel driver, the user libraries to their regular location as we will show in following step 4. And then build and run their sample applications per Digital Persona’s instruction. This proves that the basic kernel module build steps are built correctly and the user level libraries are working properly in a standard installation. This is important before we moved to chroot environment to make this changes permanent to our remastered Knoppix.&lt;br /&gt;
&lt;br /&gt;
3.	Then I followed the Knoppix remastering instructions documented in the book of “Live Linux CD” by Christoper Negus.&lt;br /&gt;
&lt;br /&gt;
4.	In the above remastering instructions, there is a step to update all the Debian packages and other software under the chroot environment.  It is at this step that I re-run the drivers installation steps like I have done in above step 2 in the real root environment.  In this particular case, it is make a directory and copy the kernel module file mod_usbdpfp.ko to that directory as follows:&lt;br /&gt;
&lt;br /&gt;
mkdir /lib/modules/2.6.19/kernel/drivers/biometric&lt;br /&gt;
cp mod_usbdpfp.ko /lib/modules/2.6.19/mod_usbdpfp.ko&lt;br /&gt;
&lt;br /&gt;
And also copy all those Digital Persona user level libraries to following location:&lt;br /&gt;
&lt;br /&gt;
cp libdpfp* /usr/lib&lt;br /&gt;
&lt;br /&gt;
5.	I then run /sbin/depmod to let system detects the new kernel mode driver I have installed. This will refresh the /dev directory so it will have entries like:&lt;br /&gt;
&lt;br /&gt;
/dev/usbdpfpPNP&lt;br /&gt;
/dev/usbdpfp0&lt;br /&gt;
&lt;br /&gt;
At this time, if all works right, when you run command lsmod, you will also see something like:&lt;br /&gt;
&lt;br /&gt;
	mod_usbdpfp&lt;br /&gt;
&lt;br /&gt;
shows up in the loaded module list&lt;br /&gt;
&lt;br /&gt;
6.	At this time, you are ready to make a remaster of the Knoppix. Next time when you boot up with this remastered Knoppix, it will have the kernel driver and user level libraries setup ready for you to run the sample applications. Just as if you have done above step 2 and step 4 right after a refresh reboot from the original Knoppix CD.     &lt;br /&gt;
&lt;br /&gt;
John Xu, USA.  ( johnxu at n2k.net )&lt;br /&gt;
&lt;br /&gt;
=Tips=&lt;br /&gt;
I have had good results remastering working from the CD as root working from fluxbox. Just say &amp;quot;knoppix 2&amp;quot; at the boot prompt and it will boot you to a root prompt where you can then say &amp;quot;startx /usr/bin/fluxbox&amp;quot;. I like to use the xterm unicode shell.&lt;br /&gt;
&lt;br /&gt;
==Package Management==&lt;br /&gt;
While working chroot doing the remastering I like to use &lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
to remove packages because before it does anything it will stop and show details on what it is fixing to remove and let you say &amp;quot;yes or no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you don't use the above &amp;quot;apt-get&amp;quot; instructions and have a lot to cleanup and purge, here's the easy way to do it: &lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge&lt;br /&gt;
That will make a list of all removed packages to purge and then you just say &lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
and you're all done. &lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
is a one-line version of this. Also use &lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
==Alternatives for Low-Memory Machines==&lt;br /&gt;
You don't really need 1G swap as there are two new tools to create compressed filesystems. Here are some candidates to make ''compressed'' fs:&lt;br /&gt;
* Valentijn's rewrite [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Quozl's port of compressloop for Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Quozl's distributed compressloop (use more than one processor to speed things up) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Justin's patch [http://s.bouncybouncy.net/~justin/code/] (link broken) I also just wrote a distributed cloop compressor(or for smp)  It's in that same directory.&lt;br /&gt;
&lt;br /&gt;
==Test CD Image Without Burning a CD==&lt;br /&gt;
If you have a spare partition with at least 700MB free space formatted with ext2, ext3 or Vfat, you can use this for test by booting from a floppy disk. A floppy boot will look for a partiton with /KNOPPIX/ in the root, and the compressed image /KNOPPIX/KNOPPIX. Instead of using the sub-directory /mnt/hda1/knx/master/KNOPPIX/ as described above, it should be called /mnt/hda2/KNOPPIX/ . The root index.html will then be located at /mnt/hda2/index.html and the compressed image will be at /mnt/hda2/KNOPPIX/KNOPPIX . Now you can boot from floppy and use /mnt/hda2 as your image. For further information see [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
If you don't have an extra partition or you don't want to do so much for it, you can use Qemu ( see [http://fabrice.bellard.free.fr/qemu/] ) with the ISO image like this:&lt;br /&gt;
 qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -net user&lt;br /&gt;
You even do not have to build a hard disk image before, just install Qemu and try this. Amazing!&lt;br /&gt;
&lt;br /&gt;
==Test remastered version without creating cloop file/iso==&lt;br /&gt;
i use a setup similar to knoppix terminal server to test the remastered files without having to recreate a&lt;br /&gt;
cloop image every time: the remastered files live in an ext2 filesytem in a loopfile (knoppix_loop) mounted rw (this is where i chroot in). when i want to test the current setup, i have another machine network boot and use the files from the loopfile directly (needs another miniroot.gz). See [[User:Ml#dev_setup]]&lt;br /&gt;
&lt;br /&gt;
If you want to use only one machine, you'll have to reboot (or use qemu) and use the &amp;quot;loopfile&amp;quot; and &amp;quot;fromhd&amp;quot; cheatcodes (see [[User:Ml#miniroot_changes]]). For example, this is what my grub boot entry looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title           Remastered Knoppix&lt;br /&gt;
root            (hd0,0)&lt;br /&gt;
kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Booting Knoppix images with GRUB==&lt;br /&gt;
* First copy /boot off the Knoppix cd to your boot partition (or even your dos partition). I named mine boot.knoppix&lt;br /&gt;
Copy the master/KNOPPIX directory to your root directory of any hard disk. You may place it somewhere other than the boot partition (ext2/3, reiserfs, vfat are supported).&lt;br /&gt;
* for Knoppix &amp;lt;= 3.3, put the following in your /boot/grub/menu.lst:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* notice the fromhd parameter: it's the location of the /KNOPPIX directory&lt;br /&gt;
* reboot and have fun.&lt;br /&gt;
&lt;br /&gt;
==Helpful Scripts==&lt;br /&gt;
----&lt;br /&gt;
This is the recommended directory layout for remastering KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
the following script &amp;quot;remaster&amp;quot; will do the remaster process for you. Use as root, or you will end up with wrong access rights in the image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-04-02.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
The following script will loop-mount boot floppy image and initrd image for modification. The umount function will build a new initrd image and put it back on the boot floppy image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
==Tips around apt-get to install/update/remove applications==&lt;br /&gt;
(by gnarvaja)&lt;br /&gt;
* If you booted from CD, even on a HD install (example: Pivot Install) instead of copying the original CD and KNOPPIX directory to the HD, you can use them directly from their mount points.&lt;br /&gt;
* Another alternative is to mount an ISO image of the original CD as a loop device and mount the KNOPPIX image as a '''cloop''' device. You will save close to 2GB of space. Script to mount from an ISO image:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assumes that the current directory is the working space&lt;br /&gt;
 # original.iso is an image of the CD we will be using as master&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # initialize the compressed loop device&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
&lt;br /&gt;
* Get '''apt-spy''' and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original '''sources.list''' just in case.&lt;br /&gt;
* Another technique is to modify '''sources.list'''. Replace the string '''.de.''' in the ftp addresses (ftp.de.debian.org) with the code corresponding to your country. Examples: USA -&amp;gt; .us. (ftp.us.debian.org), Brazil -&amp;gt; .br. (ftp.br.debian.org). Check the Debian site for debian.org mirrors in your country.&lt;br /&gt;
* Remember to uncomment the '''linuxtag''' ftp addresses to get the latest and greatest from Knoppix&lt;br /&gt;
* Use '''apt-get update''' to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the '''-s''' option to simulate the installation.&lt;br /&gt;
* Before doing the update, I modified my default releases to '''testing''', that means that the software I'll be using will have a good balance of stability and features. Knoppix uses '''unstable''' by default, which is too risky for my personal taste.&lt;br /&gt;
* Get '''[apt-get install] locale''' and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules and localized manual pages.&lt;br /&gt;
* I use '''aptitude''' to get/remove applications, it is character based so it works with init 2. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.&lt;br /&gt;
* When installing applications it is likely that your '''/etc/rc?.d''' directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave '''/etc/rc2.d''' and '''/etc/rc5.d''' as close as the originals as possible and modify '''/etc/rc3.d''' and '''/etc/rc4.d''' to test new stuff. '''Example:''' You may want to have ntfs installed, but not necessarily running by default. Same with apache, mysql and many others.&lt;br /&gt;
* When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other installation utilty. Make sure to check the messages and manually remove those directories.&lt;br /&gt;
* After you are done, '''aptitude''' may leave some files behind. Here's a clean up script I use:&lt;br /&gt;
&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Clean package files generated by aptitude&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
=Common Problems=&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] Chroot problems accessing device files&lt;br /&gt;
&lt;br /&gt;
* You've &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt;'d (into whatever window manager you like) and you start a terminal (gnome-terminal, konsole, xterm).  Nothing happens (such is the case in fluxbox, and you'll see an error in you &amp;lt;code&amp;gt;~/.xsession-errors&amp;lt;/code&amp;gt; file).  Or perhaps the error is helpfully displayed: &amp;lt;code&amp;gt;&lt;br /&gt;
  get_pty: not enough ptys&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I had plenty yesterday... but then I &amp;lt;code&amp;gt;chroot&amp;lt;/code&amp;gt;ed so, to solve this, &amp;lt;code&amp;gt;&lt;br /&gt;
  # NOT in your chroot environment&lt;br /&gt;
  cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
  MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
  # enter your chroot environment&lt;br /&gt;
  chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
  # and mount /dev/pts&lt;br /&gt;
  mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
it might give that same &amp;quot;fstab not found&amp;quot; error as mounting proc&lt;br /&gt;
does.  so do what you'd do then, disregard.&lt;br /&gt;
&lt;br /&gt;
start your X up again and try your terminal, should work.&lt;br /&gt;
thanks to: technovelty[http://www.technovelty.org/linux/tips/xinchroot.html] for the final enlightenment&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
If my howto is too confusing, or you'd like a second opinion, check out charan's very nice remastering howto: http://brainstorms.in/knoppix&lt;br /&gt;
Another Howto is at  http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
There is a wizard, which knows all the unpacking, compressing and CD-recording steps mentioned here. It also shows a shell where you can update the uncompressed KNOPPIX system using debian's standard software installation tools. It is called mmkcdrom and part of the plugscript package: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Yet another HOWTO, for shell freaks, is at http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Be sure to check out the [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] for ideas and help with remastering.&lt;br /&gt;
&lt;br /&gt;
* If you want to add a custom kernel, check out the [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* There also a guide at O'Reilly on the same topic : [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
Thats it. This is an updated version of my previous howto. This is not meant for linux beginners, you will need to know your way around linux to get this to work. I'll update this as corrections/improvements/etc come through.&lt;br /&gt;
&lt;br /&gt;
=Thanks=&lt;br /&gt;
Thanks to aay, charan, Tech2k, and #knoppix for some corrections and tips and ideas.  Feel free to edit or add to this howto.&lt;br /&gt;
Note about swap:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
* German Version: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Spanish Version: [[Knoppix Remastering Howto Spanish]]  en español&lt;br /&gt;
* French Version: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Indonesian Version: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Russian Version: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
* Brazilian Portuguese Version: [[Knoppix Remastering Howto Brazilian Portuguese]]&lt;br /&gt;
* Italian Version: [[Knoppix Remastering Howto Italiano]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto</id>
		<title>Knoppix Remastering Howto</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto"/>
				<updated>2008-05-17T06:08:06Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* Thanks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide that will show you how to remaster KNOPPIX. (Note: commands should appear on one line, so please maximize the window. If you have any comments/suggestions please post below.)&lt;br /&gt;
&lt;br /&gt;
You may wish to start from an already customized Knoppix, so you don't have to do as much work (such as removing programs). If so, see [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
=System Requirements=&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** at least 1 GB of FREE RAM+Swap total (e.g. 256M ram, and 750M swap AVAILABLE) (unless you use a different compression program - look in this page for compressloop)&lt;br /&gt;
** 3 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB free RAM + swap (for fullsized DVD)&lt;br /&gt;
** 15 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
==Setting up for Remastering==&lt;br /&gt;
# Boot from the ''Knoppix CD''&lt;br /&gt;
# Open a root shell:&lt;br /&gt;
#* Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Root Shell&lt;br /&gt;
#* Note: All commands below are run from this root shell.&lt;br /&gt;
# Configure your Internet connection (we'll need this later). If you use DHCP, it should already be configured.&lt;br /&gt;
#* Note: Run '''ifconfig''' to check.&lt;br /&gt;
# Find the partition you will use to work on. In this example it is called '''hda1''' . The partition should have a minimum of 3 GB free space&lt;br /&gt;
# Mount the partition:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: Make sure that it is read/write or you will get errors when you later chroot. To check: run '''mount'''&lt;br /&gt;
# Create a root directory to work in -- if you put all your files here it will be easy to clean up&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you don't have 1 GB RAM (  '''egrep &amp;quot;(MemTotal|SwapTotal)&amp;quot; /proc/meminfo &amp;amp;&amp;amp; echo &amp;quot;(physical+swap)&amp;quot;''' ) then you will need a swapfile:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;cd /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;dd if=/dev/zero of=swapfile bs=1M count=750&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkswap swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;swapon swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make 2 directories, one for your new Master CD, one for the source, on a disk partition. Also, make additional directories under these named KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now, copy the KNOPPIX files to your source directory :&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: This will take a long time (you are copying 2GB).  Warning: you will be tempted to replace this copy command with a much faster procedure: create an empty directory, then use unionfs to merge the empty directory with /KNOPPIX in order to create the read-write copy.  However, as of Knoppix 4.0.2, there is a bug in unionfs that causes this faster procedure to fail.  For now, stick with the copy-command shown above.&lt;br /&gt;
# Additionally, copy the 'boot' folder from your cdrom - you'll need these files to build the ISO later.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# For Knoppix 5.0.1 you also have to copy the 'modules' folder:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy the main HTML page for the startup page:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy everything necessary files except the ~700 Mb KNOPPIX file.&lt;br /&gt;
#* &amp;lt; 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;gt;= 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* for the DVD Version you have to use -size -15000k and copy the KNOPPIX2 folder like this&lt;br /&gt;
#** &amp;lt;pre&amp;gt;cp -ar /KNOPPIX2/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# setup the environment for chroot&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you see errors regarding &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;, see the [[#Common Problems|common problems]] section&lt;br /&gt;
You are now chrooted. &amp;quot;/&amp;quot; is actually &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Working in the Chroot Environment==&lt;br /&gt;
Remember that anything you do or create in the chrooted environment will get burned to the CD.  If you make any changes (e.g,. to the APT configuration, proxy settings, etc.), make a note to back the changes out before remastering.&lt;br /&gt;
===Internet Access===&lt;br /&gt;
To use the Internet you need to edit &amp;lt;tt&amp;gt;/etc/resolv.conf&amp;lt;/tt&amp;gt; to add your nameserver or exit the chroot and copy the outer &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; into the chroot folder: &lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
(proxies (a.k.a. doing it at work): you can type &amp;quot;export http_proxy=http://your.proxy.com:&amp;lt;port&amp;gt;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
To check your chrooted internet connection,&lt;br /&gt;
 ping google.com&lt;br /&gt;
(if ICMP is barred at some corporate firewall or something then try &amp;quot;lynx http://www.google.com&amp;quot; and see if you get the page -after a cookie &amp;quot;allow&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===SMB access===&lt;br /&gt;
Also change smb.conf to your MS group if you want smbd support (MSHOME is XP Home ed. usually, and WORKGROUP is 9x Windows)&lt;br /&gt;
===APT===&lt;br /&gt;
Update your package list with '''apt-get update'''.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: If ''''apt-get update''' fails with &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, you need to make sure your chrooted environment is mounted without the &amp;quot;nodev&amp;quot; option. (see above where it talks about the /dev/null errors when entering the chroot environment for the first time)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Warning''': apt-get upgrade is a ''BAD IDEA''. It will, quite probably, render your KNOPPIX remaster unbootable, or broken in some way. A far safer method is to only upgrade packages as necessary.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note: If apt-get fails with &amp;quot;Dynamic NMap ran out of room&amp;quot; ''' you might try this little gem, which fixed the problem for me:&lt;br /&gt;
 #echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&lt;br /&gt;
(I did this while chrooted as described above.)&lt;br /&gt;
&lt;br /&gt;
Before you can add stuff, you will probably need to remove some packages.  To get a list of packages installed, type this:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
If you are looking for big installed packages then the command&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
will list the  packages  with size in descending order.&lt;br /&gt;
&lt;br /&gt;
At least ten times faster is the command&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
and you don't need dpkg-awk or awk or perl; however it does not exclude packages that are not installed.  If you have trouble with the above sort command, try using KPackage, expanded all the trees and sorted by the size column to find big packages.&lt;br /&gt;
&lt;br /&gt;
Or, you could use this command to get the qpkg-query speed with the non-installed packages not listed:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
It does the same thing as above, I assume.  I couldn't get the first one to work because I don't have dpkg-awk.&lt;br /&gt;
&lt;br /&gt;
To remove a package (and all packages dependant on it), type this:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
To check for orphaned packages, type this:&lt;br /&gt;
 deborphan&lt;br /&gt;
Want to save more space by getting rid of those pesky orphans (how cruel!), type this ('''Warning''', you won't be prompted yes/no to remove these packages.  When you press Enter after this command, those packages ''will be gone''):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
Now the good stuff.  If you wish to add a package, type this:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
What, don't know what packages to install?  Type this.  When the list appears, you can peruse (over 13k lines!) or search for things using &amp;lt;tt&amp;gt;/''search-term''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
When you're done removing and adding packages, a good way to clean up is by typing this&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Also, because the Debian package system keeps a cache of downloaded packages, you may want to run the following to clear out those spare files:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
===User Settings===&lt;br /&gt;
User settings are in /etc/skel.  This directory will be copied to make new user home directories.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;tip: don't put files in /root they will be only available (at runtime) in /KNOPPIX/root&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the default user 'knoppix' is not created by adduser(1), thus /etc/skel is not copied completely but rather selectively.  That is, to make a file .xyrc appear in /home/knoppix, it is not sufficient to place it in /etc/skel.  One possibility is to extend the code in /etc/X11/Xsession.d/45xsession which is responsible for filling /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
===Autorunning Programs===&lt;br /&gt;
When you want to autorun some programs, one can create a script and put it in the directory &amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt; (This only loads items before X loads).  Read up on the SysV init process for more possibilities.&lt;br /&gt;
&lt;br /&gt;
''For X-programs consider &amp;lt;tt&amp;gt;/home/knoppix/.kde/Autostart&amp;lt;/tt&amp;gt; but this may transfer form &amp;lt;tt&amp;gt;/etc/skel/.kde/Autostart&amp;lt;/tt&amp;gt; on boot''--[[User:12.106.237.2|12.106.237.2]] 18:08, 7 December 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Editing the KNOPPIX auto-configuration script==&lt;br /&gt;
You can find a lot of interesting information about how KNOPPIX auto-configures you system by looking in the /etc/init.d/knoppix-autoconfig script. Of particular note are the following.&lt;br /&gt;
&lt;br /&gt;
===Changing the default KDE background image===&lt;br /&gt;
The auto-configuration script sets the default KDE background image to be an image from the CD-ROM. An image that you can easily change when you are remastering KNOPPIX.&lt;br /&gt;
** In KNOPPIX 3.3 and below it is /cdrom/KNOPPIX/background.gif&lt;br /&gt;
** In KNOPPIX 3.4 and above it is /cdrom/KNOPPIX/background.jpg&lt;br /&gt;
&lt;br /&gt;
===Editing floppy and CD-ROM use or adding a custom script===&lt;br /&gt;
The auto-configuration script sets up both your CD-ROM and your floppy disk. The commands for doing this are 'floppyconfig' and 'cdromconfig', respectively. The auto-configuration script will also run cdrom/KNOPPIX/knoppix.sh, which is an easy script to change when remastering KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
===Changing the default boot parameters===&lt;br /&gt;
All boot parameters obtain default values from the /etc/init.d/knoppix-autoconfig script. This is one massive BASH script (you best know your BASH to play with this), but it is the place that you can edit any of the default boot parameters.  For example, to switch from 'kde' to 'twm' as default desktop just search for the place where 'kde' is provided as default value (variable DESKTOP, IIRC). Another example would be changing the default language.&lt;br /&gt;
&lt;br /&gt;
Note, if you are interested in changing the default language KDE uses, the easiest thing to do is to load KDE, instructions are below, and use the KDE configuration utility to select your language of interest.&lt;br /&gt;
&lt;br /&gt;
==X Session Configuration==&lt;br /&gt;
When working with X-based programs you will have to make sure that your display is set appropriately. You can do this manually when remastering KNOPPIX. Also, two scripts related to X Session is where you can change or disable the startup and shutdown sounds.&lt;br /&gt;
&lt;br /&gt;
===Starting X-based programs===&lt;br /&gt;
When testing X-based programs, you will have to &lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
which will allow you to connect to your normal X session.  Alternately (if you need to test window managers), you can create a nested X session.  Outside of the chroot, run&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
Within the chroot, set your DISPLAY variable&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
&lt;br /&gt;
Interesting stuff in /etc/init.d/xsession :&lt;br /&gt;
* it ALSO sets background as /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the startup sound===&lt;br /&gt;
The startup sound is played by /etc/X11/Xsession.d/45xsession. You can disable it by commenting out the following lines.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the shutdown sound===&lt;br /&gt;
The shutdown sound is played by /etc/init.d/xsession. You can disable it by commenting out lines 210-220 from the script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change default window manager===&lt;br /&gt;
&lt;br /&gt;
Open /etc/init.d/knoppix-autoconfig and look for lines which look like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Allow only supported windowmanagers                                           &lt;br /&gt;
# Actually, this check is useless because it's done again in 45xsession. -KK    &lt;br /&gt;
# case &amp;quot;$DESKTOP&amp;quot; in gnome|enlightenment|kde|larswm|xfce|xfce4|lg3d|ratpoison|blackbox|openbox|windowmaker|wmaker|icewm|fluxbox|twm|nx|rdp|kiosk) ;; *) DESKTOP=&amp;quot;kde&amp;quot;; ;; esac                                                                  &lt;br /&gt;
[ -n &amp;quot;$DESKTOP&amp;quot; ] || DESKTOP=&amp;quot;kde&amp;quot;                                          &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change &amp;quot;kde&amp;quot; in the last quoted line to whatever you like, for example to &amp;quot;fluxbox&amp;quot; or &amp;quot;twm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Changing the boot graphic, boot message, and startup script text==&lt;br /&gt;
While you are in the chroot environment you can easily change the boot messages, the boot graphic, and the default KDE background graphic.&lt;br /&gt;
&lt;br /&gt;
===Changing the boot graphic===&lt;br /&gt;
The 'boot graphic' is the first image you see when the CD or DVD boots. It looks similar to ASCII art and it is normally something flashy that says 'Knoppix'. You can change this to be any graphic that you please, but you must use a 640x400 graphic that has only 16 colors.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old logo in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a 640x400 pixel 16 color graphic and save it as a GIF, e.g. 'logo.16.gif'. GIMP can easily do this. Note, you can use a graphic that originally had more than 16 colors, but it is critical that you convert the graphic to 16 colors before doing the next step. &lt;br /&gt;
#Convert the GIF to lss16 using the tools included on the Knoppix CD.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the boot message===&lt;br /&gt;
The 'boot message' is the message that you see under the 'boot graphic' on the initial screen when the Knoppix CD or DVD loads. It normally says something along the lines of Knoppix with the version number and includes a link to the Knoppix website. You can change this text to be whatever you please, but you shouldn't add too much text or it will make the boot screen look funny. Restricting yourself to a single line of text that is no larger than the default one is a good idea.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old message in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the message with a text editor. You'll see at the top of the message that it shows the graphic. Don't change this text, just the line under.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the startup script text===&lt;br /&gt;
The 'startup script text' is the text that you see after the initial boot screen, while Knoppix loads and configures your system. You can change as much of this text as you please. You can even add addition lines to the script; however, it is recommended that you don't play with this file. Limiting yourself to editing the 'Welcome to KNOPPIX' message is a good idea. &lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old minirt.gz in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Uncompress minirt.gz&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a temporary directory to mount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Mount the minirt filesystem as an ext2 filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#::or if the above does not work use&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o loop&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the linuxrc script to display the message you want. You'll find the default message approximately 2 pages down and it'll be using several colors, i.e. ${WHITE}, ${RED}, etc., so it might be slightly tricky to spot.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#unmount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Compress the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove your temporary directory.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching KDE to Change Menus, Icons, etc.==&lt;br /&gt;
While you are in the chroot environment you can load KDE and use the configuration tools to change buttons, icons, etc. Once you are finished you can exit KDE and copy /home/knoppix to /etc/skel to keep these changes. To load KDE do the following.&lt;br /&gt;
&lt;br /&gt;
#If you are not at runlevel 2 (i.e. if you are already in KDE), switch to runlevel 2.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /etc/skel to /home/knoppix&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Change permissions to the user 'knoppix'&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy over your X11 configuration to the chroot'd environment (press ctrl+alt+F2 to switch to a non-chroot'd terminal, then ctrl+alt+F1 to switch back when done)&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*&amp;lt;blockquote&amp;gt;'' Knoppix 3.7: I think it's XF86Config-4 rather than xorg.conf.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#(Optional)Switch to user 'knoppix'. If you want to uninstall packages, stay as root -- e.g. skip this step. If you want to configure the buttons, icons, background, etc., that you see when KDE boots, be sure to do this step.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Launch KDE&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Do your KDE changes&lt;br /&gt;
##Exit KDE&lt;br /&gt;
##Exit su and switch back to user 'root'.&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /home/knoppix back to /etc/skel to keep the changes&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; mv /etc/skel /etc/skel-old&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Set the owner back to root&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove the xorg.conf file&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you find that some of your settings are not persistent after booting the new image, check the initialization file at /etc/X11/Xsession.d/45xsession.  By default, Knoppix does '''not''' simply copy over all files from /etc/skel.  You may need to make modifications here if you wish to do something different.&lt;br /&gt;
&lt;br /&gt;
===Changing the ksplash KDE graphics===&lt;br /&gt;
You can change the graphics that KDE shows via ksplash when it first loads. These graphics are in the &amp;lt;b&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/b&amp;gt; directory. You'll most likely want to swap out &amp;lt;b&amp;gt;splash_top.png&amp;lt;/b&amp;gt; for a custom 400x248 PNG graphic. Note that ksplash will not automatically put a border around your graphic. If you'd like a border, you have to manually add it to your graphic.&lt;br /&gt;
&lt;br /&gt;
==Leaving the Chroot==&lt;br /&gt;
If you mounted it, you'll need to unmount /proc - very important! &lt;br /&gt;
 umount /proc&lt;br /&gt;
Press '''CTRL+D''' to leave being chrooted.&lt;br /&gt;
&lt;br /&gt;
==Re-Entering the chroot==&lt;br /&gt;
If you've left the chroot, but you want to go back in and modify some things...&lt;br /&gt;
&lt;br /&gt;
Remount the local hard disk (if needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setup the environment for chroot&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&lt;br /&gt;
mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remastering the ISO==&lt;br /&gt;
We've finished customizing and ready to burn!&lt;br /&gt;
First do some cleanup: &lt;br /&gt;
* remove any .bash_history files, tmp files, etc.&lt;br /&gt;
* back out any changes you don't want burned back to the disc&lt;br /&gt;
* make sure you umount /proc /dev /sys or mkisofs will not work properly&lt;br /&gt;
* &amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===KNOPPIX Compressed Image===&lt;br /&gt;
Now we'll make the big &amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt; file which is an ISO 9660 filesystem compressed for use by the &amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt; driver: &lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
      -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
   | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
the &amp;quot;www.knoppix.net&amp;quot; and &amp;quot;Knoppix.net filesystem&amp;quot; can be changed to what you want to call the file. You will get an error that it doesn't conform to ISO standards -- you can ignore this.  Note that, to run &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;, you'll need to have enough space to store the entire ISO in RAM/swap.  Ensure you have at least 800M of free space before starting.&lt;br /&gt;
&lt;br /&gt;
In Knoppix 3.4 the &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt; script has been updated so be sure to use it to obtain the best result. It has a new option '''-b''' (best), which enables the best compression by using different compression schemes and tries to optimize that way, but be careful, because that option is slow (10x slower).&lt;br /&gt;
&lt;br /&gt;
Note: The above didn't work for me using the latest create_compressed_fs. I could create the ISO but it couldn't read the compressed image properly when booting (I/O errors when reading the cloop0 device). I think this was because create_compressed_fs didn't have enough RAM and it was just failing silently. The command below did work though. It uses a file rather than memory for temporary storage:&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
    65536 -f /mnt/hda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
------I tried this ,but it report a error,so i think there is some mistake in the command,it may be like follow,tell me if anyone confirm it-------&lt;br /&gt;
----------(by zhblue(newsclanATgmail.com))-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -b \&lt;br /&gt;
    -f /mnt/hda1/isotemp -B 65536 - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
I noted several problems with the commands above:&amp;lt;br&amp;gt;&lt;br /&gt;
1) The option &amp;quot;-no-bak&amp;quot; excludes files with the ending &amp;quot;.bak&amp;quot;. Non-backup files with this ending are found in some software packages, e.g. glest. It is safer not to use this option.&amp;lt;br&amp;gt;&lt;br /&gt;
2) Just calling &amp;quot;create_compressed_fs - 65536&amp;quot; gives a warning about old command syntax. The compatible parameters are &amp;quot;-m -B 65536&amp;quot;. The later examples here already fixed this, the first example still uses the deprecated version.&lt;br /&gt;
&lt;br /&gt;
===Live CD ISO===&lt;br /&gt;
If all went well, onto making the final CD-ROM Image:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(this will update the md5 hashes of the files included in the ISO, used for integrity checking) Now to burn the image; for Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(the ISO is stored in &amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Burn the ISO using your favorite tools, and you're ready!&lt;br /&gt;
&lt;br /&gt;
==How to add new device driver to KNOPPIX==&lt;br /&gt;
&lt;br /&gt;
Recently in a client project, I added the Digital Persona’s finger print driver to the Knoppix 5.1 distribution as an embedded solution to this project. This is a typical case where both the kernel level driver and the user level drivers and libraries are involved. &lt;br /&gt;
&lt;br /&gt;
Most of the Knoppix books and online documentation have documented about how to keep a persistent storage of user configuration and user data. But those persistent configuration only saves the data in /home and /etc directories. If you have added kernel level drivers and/or other system libraries which are not in above two directories, you have to save the file images as a whole right after the boot. The saved file image can be big and may not what you want as a regular usage model. If you are building a customed Knoppix image for a long term solution, definitely you want to remaster the Knoppix to make the new drives be a permanent part of it.&lt;br /&gt;
&lt;br /&gt;
The Digital Persona’s OneTouch SDK for their finger print scanner driver comes with a kernel level driver source code, plus a set of user level application libraries, as well as a sample test application.  The SDK do not have a ready made binary for Debian or Knoppix. So I have to compile it from the source SDK.  However, the CD version of Knoppix 5.1 do not even come with the source include header files to compile a kernel level driver. So I have to compile it under the DVD version of the Knoppix 5.1 and copy the compiled binary to the CD version of Knoppix 5.1 to do testing and remastering. The steps I have tried to make it work under Knoppix are as follows:&lt;br /&gt;
&lt;br /&gt;
1.	First compile the driver under DVD version of the Knoppix. Change the source code build scripts so that the include files and library path are matching what we have in Knoppix. The details are specific to the OneTouch SDK itself. If you are interested about this detail, write to me.&lt;br /&gt;
&lt;br /&gt;
2.	Install the just built kernel driver, the user libraries to their regular location as we will show in following step 4. And then build and run their sample applications per Digital Persona’s instruction. This proves that the basic kernel module build steps are built correctly and the user level libraries are working properly in a standard installation. This is important before we moved to chroot environment to make this changes permanent to our remastered Knoppix.&lt;br /&gt;
&lt;br /&gt;
3.	Then I followed the Knoppix remastering instructions documented in the book of “Live Linux CD” by Christoper Negus.&lt;br /&gt;
&lt;br /&gt;
4.	In the above remastering instructions, there is a step to update all the Debian packages and other software under the chroot environment.  It is at this step that I re-run the drivers installation steps like I have done in above step 2 in the real root environment.  In this particular case, it is make a directory and copy the kernel module file mod_usbdpfp.ko to that directory as follows:&lt;br /&gt;
&lt;br /&gt;
mkdir /lib/modules/2.6.19/kernel/drivers/biometric&lt;br /&gt;
cp mod_usbdpfp.ko /lib/modules/2.6.19/mod_usbdpfp.ko&lt;br /&gt;
&lt;br /&gt;
And also copy all those Digital Persona user level libraries to following location:&lt;br /&gt;
&lt;br /&gt;
cp libdpfp* /usr/lib&lt;br /&gt;
&lt;br /&gt;
5.	I then run /sbin/depmod to let system detects the new kernel mode driver I have installed. This will refresh the /dev directory so it will have entries like:&lt;br /&gt;
&lt;br /&gt;
/dev/usbdpfpPNP&lt;br /&gt;
/dev/usbdpfp0&lt;br /&gt;
&lt;br /&gt;
At this time, if all works right, when you run command lsmod, you will also see something like:&lt;br /&gt;
&lt;br /&gt;
	mod_usbdpfp&lt;br /&gt;
&lt;br /&gt;
shows up in the loaded module list&lt;br /&gt;
&lt;br /&gt;
6.	At this time, you are ready to make a remaster of the Knoppix. Next time when you boot up with this remastered Knoppix, it will have the kernel driver and user level libraries setup ready for you to run the sample applications. Just as if you have done above step 2 and step 4 right after a refresh reboot from the original Knoppix CD.     &lt;br /&gt;
&lt;br /&gt;
John Xu, USA.  ( johnxu at n2k.net )&lt;br /&gt;
&lt;br /&gt;
=Tips=&lt;br /&gt;
I have had good results remastering working from the CD as root working from fluxbox. Just say &amp;quot;knoppix 2&amp;quot; at the boot prompt and it will boot you to a root prompt where you can then say &amp;quot;startx /usr/bin/fluxbox&amp;quot;. I like to use the xterm unicode shell.&lt;br /&gt;
&lt;br /&gt;
==Package Management==&lt;br /&gt;
While working chroot doing the remastering I like to use &lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
to remove packages because before it does anything it will stop and show details on what it is fixing to remove and let you say &amp;quot;yes or no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you don't use the above &amp;quot;apt-get&amp;quot; instructions and have a lot to cleanup and purge, here's the easy way to do it: &lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge&lt;br /&gt;
That will make a list of all removed packages to purge and then you just say &lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
and you're all done. &lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
is a one-line version of this. Also use &lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
==Alternatives for Low-Memory Machines==&lt;br /&gt;
You don't really need 1G swap as there are two new tools to create compressed filesystems. Here are some candidates to make ''compressed'' fs:&lt;br /&gt;
* Valentijn's rewrite [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Quozl's port of compressloop for Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Quozl's distributed compressloop (use more than one processor to speed things up) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Justin's patch [http://s.bouncybouncy.net/~justin/code/] (link broken) I also just wrote a distributed cloop compressor(or for smp)  It's in that same directory.&lt;br /&gt;
&lt;br /&gt;
==Test CD Image Without Burning a CD==&lt;br /&gt;
If you have a spare partition with at least 700MB free space formatted with ext2, ext3 or Vfat, you can use this for test by booting from a floppy disk. A floppy boot will look for a partiton with /KNOPPIX/ in the root, and the compressed image /KNOPPIX/KNOPPIX. Instead of using the sub-directory /mnt/hda1/knx/master/KNOPPIX/ as described above, it should be called /mnt/hda2/KNOPPIX/ . The root index.html will then be located at /mnt/hda2/index.html and the compressed image will be at /mnt/hda2/KNOPPIX/KNOPPIX . Now you can boot from floppy and use /mnt/hda2 as your image. For further information see [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
If you don't have an extra partition or you don't want to do so much for it, you can use Qemu ( see [http://fabrice.bellard.free.fr/qemu/] ) with the ISO image like this:&lt;br /&gt;
 qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -net user&lt;br /&gt;
You even do not have to build a hard disk image before, just install Qemu and try this. Amazing!&lt;br /&gt;
&lt;br /&gt;
==Test remastered version without creating cloop file/iso==&lt;br /&gt;
i use a setup similar to knoppix terminal server to test the remastered files without having to recreate a&lt;br /&gt;
cloop image every time: the remastered files live in an ext2 filesytem in a loopfile (knoppix_loop) mounted rw (this is where i chroot in). when i want to test the current setup, i have another machine network boot and use the files from the loopfile directly (needs another miniroot.gz). See [[User:Ml#dev_setup]]&lt;br /&gt;
&lt;br /&gt;
If you want to use only one machine, you'll have to reboot (or use qemu) and use the &amp;quot;loopfile&amp;quot; and &amp;quot;fromhd&amp;quot; cheatcodes (see [[User:Ml#miniroot_changes]]). For example, this is what my grub boot entry looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title           Remastered Knoppix&lt;br /&gt;
root            (hd0,0)&lt;br /&gt;
kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Booting Knoppix images with GRUB==&lt;br /&gt;
* First copy /boot off the Knoppix cd to your boot partition (or even your dos partition). I named mine boot.knoppix&lt;br /&gt;
Copy the master/KNOPPIX directory to your root directory of any hard disk. You may place it somewhere other than the boot partition (ext2/3, reiserfs, vfat are supported).&lt;br /&gt;
* for Knoppix &amp;lt;= 3.3, put the following in your /boot/grub/menu.lst:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* notice the fromhd parameter: it's the location of the /KNOPPIX directory&lt;br /&gt;
* reboot and have fun.&lt;br /&gt;
&lt;br /&gt;
==Helpful Scripts==&lt;br /&gt;
----&lt;br /&gt;
This is the recommended directory layout for remastering KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
the following script &amp;quot;remaster&amp;quot; will do the remaster process for you. Use as root, or you will end up with wrong access rights in the image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-04-02.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
The following script will loop-mount boot floppy image and initrd image for modification. The umount function will build a new initrd image and put it back on the boot floppy image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
==Tips around apt-get to install/update/remove applications==&lt;br /&gt;
(by gnarvaja)&lt;br /&gt;
* If you booted from CD, even on a HD install (example: Pivot Install) instead of copying the original CD and KNOPPIX directory to the HD, you can use them directly from their mount points.&lt;br /&gt;
* Another alternative is to mount an ISO image of the original CD as a loop device and mount the KNOPPIX image as a '''cloop''' device. You will save close to 2GB of space. Script to mount from an ISO image:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assumes that the current directory is the working space&lt;br /&gt;
 # original.iso is an image of the CD we will be using as master&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # initialize the compressed loop device&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
&lt;br /&gt;
* Get '''apt-spy''' and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original '''sources.list''' just in case.&lt;br /&gt;
* Another technique is to modify '''sources.list'''. Replace the string '''.de.''' in the ftp addresses (ftp.de.debian.org) with the code corresponding to your country. Examples: USA -&amp;gt; .us. (ftp.us.debian.org), Brazil -&amp;gt; .br. (ftp.br.debian.org). Check the Debian site for debian.org mirrors in your country.&lt;br /&gt;
* Remember to uncomment the '''linuxtag''' ftp addresses to get the latest and greatest from Knoppix&lt;br /&gt;
* Use '''apt-get update''' to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the '''-s''' option to simulate the installation.&lt;br /&gt;
* Before doing the update, I modified my default releases to '''testing''', that means that the software I'll be using will have a good balance of stability and features. Knoppix uses '''unstable''' by default, which is too risky for my personal taste.&lt;br /&gt;
* Get '''[apt-get install] locale''' and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules and localized manual pages.&lt;br /&gt;
* I use '''aptitude''' to get/remove applications, it is character based so it works with init 2. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.&lt;br /&gt;
* When installing applications it is likely that your '''/etc/rc?.d''' directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave '''/etc/rc2.d''' and '''/etc/rc5.d''' as close as the originals as possible and modify '''/etc/rc3.d''' and '''/etc/rc4.d''' to test new stuff. '''Example:''' You may want to have ntfs installed, but not necessarily running by default. Same with apache, mysql and many others.&lt;br /&gt;
* When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other installation utilty. Make sure to check the messages and manually remove those directories.&lt;br /&gt;
* After you are done, '''aptitude''' may leave some files behind. Here's a clean up script I use:&lt;br /&gt;
&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Clean package files generated by aptitude&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
=Common Problems=&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] Chroot problems accessing device files&lt;br /&gt;
&lt;br /&gt;
* You've &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt;'d (into whatever window manager you like) and you start a terminal (gnome-terminal, konsole, xterm).  Nothing happens (such is the case in fluxbox, and you'll see an error in you &amp;lt;code&amp;gt;~/.xsession-errors&amp;lt;/code&amp;gt; file).  Or perhaps the error is helpfully displayed: &amp;lt;code&amp;gt;&lt;br /&gt;
  get_pty: not enough ptys&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I had plenty yesterday... but then I &amp;lt;code&amp;gt;chroot&amp;lt;/code&amp;gt;ed so, to solve this, &amp;lt;code&amp;gt;&lt;br /&gt;
  # NOT in your chroot environment&lt;br /&gt;
  cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
  MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
  # enter your chroot environment&lt;br /&gt;
  chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
  # and mount /dev/pts&lt;br /&gt;
  mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
it might give that same &amp;quot;fstab not found&amp;quot; error as mounting proc&lt;br /&gt;
does.  so do what you'd do then, disregard.&lt;br /&gt;
&lt;br /&gt;
start your X up again and try your terminal, should work.&lt;br /&gt;
thanks to: technovelty[http://www.technovelty.org/linux/tips/xinchroot.html] for the final enlightenment&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
If my howto is too confusing, or you'd like a second opinion, check out charan's very nice remastering howto: http://brainstorms.in/knoppix&lt;br /&gt;
Another Howto is at  http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
There is a wizard, which knows all the unpacking, compressing and CD-recording steps mentioned here. It also shows a shell where you can update the uncompressed KNOPPIX system using debian's standard software installation tools. It is called mmkcdrom and part of the plugscript package: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Yet another HOWTO, for shell freaks, is at http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Be sure to check out the [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] for ideas and help with remastering.&lt;br /&gt;
&lt;br /&gt;
* If you want to add a custom kernel, check out the [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* There also a guide at O'Reilly on the same topic : [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
Thats it. This is an updated version of my previous howto. This is not meant for linux beginners, you will need to know your way around linux to get this to work. I'll update this as corrections/improvements/etc come through.&lt;br /&gt;
&lt;br /&gt;
=Thanks=&lt;br /&gt;
Thanks to aay, &amp;lt;a href = &amp;quot;http://brainstorms.in&amp;gt; charan&amp;lt;/a&amp;gt;, Tech2k, and #knoppix for some corrections and tips and ideas.  Feel free to edit or add to this howto.&lt;br /&gt;
Note about swap&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
* German Version: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Spanish Version: [[Knoppix Remastering Howto Spanish]]  en español&lt;br /&gt;
* French Version: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Indonesian Version: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Russian Version: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
* Brazilian Portuguese Version: [[Knoppix Remastering Howto Brazilian Portuguese]]&lt;br /&gt;
* Italian Version: [[Knoppix Remastering Howto Italiano]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	<entry>
		<id>https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto</id>
		<title>Knoppix Remastering Howto</title>
		<link rel="alternate" type="text/html" href="https://mail.knoppix.net/wiki/Knoppix_Remastering_Howto"/>
				<updated>2008-05-15T16:27:02Z</updated>
		
		<summary type="html">&lt;p&gt;202.88.238.45: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a guide that will show you how to remaster KNOPPIX. (Note: commands should appear on one line, so please maximize the window. If you have any comments/suggestions please post below.)&lt;br /&gt;
&lt;br /&gt;
You may wish to start from an already customized Knoppix, so you don't have to do as much work (such as removing programs). If so, see [[Knoppix Customizations]].&lt;br /&gt;
&lt;br /&gt;
=System Requirements=&lt;br /&gt;
*CD-ISO&lt;br /&gt;
** at least 1 GB of FREE RAM+Swap total (e.g. 256M ram, and 750M swap AVAILABLE) (unless you use a different compression program - look in this page for compressloop)&lt;br /&gt;
** 3 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
*DVD-ISO&lt;br /&gt;
** 5 GB free RAM + swap (for fullsized DVD)&lt;br /&gt;
** 15 GB free on a '''Linux filesystem (ext2/3, xfs, etc.)''' formatted disk partition&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
==Setting up for Remastering==&lt;br /&gt;
# Boot from the ''Knoppix CD''&lt;br /&gt;
# Open a root shell:&lt;br /&gt;
#* Menu: Kmenu-&amp;gt;Knoppix-&amp;gt;Root Shell&lt;br /&gt;
#* Note: All commands below are run from this root shell.&lt;br /&gt;
# Configure your Internet connection (we'll need this later). If you use DHCP, it should already be configured.&lt;br /&gt;
#* Note: Run '''ifconfig''' to check.&lt;br /&gt;
# Find the partition you will use to work on. In this example it is called '''hda1''' . The partition should have a minimum of 3 GB free space&lt;br /&gt;
# Mount the partition:&lt;br /&gt;
#*&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: Make sure that it is read/write or you will get errors when you later chroot. To check: run '''mount'''&lt;br /&gt;
# Create a root directory to work in -- if you put all your files here it will be easy to clean up&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you don't have 1 GB RAM (  '''egrep &amp;quot;(MemTotal|SwapTotal)&amp;quot; /proc/meminfo &amp;amp;&amp;amp; echo &amp;quot;(physical+swap)&amp;quot;''' ) then you will need a swapfile:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;cd /mnt/hda1/knx&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;dd if=/dev/zero of=swapfile bs=1M count=750&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkswap swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;swapon swapfile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Make 2 directories, one for your new Master CD, one for the source, on a disk partition. Also, make additional directories under these named KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/master/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mkdir -p /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now, copy the KNOPPIX files to your source directory :&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /KNOPPIX/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* Note: This will take a long time (you are copying 2GB).  Warning: you will be tempted to replace this copy command with a much faster procedure: create an empty directory, then use unionfs to merge the empty directory with /KNOPPIX in order to create the read-write copy.  However, as of Knoppix 4.0.2, there is a bug in unionfs that causes this faster procedure to fail.  For now, stick with the copy-command shown above.&lt;br /&gt;
# Additionally, copy the 'boot' folder from your cdrom - you'll need these files to build the ISO later.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/boot /mnt/hda1/knx/master/boot&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# For Knoppix 5.0.1 you also have to copy the 'modules' folder:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -ar /cdrom/KNOPPIX/modules /mnt/hda1/knx/master/KNOPPIX/.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy the main HTML page for the startup page:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /cdrom/index.html /mnt/hda1/knx/master/&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Copy everything necessary files except the ~700 Mb KNOPPIX file.&lt;br /&gt;
#* &amp;lt; 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom/KNOPPIX &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/KNOPPIX/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;gt;= 3.4:&lt;br /&gt;
#** &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /cdrom &amp;amp;&amp;amp; find . -size -10000k -type f -exec cp -p --parents '{}' /mnt/hda1/knx/master/ \;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* for the DVD Version you have to use -size -15000k and copy the KNOPPIX2 folder like this&lt;br /&gt;
#** &amp;lt;pre&amp;gt;cp -ar /KNOPPIX2/* /mnt/hda1/knx/source/KNOPPIX&amp;lt;/pre&amp;gt;&lt;br /&gt;
# setup the environment for chroot&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you see errors regarding &amp;lt;tt&amp;gt;/dev/null&amp;lt;/tt&amp;gt;, see the [[#Common Problems|common problems]] section&lt;br /&gt;
You are now chrooted. &amp;quot;/&amp;quot; is actually &amp;quot;/mnt/hda1/knx/source/KNOPPIX&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Working in the Chroot Environment==&lt;br /&gt;
Remember that anything you do or create in the chrooted environment will get burned to the CD.  If you make any changes (e.g,. to the APT configuration, proxy settings, etc.), make a note to back the changes out before remastering.&lt;br /&gt;
===Internet Access===&lt;br /&gt;
To use the Internet you need to edit &amp;lt;tt&amp;gt;/etc/resolv.conf&amp;lt;/tt&amp;gt; to add your nameserver or exit the chroot and copy the outer &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; into the chroot folder: &lt;br /&gt;
 cp /etc/dhcpc/resolv.conf /mnt/hda1/knx/source/KNOPPIX/etc/dhcpc/resolv.conf&lt;br /&gt;
(proxies (a.k.a. doing it at work): you can type &amp;quot;export http_proxy=http://your.proxy.com:&amp;lt;port&amp;gt;&amp;quot;)&amp;lt;BR&amp;gt;&lt;br /&gt;
To check your chrooted internet connection,&lt;br /&gt;
 ping google.com&lt;br /&gt;
(if ICMP is barred at some corporate firewall or something then try &amp;quot;lynx http://www.google.com&amp;quot; and see if you get the page -after a cookie &amp;quot;allow&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
===SMB access===&lt;br /&gt;
Also change smb.conf to your MS group if you want smbd support (MSHOME is XP Home ed. usually, and WORKGROUP is 9x Windows)&lt;br /&gt;
===APT===&lt;br /&gt;
Update your package list with '''apt-get update'''.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: If ''''apt-get update''' fails with &amp;quot;FATAL -&amp;gt; Could not set non-blocking flag Bad file descriptor&amp;quot;, you need to make sure your chrooted environment is mounted without the &amp;quot;nodev&amp;quot; option. (see above where it talks about the /dev/null errors when entering the chroot environment for the first time)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Warning''': apt-get upgrade is a ''BAD IDEA''. It will, quite probably, render your KNOPPIX remaster unbootable, or broken in some way. A far safer method is to only upgrade packages as necessary.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note: If apt-get fails with &amp;quot;Dynamic NMap ran out of room&amp;quot; ''' you might try this little gem, which fixed the problem for me:&lt;br /&gt;
 #echo 'APT::Cache-Limit &amp;quot;25168524&amp;quot;;'&amp;gt;&amp;gt; /etc/apt/apt.conf&lt;br /&gt;
(I did this while chrooted as described above.)&lt;br /&gt;
&lt;br /&gt;
Before you can add stuff, you will probably need to remove some packages.  To get a list of packages installed, type this:&lt;br /&gt;
 dpkg-query -l&lt;br /&gt;
If you are looking for big installed packages then the command&lt;br /&gt;
 dpkg-awk &amp;quot;Status: .* installed$&amp;quot; -- Package Installed-Size | \&lt;br /&gt;
   awk '{print $2}' | egrep -v '^$' | xargs -n2 echo | \&lt;br /&gt;
   perl -pe 's/(\S+)\s(\S+)/$2 $1/' | sort -rg&lt;br /&gt;
will list the  packages  with size in descending order.&lt;br /&gt;
&lt;br /&gt;
At least ten times faster is the command&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n&lt;br /&gt;
and you don't need dpkg-awk or awk or perl; however it does not exclude packages that are not installed.  If you have trouble with the above sort command, try using KPackage, expanded all the trees and sorted by the size column to find big packages.&lt;br /&gt;
&lt;br /&gt;
Or, you could use this command to get the qpkg-query speed with the non-installed packages not listed:&lt;br /&gt;
 dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | grep -v deinstall | sort -n | awk '{print $1&amp;quot; &amp;quot;$2}'&lt;br /&gt;
It does the same thing as above, I assume.  I couldn't get the first one to work because I don't have dpkg-awk.&lt;br /&gt;
&lt;br /&gt;
To remove a package (and all packages dependant on it), type this:&lt;br /&gt;
 apt-get remove --purge ''name-of-package-to-remove''&lt;br /&gt;
To check for orphaned packages, type this:&lt;br /&gt;
 deborphan&lt;br /&gt;
Want to save more space by getting rid of those pesky orphans (how cruel!), type this ('''Warning''', you won't be prompted yes/no to remove these packages.  When you press Enter after this command, those packages ''will be gone''):&lt;br /&gt;
 deborphan | xargs apt-get -y remove&lt;br /&gt;
If you're uncertain about the previous command and want to see what will happen without making any changes, just add the '''-s''' option to the apt-get command like this (you can do this with all of the apt-get commands, and it's a good habit to use this option before mass operations like this one):&lt;br /&gt;
 deborphan | xargs apt-get -s -y remove&lt;br /&gt;
Now the good stuff.  If you wish to add a package, type this:&lt;br /&gt;
 apt-get install '''name-of-package-to-install''&lt;br /&gt;
What, don't know what packages to install?  Type this.  When the list appears, you can peruse (over 13k lines!) or search for things using &amp;lt;tt&amp;gt;/''search-term''&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 apt-cache search .* | sort | less&lt;br /&gt;
When you're done removing and adding packages, a good way to clean up is by typing this&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
Also, because the Debian package system keeps a cache of downloaded packages, you may want to run the following to clear out those spare files:&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
===User Settings===&lt;br /&gt;
User settings are in /etc/skel.  This directory will be copied to make new user home directories.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;tip: don't put files in /root they will be only available (at runtime) in /KNOPPIX/root&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the default user 'knoppix' is not created by adduser(1), thus /etc/skel is not copied completely but rather selectively.  That is, to make a file .xyrc appear in /home/knoppix, it is not sufficient to place it in /etc/skel.  One possibility is to extend the code in /etc/X11/Xsession.d/45xsession which is responsible for filling /home/knoppix.&lt;br /&gt;
&lt;br /&gt;
===Autorunning Programs===&lt;br /&gt;
When you want to autorun some programs, one can create a script and put it in the directory &amp;lt;tt&amp;gt;/etc/rc5.d/&amp;lt;/tt&amp;gt; (This only loads items before X loads).  Read up on the SysV init process for more possibilities.&lt;br /&gt;
&lt;br /&gt;
''For X-programs consider &amp;lt;tt&amp;gt;/home/knoppix/.kde/Autostart&amp;lt;/tt&amp;gt; but this may transfer form &amp;lt;tt&amp;gt;/etc/skel/.kde/Autostart&amp;lt;/tt&amp;gt; on boot''--[[User:12.106.237.2|12.106.237.2]] 18:08, 7 December 2007 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Editing the KNOPPIX auto-configuration script==&lt;br /&gt;
You can find a lot of interesting information about how KNOPPIX auto-configures you system by looking in the /etc/init.d/knoppix-autoconfig script. Of particular note are the following.&lt;br /&gt;
&lt;br /&gt;
===Changing the default KDE background image===&lt;br /&gt;
The auto-configuration script sets the default KDE background image to be an image from the CD-ROM. An image that you can easily change when you are remastering KNOPPIX.&lt;br /&gt;
** In KNOPPIX 3.3 and below it is /cdrom/KNOPPIX/background.gif&lt;br /&gt;
** In KNOPPIX 3.4 and above it is /cdrom/KNOPPIX/background.jpg&lt;br /&gt;
&lt;br /&gt;
===Editing floppy and CD-ROM use or adding a custom script===&lt;br /&gt;
The auto-configuration script sets up both your CD-ROM and your floppy disk. The commands for doing this are 'floppyconfig' and 'cdromconfig', respectively. The auto-configuration script will also run cdrom/KNOPPIX/knoppix.sh, which is an easy script to change when remastering KNOPPIX.&lt;br /&gt;
&lt;br /&gt;
===Changing the default boot parameters===&lt;br /&gt;
All boot parameters obtain default values from the /etc/init.d/knoppix-autoconfig script. This is one massive BASH script (you best know your BASH to play with this), but it is the place that you can edit any of the default boot parameters.  For example, to switch from 'kde' to 'twm' as default desktop just search for the place where 'kde' is provided as default value (variable DESKTOP, IIRC). Another example would be changing the default language.&lt;br /&gt;
&lt;br /&gt;
Note, if you are interested in changing the default language KDE uses, the easiest thing to do is to load KDE, instructions are below, and use the KDE configuration utility to select your language of interest.&lt;br /&gt;
&lt;br /&gt;
==X Session Configuration==&lt;br /&gt;
When working with X-based programs you will have to make sure that your display is set appropriately. You can do this manually when remastering KNOPPIX. Also, two scripts related to X Session is where you can change or disable the startup and shutdown sounds.&lt;br /&gt;
&lt;br /&gt;
===Starting X-based programs===&lt;br /&gt;
When testing X-based programs, you will have to &lt;br /&gt;
 export DISPLAY=localhost:0.0&lt;br /&gt;
which will allow you to connect to your normal X session.  Alternately (if you need to test window managers), you can create a nested X session.  Outside of the chroot, run&lt;br /&gt;
 Xnest -ac :1&lt;br /&gt;
Within the chroot, set your DISPLAY variable&lt;br /&gt;
 export DISPLAY=localhost:1&lt;br /&gt;
&lt;br /&gt;
Interesting stuff in /etc/init.d/xsession :&lt;br /&gt;
* it ALSO sets background as /usr/local/lib/knoppix.gif&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the startup sound===&lt;br /&gt;
The startup sound is played by /etc/X11/Xsession.d/45xsession. You can disable it by commenting out the following lines.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;playsound(){ &lt;br /&gt;
# Play sound if soundcore module present (checking /dev/sndstat is unreliable)&lt;br /&gt;
# OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
# PLAY=/usr/bin/wavp&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
# [ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
# if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/startup.ogg ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $OGGPLAY -q -p 64 /usr/share/sounds/startup.ogg &amp;gt;/&lt;br /&gt;
# elif [ -f /usr/share/sounds/startup.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
# case &amp;quot;$(lsmod)&amp;quot; in *sound*) { $PLAY /usr/share/sounds/startup.wav &amp;gt;/dev/null 2&amp;gt;&amp;amp;&lt;br /&gt;
# fi&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifying/Disabling the shutdown sound===&lt;br /&gt;
The shutdown sound is played by /etc/init.d/xsession. You can disable it by commenting out lines 210-220 from the script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;## Play informational sound if soundcore module present&lt;br /&gt;
## (checking /dev/sndstat is unreliable)&lt;br /&gt;
#OGGPLAY=/usr/bin/ogg123&lt;br /&gt;
#PLAY=/usr/bin/wavp&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play-sample&lt;br /&gt;
#[ -x &amp;quot;$PLAY&amp;quot; ] || PLAY=/usr/bin/play&lt;br /&gt;
#if [ -x &amp;quot;$OGGPLAY&amp;quot; -a -f /usr/share/sounds/shutdown.ogg ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $OGGPLAY -q -p 64 /usr/share/sound&lt;br /&gt;
#elif [ -f /usr/share/sounds/shutdown.wav -a -x &amp;quot;$PLAY&amp;quot; ]; then&lt;br /&gt;
#case &amp;quot;$(&amp;lt;/proc/modules)&amp;quot; in *sound*|*snd_*) { $PLAY /usr/share/sounds/shutdown.w&lt;br /&gt;
#fi&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Change default window manager===&lt;br /&gt;
&lt;br /&gt;
Open /etc/init.d/knoppix-autoconfig and look for lines which look like these:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Allow only supported windowmanagers                                           &lt;br /&gt;
# Actually, this check is useless because it's done again in 45xsession. -KK    &lt;br /&gt;
# case &amp;quot;$DESKTOP&amp;quot; in gnome|enlightenment|kde|larswm|xfce|xfce4|lg3d|ratpoison|blackbox|openbox|windowmaker|wmaker|icewm|fluxbox|twm|nx|rdp|kiosk) ;; *) DESKTOP=&amp;quot;kde&amp;quot;; ;; esac                                                                  &lt;br /&gt;
[ -n &amp;quot;$DESKTOP&amp;quot; ] || DESKTOP=&amp;quot;kde&amp;quot;                                          &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, change &amp;quot;kde&amp;quot; in the last quoted line to whatever you like, for example to &amp;quot;fluxbox&amp;quot; or &amp;quot;twm&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Changing the boot graphic, boot message, and startup script text==&lt;br /&gt;
While you are in the chroot environment you can easily change the boot messages, the boot graphic, and the default KDE background graphic.&lt;br /&gt;
&lt;br /&gt;
===Changing the boot graphic===&lt;br /&gt;
The 'boot graphic' is the first image you see when the CD or DVD boots. It looks similar to ASCII art and it is normally something flashy that says 'Knoppix'. You can change this to be any graphic that you please, but you must use a 640x400 graphic that has only 16 colors.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old logo in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv logo.16 logo.16.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a 640x400 pixel 16 color graphic and save it as a GIF, e.g. 'logo.16.gif'. GIMP can easily do this. Note, you can use a graphic that originally had more than 16 colors, but it is critical that you convert the graphic to 16 colors before doing the next step. &lt;br /&gt;
#Convert the GIF to lss16 using the tools included on the Knoppix CD.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;giftopnm &amp;lt; 640x400x16.gif &amp;gt; logo.ppm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ppmtolss16 &amp;lt;logo.ppm &amp;gt; logo.16&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the boot message===&lt;br /&gt;
The 'boot message' is the message that you see under the 'boot graphic' on the initial screen when the Knoppix CD or DVD loads. It normally says something along the lines of Knoppix with the version number and includes a link to the Knoppix website. You can change this text to be whatever you please, but you shouldn't add too much text or it will make the boot screen look funny. Restricting yourself to a single line of text that is no larger than the default one is a good idea.&lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old message in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp boot.msg boot.msg.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the message with a text editor. You'll see at the top of the message that it shows the graphic. Don't change this text, just the line under.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi boot.msg&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the startup script text===&lt;br /&gt;
The 'startup script text' is the text that you see after the initial boot screen, while Knoppix loads and configures your system. You can change as much of this text as you please. You can even add addition lines to the script; however, it is recommended that you don't play with this file. Limiting yourself to editing the 'Welcome to KNOPPIX' message is a good idea. &lt;br /&gt;
&lt;br /&gt;
#Change to the /mnt/hda1/knx/master/boot directory. Swap '/mnt/hda1/' for whatever disk you are using.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /mnt/hda1/knx/master/boot/isolinux&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Back up your old minirt.gz in case you break things.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp minirt.gz minirt.gz.backup&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Uncompress minirt.gz&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gunzip minirt.gz&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Make a temporary directory to mount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mkdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Mount the minirt filesystem as an ext2 filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o=/dev/loop0&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#::or if the above does not work use&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount minirt todelete -t ext2 -o loop&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Edit the linuxrc script to display the message you want. You'll find the default message approximately 2 pages down and it'll be using several colors, i.e. ${WHITE}, ${RED}, etc., so it might be slightly tricky to spot.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;vi todelete/linuxrc&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#unmount the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;umount todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Compress the minirt filesystem.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;gzip -9 minirt&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove your temporary directory.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rmdir todelete&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching KDE to Change Menus, Icons, etc.==&lt;br /&gt;
While you are in the chroot environment you can load KDE and use the configuration tools to change buttons, icons, etc. Once you are finished you can exit KDE and copy /home/knoppix to /etc/skel to keep these changes. To load KDE do the following.&lt;br /&gt;
&lt;br /&gt;
#If you are not at runlevel 2 (i.e. if you are already in KDE), switch to runlevel 2.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;init 2&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /etc/skel to /home/knoppix&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp -Rp /etc/skel /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Change permissions to the user 'knoppix'&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown knoppix:knoppix -R /home/knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy over your X11 configuration to the chroot'd environment (press ctrl+alt+F2 to switch to a non-chroot'd terminal, then ctrl+alt+F1 to switch back when done)&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cp /etc/X11/xorg.conf /mnt/hda1/knx/source/KNOPPIX/etc/X11&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#*&amp;lt;blockquote&amp;gt;'' Knoppix 3.7: I think it's XF86Config-4 rather than xorg.conf.''&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#(Optional)Switch to user 'knoppix'. If you want to uninstall packages, stay as root -- e.g. skip this step. If you want to configure the buttons, icons, background, etc., that you see when KDE boots, be sure to do this step.&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;su knoppix&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Launch KDE&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;startx&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
##Do your KDE changes&lt;br /&gt;
##Exit KDE&lt;br /&gt;
##Exit su and switch back to user 'root'.&lt;br /&gt;
##* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;exit&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Copy /home/knoppix back to /etc/skel to keep the changes&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; mv /etc/skel /etc/skel-old&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mv /home/knoppix /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Set the owner back to root&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chown root:root -R /etc/skel&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Remove the xorg.conf file&lt;br /&gt;
#* &amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;rm /etc/X11/xorg.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you find that some of your settings are not persistent after booting the new image, check the initialization file at /etc/X11/Xsession.d/45xsession.  By default, Knoppix does '''not''' simply copy over all files from /etc/skel.  You may need to make modifications here if you wish to do something different.&lt;br /&gt;
&lt;br /&gt;
===Changing the ksplash KDE graphics===&lt;br /&gt;
You can change the graphics that KDE shows via ksplash when it first loads. These graphics are in the &amp;lt;b&amp;gt;/mnt/hda1/knx/source/KNOPPIX/usr/share/apps/ksplash/Themes/Default/&amp;lt;/b&amp;gt; directory. You'll most likely want to swap out &amp;lt;b&amp;gt;splash_top.png&amp;lt;/b&amp;gt; for a custom 400x248 PNG graphic. Note that ksplash will not automatically put a border around your graphic. If you'd like a border, you have to manually add it to your graphic.&lt;br /&gt;
&lt;br /&gt;
==Leaving the Chroot==&lt;br /&gt;
If you mounted it, you'll need to unmount /proc - very important! &lt;br /&gt;
 umount /proc&lt;br /&gt;
Press '''CTRL+D''' to leave being chrooted.&lt;br /&gt;
&lt;br /&gt;
==Re-Entering the chroot==&lt;br /&gt;
If you've left the chroot, but you want to go back in and modify some things...&lt;br /&gt;
&lt;br /&gt;
Remount the local hard disk (if needed)&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -rw /dev/hda1 /mnt/hda1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setup the environment for chroot&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;mount --bind /dev /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
mount --bind /proc /mnt/hda1/knx/source/KNOPPIX/proc&lt;br /&gt;
mount --bind /sys /mnt/hda1/knx/source/KNOPPIX/sys&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now you can &amp;quot;chroot&amp;quot; into the copied KNOPPIX:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;chroot /mnt/hda1/knx/source/KNOPPIX&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Remastering the ISO==&lt;br /&gt;
We've finished customizing and ready to burn!&lt;br /&gt;
First do some cleanup: &lt;br /&gt;
* remove any .bash_history files, tmp files, etc.&lt;br /&gt;
* back out any changes you don't want burned back to the disc&lt;br /&gt;
* make sure you umount /proc /dev /sys or mkisofs will not work properly&lt;br /&gt;
* &amp;lt;pre&amp;gt;rm -rf /mnt/hda1/knx/source/KNOPPIX/.rr_moved&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===KNOPPIX Compressed Image===&lt;br /&gt;
Now we'll make the big &amp;lt;tt&amp;gt;KNOPPIX&amp;lt;/tt&amp;gt; file which is an ISO 9660 filesystem compressed for use by the &amp;lt;tt&amp;gt;cloop&amp;lt;/tt&amp;gt; driver: &lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
      -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
   | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
the &amp;quot;www.knoppix.net&amp;quot; and &amp;quot;Knoppix.net filesystem&amp;quot; can be changed to what you want to call the file. You will get an error that it doesn't conform to ISO standards -- you can ignore this.  Note that, to run &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt;, you'll need to have enough space to store the entire ISO in RAM/swap.  Ensure you have at least 800M of free space before starting.&lt;br /&gt;
&lt;br /&gt;
In Knoppix 3.4 the &amp;lt;tt&amp;gt;create_compressed_fs&amp;lt;/tt&amp;gt; script has been updated so be sure to use it to obtain the best result. It has a new option '''-b''' (best), which enables the best compression by using different compression schemes and tries to optimize that way, but be careful, because that option is slow (10x slower).&lt;br /&gt;
&lt;br /&gt;
Note: The above didn't work for me using the latest create_compressed_fs. I could create the ISO but it couldn't read the compressed image properly when booting (I/O errors when reading the cloop0 device). I think this was because create_compressed_fs didn't have enough RAM and it was just failing silently. The command below did work though. It uses a file rather than memory for temporary storage:&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -B \&lt;br /&gt;
    65536 -f /mnt/hda1/isotemp - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
------I tried this ,but it report a error,so i think there is some mistake in the command,it may be like follow,tell me if anyone confirm it-------&lt;br /&gt;
----------(by zhblue(newsclanATgmail.com))-------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -publisher &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
     -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda1/knx/source/KNOPPIX \&lt;br /&gt;
       | nice -5 /usr/bin/create_compressed_fs -b \&lt;br /&gt;
    -f /mnt/hda1/isotemp -B 65536 - /mnt/hda1/knx/master/KNOPPIX/KNOPPIX&lt;br /&gt;
&lt;br /&gt;
I noted several problems with the commands above:&amp;lt;br&amp;gt;&lt;br /&gt;
1) The option &amp;quot;-no-bak&amp;quot; excludes files with the ending &amp;quot;.bak&amp;quot;. Non-backup files with this ending are found in some software packages, e.g. glest. It is safer not to use this option.&amp;lt;br&amp;gt;&lt;br /&gt;
2) Just calling &amp;quot;create_compressed_fs - 65536&amp;quot; gives a warning about old command syntax. The compatible parameters are &amp;quot;-m -B 65536&amp;quot;. The later examples here already fixed this, the first example still uses the deprecated version.&lt;br /&gt;
&lt;br /&gt;
===Live CD ISO===&lt;br /&gt;
If all went well, onto making the final CD-ROM Image:&lt;br /&gt;
 cd /mnt/hda1/knx/master'''&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -not -name isolinux.bin \&lt;br /&gt;
    -exec md5sum '{}' \; &amp;gt; KNOPPIX/md5sums&lt;br /&gt;
(this will update the md5 hashes of the files included in the ISO, used for integrity checking) Now to burn the image; for Knoppix &amp;lt;= 3.3:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img -c KNOPPIX/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -no-emul-boot -boot-load-size 4 \&lt;br /&gt;
    -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \&lt;br /&gt;
    -hide-rr-moved -o /mnt/hda1/knx/knoppix.iso /mnt/hda1/knx/master&lt;br /&gt;
(the ISO is stored in &amp;lt;tt&amp;gt;/mnt/hda1/knx/knoppix.iso&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Burn the ISO using your favorite tools, and you're ready!&lt;br /&gt;
&lt;br /&gt;
==How to add new device driver to KNOPPIX==&lt;br /&gt;
&lt;br /&gt;
Recently in a client project, I added the Digital Persona’s finger print driver to the Knoppix 5.1 distribution as an embedded solution to this project. This is a typical case where both the kernel level driver and the user level drivers and libraries are involved. &lt;br /&gt;
&lt;br /&gt;
Most of the Knoppix books and online documentation have documented about how to keep a persistent storage of user configuration and user data. But those persistent configuration only saves the data in /home and /etc directories. If you have added kernel level drivers and/or other system libraries which are not in above two directories, you have to save the file images as a whole right after the boot. The saved file image can be big and may not what you want as a regular usage model. If you are building a customed Knoppix image for a long term solution, definitely you want to remaster the Knoppix to make the new drives be a permanent part of it.&lt;br /&gt;
&lt;br /&gt;
The Digital Persona’s OneTouch SDK for their finger print scanner driver comes with a kernel level driver source code, plus a set of user level application libraries, as well as a sample test application.  The SDK do not have a ready made binary for Debian or Knoppix. So I have to compile it from the source SDK.  However, the CD version of Knoppix 5.1 do not even come with the source include header files to compile a kernel level driver. So I have to compile it under the DVD version of the Knoppix 5.1 and copy the compiled binary to the CD version of Knoppix 5.1 to do testing and remastering. The steps I have tried to make it work under Knoppix are as follows:&lt;br /&gt;
&lt;br /&gt;
1.	First compile the driver under DVD version of the Knoppix. Change the source code build scripts so that the include files and library path are matching what we have in Knoppix. The details are specific to the OneTouch SDK itself. If you are interested about this detail, write to me.&lt;br /&gt;
&lt;br /&gt;
2.	Install the just built kernel driver, the user libraries to their regular location as we will show in following step 4. And then build and run their sample applications per Digital Persona’s instruction. This proves that the basic kernel module build steps are built correctly and the user level libraries are working properly in a standard installation. This is important before we moved to chroot environment to make this changes permanent to our remastered Knoppix.&lt;br /&gt;
&lt;br /&gt;
3.	Then I followed the Knoppix remastering instructions documented in the book of “Live Linux CD” by Christoper Negus.&lt;br /&gt;
&lt;br /&gt;
4.	In the above remastering instructions, there is a step to update all the Debian packages and other software under the chroot environment.  It is at this step that I re-run the drivers installation steps like I have done in above step 2 in the real root environment.  In this particular case, it is make a directory and copy the kernel module file mod_usbdpfp.ko to that directory as follows:&lt;br /&gt;
&lt;br /&gt;
mkdir /lib/modules/2.6.19/kernel/drivers/biometric&lt;br /&gt;
cp mod_usbdpfp.ko /lib/modules/2.6.19/mod_usbdpfp.ko&lt;br /&gt;
&lt;br /&gt;
And also copy all those Digital Persona user level libraries to following location:&lt;br /&gt;
&lt;br /&gt;
cp libdpfp* /usr/lib&lt;br /&gt;
&lt;br /&gt;
5.	I then run /sbin/depmod to let system detects the new kernel mode driver I have installed. This will refresh the /dev directory so it will have entries like:&lt;br /&gt;
&lt;br /&gt;
/dev/usbdpfpPNP&lt;br /&gt;
/dev/usbdpfp0&lt;br /&gt;
&lt;br /&gt;
At this time, if all works right, when you run command lsmod, you will also see something like:&lt;br /&gt;
&lt;br /&gt;
	mod_usbdpfp&lt;br /&gt;
&lt;br /&gt;
shows up in the loaded module list&lt;br /&gt;
&lt;br /&gt;
6.	At this time, you are ready to make a remaster of the Knoppix. Next time when you boot up with this remastered Knoppix, it will have the kernel driver and user level libraries setup ready for you to run the sample applications. Just as if you have done above step 2 and step 4 right after a refresh reboot from the original Knoppix CD.     &lt;br /&gt;
&lt;br /&gt;
John Xu, USA.  ( johnxu at n2k.net )&lt;br /&gt;
&lt;br /&gt;
=Tips=&lt;br /&gt;
I have had good results remastering working from the CD as root working from fluxbox. Just say &amp;quot;knoppix 2&amp;quot; at the boot prompt and it will boot you to a root prompt where you can then say &amp;quot;startx /usr/bin/fluxbox&amp;quot;. I like to use the xterm unicode shell.&lt;br /&gt;
&lt;br /&gt;
==Package Management==&lt;br /&gt;
While working chroot doing the remastering I like to use &lt;br /&gt;
 apt-get remove --purge pkg-name&lt;br /&gt;
to remove packages because before it does anything it will stop and show details on what it is fixing to remove and let you say &amp;quot;yes or no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you don't use the above &amp;quot;apt-get&amp;quot; instructions and have a lot to cleanup and purge, here's the easy way to do it: &lt;br /&gt;
  COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' &amp;gt; topurge&lt;br /&gt;
That will make a list of all removed packages to purge and then you just say &lt;br /&gt;
 dpkg -P `&amp;lt; topurge `&lt;br /&gt;
and you're all done. &lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&lt;br /&gt;
is a one-line version of this. Also use &lt;br /&gt;
 deborphan | xargs dpkg -P .&lt;br /&gt;
&lt;br /&gt;
==Alternatives for Low-Memory Machines==&lt;br /&gt;
You don't really need 1G swap as there are two new tools to create compressed filesystems. Here are some candidates to make ''compressed'' fs:&lt;br /&gt;
* Valentijn's rewrite [http://projects.openoffice.nl/downloads/compressloop/]&lt;br /&gt;
* Quozl's port of compressloop for Knoppix 3.4 [http://quozl.linux.org.au/compressloop-1.9-64bit.c]&lt;br /&gt;
* Quozl's distributed compressloop (use more than one processor to speed things up) [http://quozl.linux.org.au/knoppix/compressloop/] or [http://quozl.netrek.org/knoppix/compressloop/]&lt;br /&gt;
* Justin's patch [http://s.bouncybouncy.net/~justin/code/] (link broken) I also just wrote a distributed cloop compressor(or for smp)  It's in that same directory.&lt;br /&gt;
&lt;br /&gt;
==Test CD Image Without Burning a CD==&lt;br /&gt;
If you have a spare partition with at least 700MB free space formatted with ext2, ext3 or Vfat, you can use this for test by booting from a floppy disk. A floppy boot will look for a partiton with /KNOPPIX/ in the root, and the compressed image /KNOPPIX/KNOPPIX. Instead of using the sub-directory /mnt/hda1/knx/master/KNOPPIX/ as described above, it should be called /mnt/hda2/KNOPPIX/ . The root index.html will then be located at /mnt/hda2/index.html and the compressed image will be at /mnt/hda2/KNOPPIX/KNOPPIX . Now you can boot from floppy and use /mnt/hda2 as your image. For further information see [[Hd BasedHowTo]].&lt;br /&gt;
&lt;br /&gt;
If you don't have an extra partition or you don't want to do so much for it, you can use Qemu ( see [http://fabrice.bellard.free.fr/qemu/] ) with the ISO image like this:&lt;br /&gt;
 qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -net user&lt;br /&gt;
You even do not have to build a hard disk image before, just install Qemu and try this. Amazing!&lt;br /&gt;
&lt;br /&gt;
==Test remastered version without creating cloop file/iso==&lt;br /&gt;
i use a setup similar to knoppix terminal server to test the remastered files without having to recreate a&lt;br /&gt;
cloop image every time: the remastered files live in an ext2 filesytem in a loopfile (knoppix_loop) mounted rw (this is where i chroot in). when i want to test the current setup, i have another machine network boot and use the files from the loopfile directly (needs another miniroot.gz). See [[User:Ml#dev_setup]]&lt;br /&gt;
&lt;br /&gt;
If you want to use only one machine, you'll have to reboot (or use qemu) and use the &amp;quot;loopfile&amp;quot; and &amp;quot;fromhd&amp;quot; cheatcodes (see [[User:Ml#miniroot_changes]]). For example, this is what my grub boot entry looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title           Remastered Knoppix&lt;br /&gt;
root            (hd0,0)&lt;br /&gt;
kernel          /boot/myknoppix/vmlinuz fromhd=/dev/hda4 loopfile=/samba/share/isos/knoppix_loop lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 quiet BOOT_IMAGE=knoppix&lt;br /&gt;
initrd          /boot/myknoppix/miniroot.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Booting Knoppix images with GRUB==&lt;br /&gt;
* First copy /boot off the Knoppix cd to your boot partition (or even your dos partition). I named mine boot.knoppix&lt;br /&gt;
Copy the master/KNOPPIX directory to your root directory of any hard disk. You may place it somewhere other than the boot partition (ext2/3, reiserfs, vfat are supported).&lt;br /&gt;
* for Knoppix &amp;lt;= 3.3, put the following in your /boot/grub/menu.lst:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/vmlinuz 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/miniroot.gz&lt;br /&gt;
* for Knoppix &amp;gt;= 3.4 or other isolinux based distributions:&lt;br /&gt;
 title KNOPPIX&lt;br /&gt;
         root   (hd0,0)&lt;br /&gt;
         kernel /boot.knoppix/isolinux/linux 2 fromhd=/dev/hda4 lang=us&lt;br /&gt;
         initrd /boot.knoppix/isolinux/minirt.gz&lt;br /&gt;
* notice the fromhd parameter: it's the location of the /KNOPPIX directory&lt;br /&gt;
* reboot and have fun.&lt;br /&gt;
&lt;br /&gt;
==Helpful Scripts==&lt;br /&gt;
----&lt;br /&gt;
This is the recommended directory layout for remastering KNOPPIX:&lt;br /&gt;
 . (invoke ../remaster from here)&lt;br /&gt;
 |-- master (invoke ../../[[u]]mountbootimage from here)&lt;br /&gt;
 |   |-- KNOPPIX&lt;br /&gt;
 |   |   |-- KNOPPIX (compressed image)&lt;br /&gt;
 |   |   |-- boot.img (boot floppy image)&lt;br /&gt;
 |   |   `-- (other files snipped)&lt;br /&gt;
 |   `-- index.html&lt;br /&gt;
 `-- source&lt;br /&gt;
     `-- KNOPPIX (this directory can be chrooted into)&lt;br /&gt;
         |-- bin&lt;br /&gt;
         |-- boot&lt;br /&gt;
         |-- cdrom&lt;br /&gt;
         |-- dev&lt;br /&gt;
         |-- etc&lt;br /&gt;
         |-- floppy&lt;br /&gt;
         |-- home&lt;br /&gt;
         |-- initrd&lt;br /&gt;
         |-- lib&lt;br /&gt;
         |-- mnt&lt;br /&gt;
         |-- none&lt;br /&gt;
         |-- opt&lt;br /&gt;
         |-- proc&lt;br /&gt;
         |-- root&lt;br /&gt;
         |-- sbin&lt;br /&gt;
         |-- tmp -&amp;gt; /var/tmp&lt;br /&gt;
         |-- usr&lt;br /&gt;
         |-- var&lt;br /&gt;
         `-- vmlinuz -&amp;gt; boot/vmlinuz-2.4.22-xfs&lt;br /&gt;
----&lt;br /&gt;
the following script &amp;quot;remaster&amp;quot; will do the remaster process for you. Use as root, or you will end up with wrong access rights in the image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-04-02.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script builds a new KNOPPIX ISO image.&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 &lt;br /&gt;
 ROOT=&amp;quot;$PWD&amp;quot;&lt;br /&gt;
 SOURCE=&amp;quot;$ROOT/source/KNOPPIX&amp;quot;&lt;br /&gt;
 MASTER=&amp;quot;$ROOT/master&amp;quot;&lt;br /&gt;
 CLOOPTARGET=&amp;quot;$ROOT/master/KNOPPIX/KNOPPIX&amp;quot;&lt;br /&gt;
 TARGET=&amp;quot;$ROOT&amp;quot;&lt;br /&gt;
 EXCLUDELIST=&amp;quot;$ROOT/source/excludelist&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 rm -rf $SOURCE/.rr_moved&lt;br /&gt;
 &lt;br /&gt;
 cd $SOURCE&lt;br /&gt;
 mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; \&lt;br /&gt;
 -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; \&lt;br /&gt;
 -hide-rr-moved -cache-inodes -no-bak -pad \&lt;br /&gt;
 -exclude-list $EXCLUDELIST \&lt;br /&gt;
 . | nice -5 /usr/bin/create_compressed_fs - 65536 &amp;gt; $CLOOPTARGET&lt;br /&gt;
 &lt;br /&gt;
 cd $MASTER&lt;br /&gt;
 rm -f KNOPPIX/md5sums&lt;br /&gt;
 find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt; KNOPPIX/md5sums&lt;br /&gt;
 mkisofs -pad -l -r -J -v -V &amp;quot;KNOPPIX&amp;quot; -b KNOPPIX/boot.img \&lt;br /&gt;
 -c KNOPPIX/boot.cat -hide-rr-moved -o $TARGET/knoppix.iso $MASTER&lt;br /&gt;
----&lt;br /&gt;
The following script will loop-mount boot floppy image and initrd image for modification. The umount function will build a new initrd image and put it back on the boot floppy image.&lt;br /&gt;
&lt;br /&gt;
The script has last been tried out on Debian sid on 2004-01-13.&lt;br /&gt;
&amp;lt;!-- lines starting with space a preformatted --&amp;gt;&lt;br /&gt;
 #!/bin/bash -x&lt;br /&gt;
 # This script will loop-mount boot floppy and initrd image&lt;br /&gt;
 # Copyright (C) 2004 by Marc Haber &amp;lt;mh+knoppix-remaster@zugschlus.de&amp;gt;&lt;br /&gt;
 # License: GPL V2&lt;br /&gt;
 unset CDPATH || true&lt;br /&gt;
 &lt;br /&gt;
 # if not root, re-invoke self as root&lt;br /&gt;
 if [[ &amp;quot;`id -u`&amp;quot; -ne 0 ]]; then&lt;br /&gt;
 export LOCUSER=&amp;quot;$USER&amp;quot;&lt;br /&gt;
 export LOCHOME=&amp;quot;$HOME&amp;quot;&lt;br /&gt;
 if [[ &amp;quot;${SHELLOPTS/xtrace/}&amp;quot; != &amp;quot;$SHELLOPTS&amp;quot; ]]; then&lt;br /&gt;
 sudo bash -x $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 else&lt;br /&gt;
 sudo $0 $@&lt;br /&gt;
 exit $?&lt;br /&gt;
 fi&lt;br /&gt;
 else&lt;br /&gt;
 LOCUSER=&amp;quot;${LOCUSER:-$USER}&amp;quot;&lt;br /&gt;
 LOCHOME=&amp;quot;${LOCHOME:-$HOME}&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 set -e&lt;br /&gt;
 &lt;br /&gt;
 KNOPPIXDIR=&amp;quot;KNOPPIX&amp;quot;&lt;br /&gt;
 BOOTIMGFILE=&amp;quot;$KNOPPIXDIR/boot.img&amp;quot;&lt;br /&gt;
 BOOTIMGFS=&amp;quot;vfat&amp;quot;&lt;br /&gt;
 BOOTIMGDIR=&amp;quot;boot.img&amp;quot;&lt;br /&gt;
 INITRDGZ=&amp;quot;$BOOTIMGDIR/miniroot.gz&amp;quot;&lt;br /&gt;
 INITRDFILE=&amp;quot;$KNOPPIXDIR/miniroot&amp;quot;&lt;br /&gt;
 INITRDFS=&amp;quot;ext2&amp;quot;&lt;br /&gt;
 INITRDDIR=&amp;quot;miniroot&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 mountbootimage() {&lt;br /&gt;
 if ! modprobe loop; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: cannot load loop module&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if ! [[ -e &amp;quot;$BOOTIMGFILE&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: no $BOOTIMGFILE found&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 for nofile in $BOOTIMGDIR $INITRDGZ $INITRDFILE $INITRDDIR; do&lt;br /&gt;
 if [[ -e &amp;quot;$nofile&amp;quot; ]]; then&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: $nofile already exists&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 mkdir -p $BOOTIMGDIR&lt;br /&gt;
 mount -o loop,uid=$LOCUSER -t $BOOTIMGFS $BOOTIMGFILE $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt; $INITRDGZ gunzip &amp;gt; $INITRDFILE&lt;br /&gt;
 mkdir -p $INITRDDIR&lt;br /&gt;
 mount -o loop -t $INITRDFS $INITRDFILE $INITRDDIR&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 umountbootimage() {&lt;br /&gt;
 dd if=/dev/zero of=$INITRDDIR/nullfile || true&lt;br /&gt;
 sync&lt;br /&gt;
 rm $INITRDDIR/nullfile&lt;br /&gt;
 umount $INITRDDIR&lt;br /&gt;
 rmdir $INITRDDIR&lt;br /&gt;
 &amp;lt; $INITRDFILE gzip --best &amp;gt; $INITRDGZ&lt;br /&gt;
 rm -f $INITRDFILE&lt;br /&gt;
 &lt;br /&gt;
 umount $BOOTIMGDIR&lt;br /&gt;
 rmdir $BOOTIMGDIR&lt;br /&gt;
 &lt;br /&gt;
 syslinux KNOPPIX/boot.img&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 case &amp;quot;`basename $0`&amp;quot; in&lt;br /&gt;
 mountbootimage)&lt;br /&gt;
 mountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 umountbootimage)&lt;br /&gt;
 umountbootimage&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
 echo &amp;gt;&amp;amp;2 &amp;quot;ERR: called with unknown name `basename $0`&amp;quot;&lt;br /&gt;
 exit 1&lt;br /&gt;
 ;;&lt;br /&gt;
 esac&lt;br /&gt;
&lt;br /&gt;
==Tips around apt-get to install/update/remove applications==&lt;br /&gt;
(by gnarvaja)&lt;br /&gt;
* If you booted from CD, even on a HD install (example: Pivot Install) instead of copying the original CD and KNOPPIX directory to the HD, you can use them directly from their mount points.&lt;br /&gt;
* Another alternative is to mount an ISO image of the original CD as a loop device and mount the KNOPPIX image as a '''cloop''' device. You will save close to 2GB of space. Script to mount from an ISO image:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 # Assumes that the current directory is the working space&lt;br /&gt;
 # original.iso is an image of the CD we will be using as master&lt;br /&gt;
 mount -t iso9660 original.iso ./oldcd -o ro,loop&lt;br /&gt;
 # initialize the compressed loop device&lt;br /&gt;
 losetup /dev/cloop1 ./oldcd/KNOPPIX/KNOPPIX&lt;br /&gt;
 mount -t iso9660 /dev/cloop1 ./KNOPPIX -o ro,loop&lt;br /&gt;
&lt;br /&gt;
* Get '''apt-spy''' and use it to modify the sources.list file with the best mirrors for your particular region. This will speed up the downloading. Backup the original '''sources.list''' just in case.&lt;br /&gt;
* Another technique is to modify '''sources.list'''. Replace the string '''.de.''' in the ftp addresses (ftp.de.debian.org) with the code corresponding to your country. Examples: USA -&amp;gt; .us. (ftp.us.debian.org), Brazil -&amp;gt; .br. (ftp.br.debian.org). Check the Debian site for debian.org mirrors in your country.&lt;br /&gt;
* Remember to uncomment the '''linuxtag''' ftp addresses to get the latest and greatest from Knoppix&lt;br /&gt;
* Use '''apt-get update''' to get the lists with the latest releases and patches. Do not update a package if you don't need to, it may lead to the use of additional disk space (precious commodity when you want to keep everything below 700MB) and you may brake something else without knowing. Abuse the '''-s''' option to simulate the installation.&lt;br /&gt;
* Before doing the update, I modified my default releases to '''testing''', that means that the software I'll be using will have a good balance of stability and features. Knoppix uses '''unstable''' by default, which is too risky for my personal taste.&lt;br /&gt;
* Get '''[apt-get install] locale''' and configure it with the locales you are going to use. It will save lots of space when downloading applications with plenty of locale modules and localized manual pages.&lt;br /&gt;
* I use '''aptitude''' to get/remove applications, it is character based so it works with init 2. As you mark packages for install/update/removal, it will tell you how much disk space you will save/use, try to solve depencies problems and give you plenty control to fix them manually when possible.&lt;br /&gt;
* When installing applications it is likely that your '''/etc/rc?.d''' directories will have new entries, many of them unwanted or unplanned. Make sure you check them and remove the new entries based on your preferences. I usually leave '''/etc/rc2.d''' and '''/etc/rc5.d''' as close as the originals as possible and modify '''/etc/rc3.d''' and '''/etc/rc4.d''' to test new stuff. '''Example:''' You may want to have ntfs installed, but not necessarily running by default. Same with apache, mysql and many others.&lt;br /&gt;
* When removing/purging applications, they may leave behind non-empty directories. Usually this is announced by aptitude, apt-get or any other installation utilty. Make sure to check the messages and manually remove those directories.&lt;br /&gt;
* After you are done, '''aptitude''' may leave some files behind. Here's a clean up script I use:&lt;br /&gt;
&lt;br /&gt;
 # !/bin/bash&lt;br /&gt;
 # Clean package files generated by aptitude&lt;br /&gt;
 rm /var/log/aptitude&lt;br /&gt;
 rm /var/lib/apt/lists/*debian*&lt;br /&gt;
 rm /var/lib/apt/lists/*knoppix*&lt;br /&gt;
&lt;br /&gt;
=Common Problems=&lt;br /&gt;
* [[Dev_null_permission_denied|/dev/null: Permission Denied]] Chroot problems accessing device files&lt;br /&gt;
&lt;br /&gt;
* You've &amp;lt;code&amp;gt;startx&amp;lt;/code&amp;gt;'d (into whatever window manager you like) and you start a terminal (gnome-terminal, konsole, xterm).  Nothing happens (such is the case in fluxbox, and you'll see an error in you &amp;lt;code&amp;gt;~/.xsession-errors&amp;lt;/code&amp;gt; file).  Or perhaps the error is helpfully displayed: &amp;lt;code&amp;gt;&lt;br /&gt;
  get_pty: not enough ptys&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
I had plenty yesterday... but then I &amp;lt;code&amp;gt;chroot&amp;lt;/code&amp;gt;ed so, to solve this, &amp;lt;code&amp;gt;&lt;br /&gt;
  # NOT in your chroot environment&lt;br /&gt;
  cd /mnt/hda1/knx/source/KNOPPIX/dev&lt;br /&gt;
  MAKEDEV pty&lt;br /&gt;
&lt;br /&gt;
  # enter your chroot environment&lt;br /&gt;
  chroot /mnt/hda1/knx/source/KNOPPIX/&lt;br /&gt;
&lt;br /&gt;
  # and mount /dev/pts&lt;br /&gt;
  mount -t devpts /dev/pts/ /dev/pts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
it might give that same &amp;quot;fstab not found&amp;quot; error as mounting proc&lt;br /&gt;
does.  so do what you'd do then, disregard.&lt;br /&gt;
&lt;br /&gt;
start your X up again and try your terminal, should work.&lt;br /&gt;
thanks to: technovelty[http://www.technovelty.org/linux/tips/xinchroot.html] for the final enlightenment&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
&lt;br /&gt;
If my howto is too confusing, or you'd like a second opinion, check out charan's very nice remastering howto: http://brainstorms.in/knoppix&lt;br /&gt;
Another Howto is at  http://www.stirnimann.com/mystuff/doc/knoppix.txt&lt;br /&gt;
&lt;br /&gt;
There is a wizard, which knows all the unpacking, compressing and CD-recording steps mentioned here. It also shows a shell where you can update the uncompressed KNOPPIX system using debian's standard software installation tools. It is called mmkcdrom and part of the plugscript package: [http://rcswww.urz.tu-dresden.de/~holzhey/plugscript]&lt;br /&gt;
&lt;br /&gt;
Yet another HOWTO, for shell freaks, is at http://quozl.linux.org.au/knoppix/&lt;br /&gt;
&lt;br /&gt;
Be sure to check out the [http://knoppix.net/forum/viewforum.php?f=2 Knoppix Customization Forum] for ideas and help with remastering.&lt;br /&gt;
&lt;br /&gt;
* If you want to add a custom kernel, check out the [[Knoppix Custom Kernel Howto]]&lt;br /&gt;
* There also a guide at O'Reilly on the same topic : [http://linux.oreillynet.com/lpt/a/4323 Using and Customizing Knoppix]&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
Thats it. This is an updated version of my previous howto. This is not meant for linux beginners, you will need to know your way around linux to get this to work. I'll update this as corrections/improvements/etc come through.&lt;br /&gt;
&lt;br /&gt;
=Thanks=&lt;br /&gt;
Thanks to aay, charan, Tech2k, and #knoppix for some corrections and tips and ideas.  Feel free to edit or add to this howto.&lt;br /&gt;
Note about swap:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Translations=&lt;br /&gt;
* German Version: [[Knoppix Remastering Howto Deutsch]]&lt;br /&gt;
* Spanish Version: [[Knoppix Remastering Howto Spanish]]  en español&lt;br /&gt;
* French Version: [[Knoppix Remastering Howto French]]&lt;br /&gt;
* Indonesian Version: [[Knoppix Remastering Howto Indonesian]]&lt;br /&gt;
* Russian Version: [[Knoppix Remastering Howto Russian]]&lt;br /&gt;
* Brazilian Portuguese Version: [[Knoppix Remastering Howto Brazilian Portuguese]]&lt;br /&gt;
* Italian Version: [[Knoppix Remastering Howto Italiano]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>202.88.238.45</name></author>	</entry>

	</feed>