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

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Common_Problems</id>
		<title>Remastering Common Problems</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Common_Problems"/>
				<updated>2005-11-13T20:00:39Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Page for documenting common problems and potential fixes when remastering Knoppix CDs.&lt;br /&gt;
&lt;br /&gt;
= GUI problems =&lt;br /&gt;
== Desktop background splash starts but then fails with 'X-Window session terminated with errors' message ==&lt;br /&gt;
&lt;br /&gt;
Possible solutions: check that the permissions on /dev/null are set so everyone can write to it.  &lt;br /&gt;
&lt;br /&gt;
= KDE problems =&lt;br /&gt;
&lt;br /&gt;
== KMix application keeps popping up ==&lt;br /&gt;
&lt;br /&gt;
This can sometimes happen when various KDE packages get updated in a Knoppix remaster.  Setting KDE_SERVICES_ENABLED to false in the /etc/default/kde-services-knoppix file may resolve the issue.&lt;br /&gt;
&lt;br /&gt;
== Konsole opens but hangs with no prompt appearing ==&lt;br /&gt;
&lt;br /&gt;
This seems to happen if the /dev/pty* permissions do not allow writing to any of the devices.&lt;br /&gt;
&lt;br /&gt;
[[Category:Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Common_Problems</id>
		<title>Remastering Common Problems</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Common_Problems"/>
				<updated>2005-11-13T19:58:44Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Page for documenting common problems and potential fixes when remastering Knoppix CDs.&lt;br /&gt;
&lt;br /&gt;
= GUI problems =&lt;br /&gt;
== Desktop background splash starts but then fails with 'X-Window session terminated with errors' message ==&lt;br /&gt;
&lt;br /&gt;
Possible solutions: check that the permissions on /dev/null are set so everyone can write to it.  &lt;br /&gt;
&lt;br /&gt;
== KMix application keeps popping up ==&lt;br /&gt;
&lt;br /&gt;
This can sometimes happen when various KDE packages get updated in a Knoppix remaster.  Setting KDE_SERVICES_ENABLED to false in the /etc/default/kde-services-knoppix file may resolve the issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T18:06:16Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Testing the ISO from the filesystem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;/path/to/develsystem&amp;gt;KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/null&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop \&lt;br /&gt;
 &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/grub.menu.lst like so (or add the text starting with 'title TestKnoppix' to your existing menu.1st if you already have grub installed somewhere):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
initrd (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
You may want to consider adding the /boot/grub files to your remaster directly, to ease testing and regeneration so you don't have to run through this step every time you make a change to the remaster.  From outside the remaster, something like:&lt;br /&gt;
&lt;br /&gt;
 cp -rP /mnt/&amp;lt;testpartition&amp;gt;/boot/grub \&lt;br /&gt;
 &amp;lt;/path/to/develsystem&amp;gt;/remaster/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/grub&lt;br /&gt;
&lt;br /&gt;
In the chroot environment, you want to us the /cdrom/boot path instead.&lt;br /&gt;
&lt;br /&gt;
You should be able to reboot and boot into your Knoppix system from the grub menu now.&lt;br /&gt;
&lt;br /&gt;
== Possible issues ==&lt;br /&gt;
=== Default language settings for everything in German when booting from HD ===&lt;br /&gt;
&lt;br /&gt;
See [[Remastering_Hacks#Making_the_CD_fallback_default_language_not_German]]&lt;br /&gt;
&lt;br /&gt;
= Optimizing the filesystem (not finished yet) =&lt;br /&gt;
&lt;br /&gt;
Boot from the hard drive into the test Knoppix image.  Use the system as you normally would for a bit.  Then, you will need the script &amp;lt;/path/to/develsystem&amp;gt;/remaster/KNOPPIX.build/Knoppix.mksortlist.  You can probably just mount the right partition and run it directly that way.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-12T18:05:21Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
German Language user package&lt;br /&gt;
&lt;br /&gt;
 apt-get remove user-de&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot logo ==&lt;br /&gt;
&lt;br /&gt;
The boot logo : The boot image is logo.16 and is a lss16 format image. To start make a 16 color image (in Gimp, create the image and use the Image -&amp;gt; Mode -&amp;gt; Indexed menu to export to 16 colors) you want to use. The image must be 640x480 or less. 640x400 leaves room at the bottom for the boot prompt. Save the image as a bmp format (in gimp you can save as ppm as well to skip the first conversion). Then run:&lt;br /&gt;
&lt;br /&gt;
 bmptoppm mylogo.bmp &amp;gt; logo16.ppm&lt;br /&gt;
 ppmtolss16 &amp;lt; logo16.ppm &amp;gt; logo.16&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], the logo file will be located somewhere like:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/isolinux&lt;br /&gt;
&lt;br /&gt;
There are also some files in KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images that might be interesting to look at.&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Making the CD fallback default language not German ==&lt;br /&gt;
&lt;br /&gt;
Again, you want to modify the /etc/init.d/knoppix-autoconfig script and find where the LANGUAGE variable gets set.  Change it to the desired default language (for example, from 'de' to 'us'.)&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-12T18:02:45Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Other packages commonly removed for custom images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
German Language user package&lt;br /&gt;
&lt;br /&gt;
 apt-get remove user-de&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot logo ==&lt;br /&gt;
&lt;br /&gt;
The boot logo : The boot image is logo.16 and is a lss16 format image. To start make a 16 color image (in Gimp, create the image and use the Image -&amp;gt; Mode -&amp;gt; Indexed menu to export to 16 colors) you want to use. The image must be 640x480 or less. 640x400 leaves room at the bottom for the boot prompt. Save the image as a bmp format (in gimp you can save as ppm as well to skip the first conversion). Then run:&lt;br /&gt;
&lt;br /&gt;
 bmptoppm mylogo.bmp &amp;gt; logo16.ppm&lt;br /&gt;
 ppmtolss16 &amp;lt; logo16.ppm &amp;gt; logo.16&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], the logo file will be located somewhere like:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/isolinux&lt;br /&gt;
&lt;br /&gt;
There are also some files in KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images that might be interesting to look at.&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T16:31:28Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Testing the ISO from the filesystem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;/path/to/develsystem&amp;gt;KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/null&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/grub.menu.1st like so (or add the text starting with 'title TestKnoppix' to your existing menu.1st if you already have grub installed somewhere):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
initrd (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
You may want to consider adding the /boot/grub files to your remaster directly, to ease testing and regeneration so you don't have to run through this step every time you make a change to the remaster.  From outside the remaster, something like:&lt;br /&gt;
&lt;br /&gt;
 cp -rP /mnt/&amp;lt;testpartition&amp;gt;/boot/grub \&lt;br /&gt;
 &amp;lt;/path/to/develsystem&amp;gt;/remaster/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/grub&lt;br /&gt;
&lt;br /&gt;
In the chroot environment, you want to us the /cdrom/boot path instead.&lt;br /&gt;
&lt;br /&gt;
You should be able to reboot and boot into your Knoppix system from the grub menu now.&lt;br /&gt;
&lt;br /&gt;
= Optimizing the filesystem (not finished yet) =&lt;br /&gt;
&lt;br /&gt;
Boot from the hard drive into the test Knoppix image.  Use the system as you normally would for a bit.  Then, you will need the script &amp;lt;/path/to/develsystem&amp;gt;/remaster/KNOPPIX.build/Knoppix.mksortlist.  You can probably just mount the right partition and run it directly that way.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T16:24:17Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Testing the ISO from the filesystem (not finished) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;/path/to/develsystem&amp;gt;KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/null&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/grub.menu.1st like so (or add the text starting with 'title TestKnoppix' to your existing menu.1st if you already have grub installed somewhere):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
initrd (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
You may want to consider adding the /boot/grub files to your remaster directly, to ease testing and regeneration so you don't have to run through this step every time you make a change to the remaster.  From outside the remaster, something like:&lt;br /&gt;
&lt;br /&gt;
 cp -rP /mnt/&amp;lt;testpartition&amp;gt;/boot/grub \&lt;br /&gt;
 &amp;lt;/path/to/develsystem&amp;gt;/remaster/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/grub&lt;br /&gt;
&lt;br /&gt;
You should be able to reboot and boot into your Knoppix system from the grub menu now.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T16:19:00Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Testing the ISO from the filesystem (not finished) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;/path/to/develsystem&amp;gt;KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/null&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem (not finished) =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/grub.menu.1st like so (or add the text starting with 'title TestKnoppix' to your existing menu.1st if you already have grub installed somewhere):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
initrd (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
You may want to consider adding the /boot/grub files to your remaster directly, to ease testing and regeneration so you don't have to run through this step every time you make a change to the remaster&lt;br /&gt;
&lt;br /&gt;
You should be able to reboot and boot into your Knoppix system from the grub menu now.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T16:16:12Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Testing the ISO from the filesystem (not finished) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;/path/to/develsystem&amp;gt;KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/null&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem (not finished) =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a grub.conf like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
initrd (hd&amp;lt;num of hd by BIOS order IDE ms would be 0&amp;gt;,&amp;lt;partition num)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
You may want to consider adding the /boot/grub files to your remaster directly, to ease testing and regeneration so you don't have to run through this step every time you make a change to the remaster&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T04:39:35Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Update to fix pty permissions may be needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;/path/to/develsystem&amp;gt;KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/null&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem (not finished) =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a grub.conf like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ore&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;number of hard disk for IDE master would be 0&amp;gt;,&amp;lt;partition number&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/hdf7&lt;br /&gt;
initrd (hd0)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T04:37:42Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Example build system partition setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 1GB (CD) or 6GB(DVD) for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem (not finished) =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a grub.conf like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ore&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;number of hard disk for IDE master would be 0&amp;gt;,&amp;lt;partition number&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/hdf7&lt;br /&gt;
initrd (hd0)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-12T04:12:54Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Testing the ISO from the filesystem (not finished) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 3GB for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem (not finished) =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you no longer have a boot loader on the drive, you'll need to set something up.  You can do it mostly from within a booted Knoppix CD.  First:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 cp /lib/grub/i386-pc/stage{1,2} /mnt/&amp;lt;testpartition&amp;gt;/boot/grub/&lt;br /&gt;
 &lt;br /&gt;
Then create a grub.conf like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ore&amp;gt;&lt;br /&gt;
color white/blue black/light-gray&lt;br /&gt;
default 0&lt;br /&gt;
timeout 8&lt;br /&gt;
&lt;br /&gt;
title TestKnoppix&lt;br /&gt;
kernel (hd&amp;lt;number of hard disk for IDE master would be 0&amp;gt;,&amp;lt;partition number&amp;gt;)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init root=/dev/hdf7&lt;br /&gt;
initrd (hd0)/boot/isolinux/minirt.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then type&lt;br /&gt;
&lt;br /&gt;
 grub&lt;br /&gt;
&lt;br /&gt;
and at the grub prompt (example for installing the boot loader to the MBR of an IDE drive with the OS on /dev/hda2)&lt;br /&gt;
&lt;br /&gt;
 root (hd0,1)&lt;br /&gt;
 setup (hd0)&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T23:20:38Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Create ISO image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 3GB for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Testing the ISO from the filesystem (not finished) =&lt;br /&gt;
&lt;br /&gt;
You can 'install' the newly created ISO image to your /mnt/&amp;lt;testpartition&amp;gt; to verify it runs okay, and to optimize the CD access times.  To do so:&lt;br /&gt;
&lt;br /&gt;
 mkdir /mnt/iso&lt;br /&gt;
 mount -oloop &amp;lt;/path/to/develsystem&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso /mnt/iso&lt;br /&gt;
 mount /dev/&amp;lt;testsystem&amp;gt; /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
 cp -rP /mnt/iso/ /mnt/&amp;lt;testsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T23:10:27Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Why this HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 3GB for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T23:10:11Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Why this HOWTO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== About this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 3GB for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T23:09:45Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/&amp;lt;swappartition&amp;gt; swap partition of 1GB in size &lt;br /&gt;
* /dev/&amp;lt;testpartition&amp;gt; partition of at least 3GB for testing&lt;br /&gt;
* /dev/&amp;lt;development&amp;gt; partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 swapon /dev/&amp;lt;swappartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;testpartition&amp;gt;&lt;br /&gt;
 mke2fs -vj /dev/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next you may need to mount the development partition to extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/&amp;lt;develpartition&amp;gt; /mnt/&amp;lt;develpartition&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From here on out, this document will use the generic term &amp;lt;/path/to/develsystem&amp;gt; to mean the place where you are doing development from, in case of these examples, it woult be /mnt/&amp;lt;develpartition&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
 mkdir &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
 cd &amp;lt;/path/to/develsystem&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really &amp;lt;/path/to/develsystem&amp;gt;/etc. This means that in our case &amp;lt;/path/to/develsystem&amp;gt;/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to &amp;lt;/path/to/develsystem&amp;gt;/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 &amp;lt;/path/to/develsystem&amp;gt;/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/&amp;lt;develpartition&amp;gt;/scripts&lt;br /&gt;
 ./knoppix-remaster &amp;lt;/path/to/develsystem&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path &amp;lt;/path/to/develsystem&amp;gt;/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp &amp;lt;/path/to/develsystem&amp;gt;/remaster &amp;lt;/path/to/develsystem&amp;gt;/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/&amp;lt;develpartition&amp;gt;/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/&amp;lt;develpartition&amp;gt;/remaster/etc/skel/.bash_history /mnt/&amp;lt;develpartition&amp;gt;/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/&amp;lt;develpartition&amp;gt;/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/&amp;lt;develpartition&amp;gt;/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T22:40:48Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Use the remaster scripts to create the chroot environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB for testing&lt;br /&gt;
* /dev/hda3 partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hda3&lt;br /&gt;
&lt;br /&gt;
Next mount the hda3 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda3 /mnt/hda3&lt;br /&gt;
 mkdir /mnt/hda3/remaster&lt;br /&gt;
 cd /mnt/hda3&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda3/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T22:40:03Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Install the remastering scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB for testing&lt;br /&gt;
* /dev/hda3 partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hda3&lt;br /&gt;
&lt;br /&gt;
Next mount the hda3 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda3 /mnt/hda3&lt;br /&gt;
 mkdir /mnt/hda3/remaster&lt;br /&gt;
 cd /mnt/hda3&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup your directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T22:39:10Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Starting a development system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
A recommended setup would be three partitions, one for a 1GB swap filesystem, one of a few GB for testing Knoppix images and getting optimizing the CD, and one for development work.  &lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB for testing&lt;br /&gt;
* /dev/hda3 partition of lots of size for development&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hda3&lt;br /&gt;
&lt;br /&gt;
Next mount the hda3 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda3 /mnt/hda3&lt;br /&gt;
 mkdir /mnt/hda3/remaster&lt;br /&gt;
 cd /mnt/hda3&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T22:11:01Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Update to fix pty permissions may be needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the (backslashes wrapping text here not present in script) line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* \&lt;br /&gt;
 /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T22:09:52Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T22:09:26Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August 2004, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
: http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
: http://knoppix.net&lt;br /&gt;
: http://www.tina-vision.net/tina-knoppix/remastering.html&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T21:57:40Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Update to fix pty permissions may be needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.  Change the line:&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T21:56:30Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Final manual cleanup steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
When finished, exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cleaning up user home directory modifications ==&lt;br /&gt;
 &lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
== Cleaning up command line ==&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
== Cleaning up files used if you started graphics system ==&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
== Cleaning up Apt stuff ==&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
== Update to fix pty permissions may be needed ==&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T21:52:08Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Final manual cleanup steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
=== Update to fix pty permissions may be needed ===&lt;br /&gt;
&lt;br /&gt;
[[User:Leah|Leah]] 21:52, 11 Nov 2005 (GMT) I found that for some reason the permissions on /dev/pty were not being set to writable, so you couldn't open a konsole session on a new remaster, as it needs users to be able to access the pty's.  I recommend making this change to the &amp;lt;pathtoscriptsdir&amp;gt;/scripts/KNOPPIX.build/Knoppix.clean script as well, just in case.&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/pty* /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T16:48:57Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Boot logo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot logo ==&lt;br /&gt;
&lt;br /&gt;
The boot logo : The boot image is logo.16 and is a lss16 format image. To start make a 16 color image (in Gimp, create the image and use the Image -&amp;gt; Mode -&amp;gt; Indexed menu to export to 16 colors) you want to use. The image must be 640x480 or less. 640x400 leaves room at the bottom for the boot prompt. Save the image as a bmp format (in gimp you can save as ppm as well to skip the first conversion). Then run:&lt;br /&gt;
&lt;br /&gt;
 bmptoppm mylogo.bmp &amp;gt; logo16.ppm&lt;br /&gt;
 ppmtolss16 &amp;lt; logo16.ppm &amp;gt; logo.16&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], the logo file will be located somewhere like:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/isolinux&lt;br /&gt;
&lt;br /&gt;
There are also some files in KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images that might be interesting to look at.&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T16:47:22Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Boot logo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot logo ==&lt;br /&gt;
&lt;br /&gt;
The boot logo : The boot image is logo.16 and is a lss16 format image. To start make a 16 color image (in Gimp, create the image and use the Image -&amp;gt; Mode -&amp;gt; Indexed menu to export to 16 colors) you want to use. The image must be 640x480 or less. 640x400 leaves room at the bottom for the boot prompt. Save the image as a bmp format (in gimp you can save as ppm as well to skip the first conversion). Then run:&lt;br /&gt;
&lt;br /&gt;
 bmptoppm mylogo.bmp &amp;gt; logo16.ppm&lt;br /&gt;
 ppmtolss16 &amp;lt; logo16.ppm &amp;gt; logo.16&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/isolinux&lt;br /&gt;
&lt;br /&gt;
There are also some files in KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images that might be interesting to look at.&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T16:46:43Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Boot logo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot logo ==&lt;br /&gt;
&lt;br /&gt;
The boot logo : The boot image is logo.16 and is a lss16 format image. To start make a 16 color image (in Gimp, create the image and use the Image -&amp;gt; Mode -&amp;gt; Indexed meun to export to 16 colors) you want to use. The image must be 640x480 or less. 640x400 leaves room at the bottom for the boot prompt. Save the image as a bmp format (in gimp you can save as ppm as well to skip the first conversion). Then run:&lt;br /&gt;
&lt;br /&gt;
 bmptoppm mylogo.bmp &amp;gt; logo16.ppm&lt;br /&gt;
 ppmtolss16 &amp;lt; logo16.ppm &amp;gt; logo.16&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/isolinux&lt;br /&gt;
&lt;br /&gt;
There are also some files in KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images that might be interesting to look at.&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T16:46:11Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Boot graphics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot logo ==&lt;br /&gt;
&lt;br /&gt;
The boot logo : The boot image is logo.16 and is a lss16 format image. To start make a 16 color image (in Gimp, create the image and use the Image -&amp;gt; Mode -&amp;gt; Indexed meun to export to 16 colors) you want to use. The image must be 640x480 or less. 640x400 leaves room at the bottom for the boot prompt. Save the image as a bmp format (in gimp you can save as ppm as well to skip the first conversion). Then run:&lt;br /&gt;
&lt;br /&gt;
bmptoppm mylogo.bmp &amp;gt; logo16.ppm&lt;br /&gt;
ppmtolss16 &amp;lt; logo16.ppm &amp;gt; logo.16&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/boot/isolinux&lt;br /&gt;
&lt;br /&gt;
There are also some files in KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images that might be interesting to look at.&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T15:03:13Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Installing software and clearing up space with Apt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Remastering Process Tips =&lt;br /&gt;
== Saving space while running chroot environment ==&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;
= Installing software and clearing up space with Apt =&lt;br /&gt;
&lt;br /&gt;
== Get the best apt mirror ==&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;
&lt;br /&gt;
== Update all packages ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Configuring locale settings ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Character based pkg mgt w/Aptitude ==&lt;br /&gt;
&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;
* 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;
== Cleaning up space when removing apps ==&lt;br /&gt;
&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;
&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot graphics ==&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Common_Problems</id>
		<title>Remastering Common Problems</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Common_Problems"/>
				<updated>2005-11-11T08:39:53Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Page for documenting common problems and potential fixes when remastering Knoppix CDs.&lt;br /&gt;
&lt;br /&gt;
= GUI problems =&lt;br /&gt;
== Desktop background splash starts but then fails with 'X-Window session terminated with errors' message ==&lt;br /&gt;
&lt;br /&gt;
Possible solutions: check that the permissions on /dev/null are set so everyone can write to it.  &lt;br /&gt;
&lt;br /&gt;
[[Category:Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Main_Page"/>
				<updated>2005-11-11T06:08:20Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-top: dashed 1px; border-bottom: dashed 1px;&amp;quot;&lt;br /&gt;
|[[Downloading FAQ | Download]]||[[:Category : FAQ Page | FAQ]] || [[:Category: Bug Pages | Bug report pages]] || [[Knoppix Customizations]] || [[:Category: Remastering Knoppix | Knoppix Remastering]] || [[:Category: Hard drive Installation | Hard drive Installation]] || [[:Special:Categories | Organized Content]]&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Welcome to the [[Knoppix]] wiki.  This wiki and other features found on [http://www.knoppix.net Knoppix.net] are all about [[Knoppix]]. [http://www.knoppix.net Knoppix.net] is a resource for users, developers, and testers of [[Knoppix]]. The official website for [[Knoppix]] is at [http://www.knopper.net/knoppix/index-en.html Klaus Knopper's website].&lt;br /&gt;
&lt;br /&gt;
[[Knoppix]] is a Free and Open Source [[LiveCD |Live Linux CD]] based on Debian [[GNU]]/[[Linux]].   [[LiveCD |Live Linux CD]] means that the computer [[Booting|boots]] and runs completely from cd. Nothing is installed on your hard drive in order for you to experience many of the [[:Category: Open Source Applications| Open Source software packages]] available. [[Knoppix]] includes recent [[Linux]] software and desktop environments, including such applications as [[Open Office | OpenOffice.org]], Abiword, [[Gimp]], Konqueror, Firefox, Apache, PHP, MySQL and hundreds of other quality open source programs. [http://www.knoppix.net Knoppix.net] allows you to look at the FAQ's and Documentation, participate in discussions on the forums, or just burn a copy of it and try it out! - You can download it ( CD or DVD size ISO files ) or buy it from a CD distributor, more info on the [http://www.knoppix.net/get.php download / buy page].&lt;br /&gt;
&lt;br /&gt;
The documentation found here is organized in several sections.  The goal is to take you from the very beginning as you learn how to use [[Knoppix]] all the way to advanced applications of the [[LiveCD |Live Linux CD]].&lt;br /&gt;
&lt;br /&gt;
'''What this wiki is NOT''': This is not the place to post your questions about Knoppix. While there is a section to track bugs once they are well defined, please do not edit FAQs or other articles just to add a question without an answer. The [http://www.knoppix.net/forum/ Knoppix forum] is the proper place for asking for help from other Knoppix users. If you post questions in the wiki fewer people will see them and you will not get as many or as high quality of responses as in the forums. If you do post a question in the forums and get an informative response, consider enhancing the wiki by adding that information to the appropriate section (assuming it wasn't there already). &lt;br /&gt;
&lt;br /&gt;
; [[Downloading FAQ | Download]] : A handy one-stop source of information about downloading, verifying, burning and booting a Knoppix CD or DVD is this wiki's [[Downloading FAQ]]. You may also want to review the wiki article on [[Bittorrent]]. If you do not wish to download and burn your own copy there are others who will sell you a copy of Knoppix that you can find at [http://knopper.net/knoppix-vendors/index-en.php the official Knoppix vendor site]. &lt;br /&gt;
&lt;br /&gt;
; [[:Category : FAQ Page | FAQ]] :  There are various [[:Category : FAQ Page | Frequently Asked Question]] pages available.&lt;br /&gt;
&lt;br /&gt;
; [[:Category: Bug Pages | Bug report pages]] : If you have found a bug in Knoppix, you can report it on the Bug tracking site.  However, some users have developed [[:Category: Bug Pages | bug report pages]] on this wiki that include work arounds to some of the problems with each release of [[Knoppix]].&lt;br /&gt;
&lt;br /&gt;
; [[Customizing FAQ | Customizing]] : After you have experimented with [[Knoppix]] for awhile you may want to customize it.  Customizing may be as simple as using the [[:Category: Cheat Codes | Cheat Codes]] while [[booting]] the [[Knoppix]] CD.  You may want to look at the [[Customizing FAQ]] or at some of the [[Knoppix Customisations | specialized Knoppix based Linux distributions]]. &lt;br /&gt;
&lt;br /&gt;
; [[:Category: Remastering Knoppix | Knoppix Remastering]] :  If [[Customizing FAQ | customizing]] isn't meeting your needs, then there's information on [[Knoppix Remastering Howto | how to remaster Knoppix]].  Yes, remastering is one of the beautiful facts of Open Source software: You can take the software and remold it to how you see fit.  There are translations available of the [[Knoppix Remastering Howto]] ---- [[Knoppix Remastering Howto Deutsch|Deutsch]] ---- [[Knoppix Remastering Howto French|French]] ---- [[Knoppix Remastering Howto Spanish|en español]] ---- [[Knoppix Remastering Howto Russian|Russian]] ---- [[Knoppix Remastering Howto Indonesian|Indonesian]].&lt;br /&gt;
&lt;br /&gt;
; [[:Category: Hard drive Installation | Hard drive Installation]] : The main strength of [[Knoppix]] is its ability to be run from memory as a [[LiveCD |Live Linux CD]].  The advantage to this is that you can take the CD with you.  However, some users have worked out how to install [[Knoppix]] on a hard drive. Hard drive install of Knoppix is not recommended for the new user and one should understand that there are problems associated with a hard drive install of Knoppix, particularly if you try to install more software or update your current software. Users are encouraged to look at a Debian ( www.debian.org ) install before trying to &amp;quot;install&amp;quot; Knoppix. If you have an old small hard drive, a large hard drive, or any drive other than a CD Rom drive that [[Knoppix]] was originally intended for, then you may want to look at some of these [[:Category: Hard drive Installation | Hard drive Installation]] pages.&lt;br /&gt;
&lt;br /&gt;
; [[:Special:Categories | Organized Content]] : As the wiki develops more of the content will be organized.  Here's some sample pages that may help you get going with the wiki ---- [[:Category: Cheat Codes | Cheat Codes]] ---- [[:Category : FAQ Page | FAQ]] ---- [[:Category: Open Source Applications | Open Source Applications]] ---- [[:Category: Remastering Knoppix | Knoppix Remastering]] ---- [[:Category: Hard drive Installation | Hard drive Installation]] ---- [[:Category: Useful Linux Commands|Useful Linux Commands]] ---- [[:Category: Useful knoppix Commands|Useful Knoppix Commands]] ---- [[:Category: Bug Pages | Bug report pages]] ---- [[:Category: Page stubs | Page stubs that could use additional content]] ---- [[Quick Index]] ---- Any ideas would be welcomed.  How are you looking for information relating to [[knoppix]]? &amp;lt;!-- Note the syntax here. Please see http://en.wikipedia.org/wiki/Template:Wikipedia:Wikiportal/Geography/Categories as an example --&amp;gt; 	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Wiki Status =&lt;br /&gt;
&lt;br /&gt;
Note: the wiki is in a state of flux as described at [[Wiki_Upgrade_Info]]. Please see that page on how you can help get all the pages back. &lt;br /&gt;
&lt;br /&gt;
Currently, the theme and plan of the wiki will take a novice user from the beginning all the way to advanced topics.  Sections of the wiki will show you how to obtain, verify, burn the ISO file to a CD-R and finally how to boot Knoppix. Other sections will help a user become aquainted with the GUI interface that Knoppix provides.  Moreover, some of the power of the command prompt and shell scripting languages will be provided.  These topics may help you prepare for remastering Knoppix to meet your needs.  Though Knoppix was designed to run from a CD-ROM drive, hard drive installations are possible.&lt;br /&gt;
&lt;br /&gt;
There's a [[Quick Index]] page so that you can find pages easier while the wiki is in transition.  The following two sections may help you find what you are looking for right away.  The final sections on this page are conversion status pages.  However, they are full of useful information now even though the conversion team has not had the chance to organize the content.  If you'd like to help with the conversion, please sign up for an account and dig in.  The [[Current events]] page has a list of all the pages that still need additional work.&lt;br /&gt;
&lt;br /&gt;
= Main Articles =&lt;br /&gt;
[[Alias]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Apt]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 05:32, 27 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Baby Gimp]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Basic Poor Mans]] --[[User:Markus|Markus]] 19:59, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bittorrent]] --[[User:Kyle|Kyle]] 07:13, 04 Jan 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Booting the CD / DVD]]  --[[User:Harry Kuhman|Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[Bugs]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.4]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.4-2004-05-10]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.4-2004-05-17]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.5]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.7|Knoppix Version V3.7-pcwelt bugs]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.6-2004-08-16]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/BSD]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/Installer]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Burning the CD / DVD]]  --[[User:Harry Kuhman|Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[CeBIT]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Cheat Codes]] --[[User:Kyle|Kyle]] 07:13, 21 Dec 2004 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Cheat Codes Deutsch ]] --[[User:Kyle|Kyle]] 16:37, 21 Dec 2004 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Cloop Version 2.01]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Compression]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[crontab]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Customizing FAQ]] --[[User:Kyle|Kyle]] &lt;br /&gt;
&lt;br /&gt;
[[Dance Dance Tux]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Deutsch Knoppix FAQ]] --[[User:Kyle|Kyle]]&lt;br /&gt;
&lt;br /&gt;
[[Downloading FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 19:22, 18 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[echo]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[find]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[FTP FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:24, 28 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Galeon]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Gimp]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[GnuCash]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[General FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 14:31, 16 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Hardware FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 14:28, 3 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Installation of older Knopix to HDD]]&lt;br /&gt;
--[[User:jsu|jsu]] 8:40, 11 Mar 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Hd Install HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:34, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[HD Install Warning not to do it]]&lt;br /&gt;
--[[User Harry Kuhman!Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[Hd Install Without a Monitor HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:54, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Headless Knoppix]]&lt;br /&gt;
--[[User:Markus|Markus]] 14:44, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Install FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 15:14, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Install Over Net HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 19:38, 28 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Installation Ueber Netz]]&lt;br /&gt;
--[[User:Markus|Markus]] 19:57, 28 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Kernel]] --[[User:Kyle|Kyle]] &lt;br /&gt;
&lt;br /&gt;
[[Knopp Myth]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 14:24, 16 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Customisations]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 19:44, 20 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Hard Disk Scripts]]&lt;br /&gt;
--[[User:Markus|Markus]] 13:34, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Installer]]&lt;br /&gt;
--[[User:Markus|Markus]] 16:18, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Remastering Howto]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 05:30, 27 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Remastering with Menu Based Scripts]]&lt;br /&gt;
[[User:Leah|Leah]] 19:23, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Remastering Howto Russian]]&lt;br /&gt;
--[[User:S-max|S-max]] 18:39, 21 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Versions]] --[[User:Kyle|Kyle]] &lt;br /&gt;
&lt;br /&gt;
[[Lilo]]&lt;br /&gt;
--[[User:Markus|Markus]] 12:48, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Lin Neighborhood]]&lt;br /&gt;
--[[User:Markus|Markus]] 16:42, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[lissetup.sh]]&lt;br /&gt;
--[[User:Markus|Markus]] 19:46, 3 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[lisstart.sh]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ls]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[LVM2]]&lt;br /&gt;
--[[User:X1jmp|X1jmp]] 13:03, 26 Jul 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Mailing List]]&lt;br /&gt;
--[[User:Kyle|Kyle]] 8:50, 21 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[mkdir]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Mo Bo]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Network FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] &lt;br /&gt;
&lt;br /&gt;
[[Open Office]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Partition Managers]]&lt;br /&gt;
--[[User:Markus|Markus]] 13:30, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Pivot Root Install]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:22, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Poor Mans Install]]&lt;br /&gt;
--[[User:Markus|Markus]] 17:04, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[PXE FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 17:10, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Red Hat]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Remaster From Hd Install HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 17:06, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Rescue FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 16:36, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Root]]&lt;br /&gt;
--[[User:Markus|Markus]] 13:25, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Smb Client HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 18:57, 3 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Synaptic]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Tips And Tricks]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Using FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 19:22, 18 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Win Partition]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:10, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Win2Linux]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Wireless Networking]]&lt;br /&gt;
--[[User:Harry Kuhman|Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[XFree86]] and [[XFree86 |Xfree86]] were merged.&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
= Pages in progress: =&lt;br /&gt;
&lt;br /&gt;
Note for any page that [[User:Dr Kludge|Dr Kludge]] has done and if you feel that page is finished, please move them to the finished section.  You have my permission [[User:Dr Kludge|Dr Kludge]] 10:21, 17 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Air Traf]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[autodetection]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[bash]] &lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Bugs]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 05:29, 27 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Burn Home]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[bootfloppy]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Boot Floppy HowTo]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[boot.img]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[booting]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[botaje]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[bugs/3.4]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cat]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cd]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[CD burner]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cp]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cloop]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[command line]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cdrtools]] and [[cdrecord]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[debian-knoppix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[dd]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[desktop environment]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[download manager]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[dpkg]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[evolution]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[fbdev]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[FluxBox]]&lt;br /&gt;
--[[User:Photonic|Photonic]] 09:02, 5 May 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Gnome]] and [[Gnome|GNOME]] merged using mediawiki pipe&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Gnoppix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[GNU]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[GUI]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[gzip]] &lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[homedir]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[initrd]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ISO]] and [[ISO | ISO Image]] merged using mediawiki pipe&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[kde3.1screenshots]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[KDE]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[linux kernel]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[linux Loader]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[kernel panic]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[kernel image]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[knoppix]] and [[knoppix | Knoppix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Linus Torvalds]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[LiveCD]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[LiveDiskette]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[mkisofs]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[mount]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[morphix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[operating system]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[package]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[partition]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[remaster]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[rm]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[root]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[samba]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Screen Shots]] &lt;br /&gt;
--[[User:Kyle|Kyle]] 14:26, 21 Dec 2004 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Spanish_Knoppix_FAQ]]&lt;br /&gt;
--[[User:Nahuel|Nahuel]] 04:42, 30 Jul 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Skype]]&lt;br /&gt;
--[[User:smoe|Steffen]] 15:55, 8 Aug 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ssh]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ssh-agent and KNOPPIX]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[sudo]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[sys V]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[symlink]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[syslinux bootprompt]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[tar]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[tools]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Unix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Unix command shell]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[unpartitioned install]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[USB]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[USB Based FAQ]]&lt;br /&gt;
--[[User:Nlany|Nlany]] 08:35, 10 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[user interface]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Tux]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Wish List]]&lt;br /&gt;
&lt;br /&gt;
= Pages todo =&lt;br /&gt;
&lt;br /&gt;
see http://www.knoppix.net/oldwiki/&lt;br /&gt;
hmmmm.....&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Main_Page"/>
				<updated>2005-11-11T06:03:15Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border-top: dashed 1px; border-bottom: dashed 1px;&amp;quot;&lt;br /&gt;
|[[Downloading FAQ | Download]]||[[:Category : FAQ Page | FAQ]] || [[:Category: Bug Pages | Bug report pages]] || [[Customizing FAQ | Customizing]] || [[:Category: Remastering Knoppix | Knoppix Remastering]] || [[:Category: Hard drive Installation | Hard drive Installation]] || [[:Special:Categories | Organized Content]]&lt;br /&gt;
 |-&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
Welcome to the [[Knoppix]] wiki.  This wiki and other features found on [http://www.knoppix.net Knoppix.net] are all about [[Knoppix]]. [http://www.knoppix.net Knoppix.net] is a resource for users, developers, and testers of [[Knoppix]]. The official website for [[Knoppix]] is at [http://www.knopper.net/knoppix/index-en.html Klaus Knopper's website].&lt;br /&gt;
&lt;br /&gt;
[[Knoppix]] is a Free and Open Source [[LiveCD |Live Linux CD]] based on Debian [[GNU]]/[[Linux]].   [[LiveCD |Live Linux CD]] means that the computer [[Booting|boots]] and runs completely from cd. Nothing is installed on your hard drive in order for you to experience many of the [[:Category: Open Source Applications| Open Source software packages]] available. [[Knoppix]] includes recent [[Linux]] software and desktop environments, including such applications as [[Open Office | OpenOffice.org]], Abiword, [[Gimp]], Konqueror, Firefox, Apache, PHP, MySQL and hundreds of other quality open source programs. [http://www.knoppix.net Knoppix.net] allows you to look at the FAQ's and Documentation, participate in discussions on the forums, or just burn a copy of it and try it out! - You can download it ( CD or DVD size ISO files ) or buy it from a CD distributor, more info on the [http://www.knoppix.net/get.php download / buy page].&lt;br /&gt;
&lt;br /&gt;
The documentation found here is organized in several sections.  The goal is to take you from the very beginning as you learn how to use [[Knoppix]] all the way to advanced applications of the [[LiveCD |Live Linux CD]].&lt;br /&gt;
&lt;br /&gt;
'''What this wiki is NOT''': This is not the place to post your questions about Knoppix. While there is a section to track bugs once they are well defined, please do not edit FAQs or other articles just to add a question without an answer. The [http://www.knoppix.net/forum/ Knoppix forum] is the proper place for asking for help from other Knoppix users. If you post questions in the wiki fewer people will see them and you will not get as many or as high quality of responses as in the forums. If you do post a question in the forums and get an informative response, consider enhancing the wiki by adding that information to the appropriate section (assuming it wasn't there already). &lt;br /&gt;
&lt;br /&gt;
; [[Downloading FAQ | Download]] : A handy one-stop source of information about downloading, verifying, burning and booting a Knoppix CD or DVD is this wiki's [[Downloading FAQ]]. You may also want to review the wiki article on [[Bittorrent]]. If you do not wish to download and burn your own copy there are others who will sell you a copy of Knoppix that you can find at [http://knopper.net/knoppix-vendors/index-en.php the official Knoppix vendor site]. &lt;br /&gt;
&lt;br /&gt;
; [[:Category : FAQ Page | FAQ]] :  There are various [[:Category : FAQ Page | Frequently Asked Question]] pages available.&lt;br /&gt;
&lt;br /&gt;
; [[:Category: Bug Pages | Bug report pages]] : If you have found a bug in Knoppix, you can report it on the Bug tracking site.  However, some users have developed [[:Category: Bug Pages | bug report pages]] on this wiki that include work arounds to some of the problems with each release of [[Knoppix]].&lt;br /&gt;
&lt;br /&gt;
; [[Customizing FAQ | Customizing]] : After you have experimented with [[Knoppix]] for awhile you may want to customize it.  Customizing may be as simple as using the [[:Category: Cheat Codes | Cheat Codes]] while [[booting]] the [[Knoppix]] CD.  You may want to look at the [[Customizing FAQ]] or at some of the [[Knoppix Customisations | specialized Knoppix based Linux distributions]]. &lt;br /&gt;
&lt;br /&gt;
; [[:Category: Remastering Knoppix | Knoppix Remastering]] :  If [[Customizing FAQ | customizing]] isn't meeting your needs, then there's information on [[Knoppix Remastering Howto | how to remaster Knoppix]].  Yes, remastering is one of the beautiful facts of Open Source software: You can take the software and remold it to how you see fit.  There are translations available of the [[Knoppix Remastering Howto]] ---- [[Knoppix Remastering Howto Deutsch|Deutsch]] ---- [[Knoppix Remastering Howto French|French]] ---- [[Knoppix Remastering Howto Spanish|en español]] ---- [[Knoppix Remastering Howto Russian|Russian]] ---- [[Knoppix Remastering Howto Indonesian|Indonesian]].&lt;br /&gt;
&lt;br /&gt;
; [[:Category: Hard drive Installation | Hard drive Installation]] : The main strength of [[Knoppix]] is its ability to be run from memory as a [[LiveCD |Live Linux CD]].  The advantage to this is that you can take the CD with you.  However, some users have worked out how to install [[Knoppix]] on a hard drive. Hard drive install of Knoppix is not recommended for the new user and one should understand that there are problems associated with a hard drive install of Knoppix, particularly if you try to install more software or update your current software. Users are encouraged to look at a Debian ( www.debian.org ) install before trying to &amp;quot;install&amp;quot; Knoppix. If you have an old small hard drive, a large hard drive, or any drive other than a CD Rom drive that [[Knoppix]] was originally intended for, then you may want to look at some of these [[:Category: Hard drive Installation | Hard drive Installation]] pages.&lt;br /&gt;
&lt;br /&gt;
; [[:Special:Categories | Organized Content]] : As the wiki develops more of the content will be organized.  Here's some sample pages that may help you get going with the wiki ---- [[:Category: Cheat Codes | Cheat Codes]] ---- [[:Category : FAQ Page | FAQ]] ---- [[:Category: Open Source Applications | Open Source Applications]] ---- [[:Category: Remastering Knoppix | Knoppix Remastering]] ---- [[:Category: Hard drive Installation | Hard drive Installation]] ---- [[:Category: Useful Linux Commands|Useful Linux Commands]] ---- [[:Category: Useful knoppix Commands|Useful Knoppix Commands]] ---- [[:Category: Bug Pages | Bug report pages]] ---- [[:Category: Page stubs | Page stubs that could use additional content]] ---- [[Quick Index]] ---- Any ideas would be welcomed.  How are you looking for information relating to [[knoppix]]? &amp;lt;!-- Note the syntax here. Please see http://en.wikipedia.org/wiki/Template:Wikipedia:Wikiportal/Geography/Categories as an example --&amp;gt; 	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Wiki Status =&lt;br /&gt;
&lt;br /&gt;
Note: the wiki is in a state of flux as described at [[Wiki_Upgrade_Info]]. Please see that page on how you can help get all the pages back. &lt;br /&gt;
&lt;br /&gt;
Currently, the theme and plan of the wiki will take a novice user from the beginning all the way to advanced topics.  Sections of the wiki will show you how to obtain, verify, burn the ISO file to a CD-R and finally how to boot Knoppix. Other sections will help a user become aquainted with the GUI interface that Knoppix provides.  Moreover, some of the power of the command prompt and shell scripting languages will be provided.  These topics may help you prepare for remastering Knoppix to meet your needs.  Though Knoppix was designed to run from a CD-ROM drive, hard drive installations are possible.&lt;br /&gt;
&lt;br /&gt;
There's a [[Quick Index]] page so that you can find pages easier while the wiki is in transition.  The following two sections may help you find what you are looking for right away.  The final sections on this page are conversion status pages.  However, they are full of useful information now even though the conversion team has not had the chance to organize the content.  If you'd like to help with the conversion, please sign up for an account and dig in.  The [[Current events]] page has a list of all the pages that still need additional work.&lt;br /&gt;
&lt;br /&gt;
= Main Articles =&lt;br /&gt;
[[Alias]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Apt]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 05:32, 27 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Baby Gimp]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Basic Poor Mans]] --[[User:Markus|Markus]] 19:59, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bittorrent]] --[[User:Kyle|Kyle]] 07:13, 04 Jan 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[BIOS]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Booting the CD / DVD]]  --[[User:Harry Kuhman|Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[Bugs]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.4]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.4-2004-05-10]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.4-2004-05-17]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.5]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.7|Knoppix Version V3.7-pcwelt bugs]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/3.6-2004-08-16]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/BSD]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Bugs/Installer]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Burning the CD / DVD]]  --[[User:Harry Kuhman|Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[CeBIT]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Cheat Codes]] --[[User:Kyle|Kyle]] 07:13, 21 Dec 2004 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Cheat Codes Deutsch ]] --[[User:Kyle|Kyle]] 16:37, 21 Dec 2004 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Cloop Version 2.01]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Compression]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[crontab]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Customizing FAQ]] --[[User:Kyle|Kyle]] &lt;br /&gt;
&lt;br /&gt;
[[Dance Dance Tux]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Deutsch Knoppix FAQ]] --[[User:Kyle|Kyle]]&lt;br /&gt;
&lt;br /&gt;
[[Downloading FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 19:22, 18 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[echo]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[find]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[FTP FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:24, 28 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Galeon]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Gimp]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[GnuCash]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[General FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 14:31, 16 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Hardware FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 14:28, 3 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Installation of older Knopix to HDD]]&lt;br /&gt;
--[[User:jsu|jsu]] 8:40, 11 Mar 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Hd Install HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:34, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[HD Install Warning not to do it]]&lt;br /&gt;
--[[User Harry Kuhman!Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[Hd Install Without a Monitor HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:54, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Headless Knoppix]]&lt;br /&gt;
--[[User:Markus|Markus]] 14:44, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Install FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 15:14, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Install Over Net HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 19:38, 28 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Installation Ueber Netz]]&lt;br /&gt;
--[[User:Markus|Markus]] 19:57, 28 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Kernel]] --[[User:Kyle|Kyle]] &lt;br /&gt;
&lt;br /&gt;
[[Knopp Myth]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 14:24, 16 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Customisations]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 19:44, 20 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Hard Disk Scripts]]&lt;br /&gt;
--[[User:Markus|Markus]] 13:34, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Installer]]&lt;br /&gt;
--[[User:Markus|Markus]] 16:18, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Remastering Howto]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 05:30, 27 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Remastering with Menu Based Scripts]]&lt;br /&gt;
[[User:Leah|Leah]] 19:23, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Remastering Howto Russian]]&lt;br /&gt;
--[[User:S-max|S-max]] 18:39, 21 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Knoppix Versions]] --[[User:Kyle|Kyle]] &lt;br /&gt;
&lt;br /&gt;
[[Lilo]]&lt;br /&gt;
--[[User:Markus|Markus]] 12:48, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Lin Neighborhood]]&lt;br /&gt;
--[[User:Markus|Markus]] 16:42, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[lissetup.sh]]&lt;br /&gt;
--[[User:Markus|Markus]] 19:46, 3 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[lisstart.sh]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ls]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[LVM2]]&lt;br /&gt;
--[[User:X1jmp|X1jmp]] 13:03, 26 Jul 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Mailing List]]&lt;br /&gt;
--[[User:Kyle|Kyle]] 8:50, 21 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[mkdir]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Mo Bo]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Network FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] &lt;br /&gt;
&lt;br /&gt;
[[Open Office]]&lt;br /&gt;
--[[User:Dr Kludge |Dr Kludge]] 22:17, 25 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Partition Managers]]&lt;br /&gt;
--[[User:Markus|Markus]] 13:30, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Pivot Root Install]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:22, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Poor Mans Install]]&lt;br /&gt;
--[[User:Markus|Markus]] 17:04, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[PXE FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 17:10, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Red Hat]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Remaster From Hd Install HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 17:06, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Rescue FAQ]]&lt;br /&gt;
--[[User:Markus|Markus]] 16:36, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Root]]&lt;br /&gt;
--[[User:Markus|Markus]] 13:25, 27 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Smb Client HowTo]]&lt;br /&gt;
--[[User:Markus|Markus]] 18:57, 3 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Synaptic]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Tips And Tricks]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Using FAQ]]&lt;br /&gt;
--[[User:Jjolly|Jjolly]] 19:22, 18 Dec 2004 (EST)&lt;br /&gt;
&lt;br /&gt;
[[Win Partition]]&lt;br /&gt;
--[[User:Markus|Markus]] 20:10, 26 Dec 2004 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Win2Linux]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Wireless Networking]]&lt;br /&gt;
--[[User:Harry Kuhman|Kuhman]]&lt;br /&gt;
&lt;br /&gt;
[[XFree86]] and [[XFree86 |Xfree86]] were merged.&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
= Pages in progress: =&lt;br /&gt;
&lt;br /&gt;
Note for any page that [[User:Dr Kludge|Dr Kludge]] has done and if you feel that page is finished, please move them to the finished section.  You have my permission [[User:Dr Kludge|Dr Kludge]] 10:21, 17 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Air Traf]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[autodetection]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[bash]] &lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Bugs]]&lt;br /&gt;
--[[User:Eadz|Eadz]] 05:29, 27 Feb 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Burn Home]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[bootfloppy]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Boot Floppy HowTo]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[boot.img]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[booting]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[botaje]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[bugs/3.4]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cat]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cd]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[CD burner]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cp]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cloop]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[command line]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[cdrtools]] and [[cdrecord]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[debian-knoppix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[dd]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[desktop environment]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[download manager]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[dpkg]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[evolution]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[fbdev]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[FluxBox]]&lt;br /&gt;
--[[User:Photonic|Photonic]] 09:02, 5 May 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Gnome]] and [[Gnome|GNOME]] merged using mediawiki pipe&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Gnoppix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[GNU]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[GUI]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[gzip]] &lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[homedir]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[initrd]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ISO]] and [[ISO | ISO Image]] merged using mediawiki pipe&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[kde3.1screenshots]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 05:54, 19 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[KDE]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[linux kernel]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[linux Loader]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[kernel panic]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[kernel image]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 00:02, 24 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[knoppix]] and [[knoppix | Knoppix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Linus Torvalds]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[Linux]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[LiveCD]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[LiveDiskette]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[mkisofs]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[mount]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[morphix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[operating system]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[package]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[partition]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[remaster]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[rm]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[root]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[samba]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Screen Shots]] &lt;br /&gt;
--[[User:Kyle|Kyle]] 14:26, 21 Dec 2004 (PST)&lt;br /&gt;
&lt;br /&gt;
[[Spanish_Knoppix_FAQ]]&lt;br /&gt;
--[[User:Nahuel|Nahuel]] 04:42, 30 Jul 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Skype]]&lt;br /&gt;
--[[User:smoe|Steffen]] 15:55, 8 Aug 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ssh]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[ssh-agent and KNOPPIX]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[sudo]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[sys V]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[symlink]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[syslinux bootprompt]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[tar]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[tools]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Unix]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Unix command shell]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[unpartitioned install]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT) &lt;br /&gt;
&lt;br /&gt;
[[USB]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[USB Based FAQ]]&lt;br /&gt;
--[[User:Nlany|Nlany]] 08:35, 10 Jan 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[user interface]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Tux]]&lt;br /&gt;
--[[User:Dr Kludge|Dr Kludge]] 23:02, 16 Sep 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
[[Wish List]]&lt;br /&gt;
&lt;br /&gt;
= Pages todo =&lt;br /&gt;
&lt;br /&gt;
see http://www.knoppix.net/oldwiki/&lt;br /&gt;
hmmmm.....&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T05:30:23Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Remastering Customization Tips and Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Hacks]] / Customization Tips and Examples =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well as [[Knoppix Customizations]]&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T05:29:00Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Adding init scripts that should run */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Installing software and clearing up space with Apt =&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
== Updating packages ==&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot graphics ==&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Customization_Tips_and_Examples</id>
		<title>Remastering Customization Tips and Examples</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Customization_Tips_and_Examples"/>
				<updated>2005-11-11T05:25:13Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: Remastering Customization Tips and Examples moved to Remastering Hacks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Remastering Hacks]]&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remaster_From_Hd_Install_HowTo</id>
		<title>Remaster From Hd Install HowTo</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remaster_From_Hd_Install_HowTo"/>
				<updated>2005-11-11T05:24:19Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Other: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(posted by [[Crashed Again]] (sorry no web address); comments &amp;amp; additions welcome)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
How to remaster Knoppix directly from an operating 'Knoppix type&amp;quot; HD install instead of from a special system accessed by chrooting into it. This allows a much easier setup and you can boot directly into the remaster and operate from it, checking and improving the system as the customization progresses. It is also less confusing, you don't have to keep track of whether or not you are in the chrooted environment.&lt;br /&gt;
&lt;br /&gt;
This method also includes a second installation of a 'toHD' or 'poor mans install' as there are some operations which must be done from outside the system being remastered. This second installation provides this capability, serves as a backup system and also serves as a test bed for the final remastered compressed file system.&lt;br /&gt;
&lt;br /&gt;
The toHD installation is not absolutely necessary as the Knoppix CD could be used instead but operating from the HD is faster and much more convenient. When combined with a 'persistent home' and configuration setup saved to HD, the toHD install makes a very efficient &amp;amp; compact operating system.&lt;br /&gt;
&lt;br /&gt;
The persistent home is another knoppix feature which can be very useful in remastering. Since remastering often becomes an ongoing process, persistent home can be used to maintain consistency and retain system configuration settings throughout the process. You can even use the same persistent home for the HDinstall remaster source and the backup toHD system.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== System Requirements &amp;amp; Setup ====&lt;br /&gt;
&lt;br /&gt;
This method is applicable to Knoppix versions later than 3.3. Earlier versions do not have the provision for the required 'Knoppix style' HD installation.&lt;br /&gt;
&lt;br /&gt;
Any computer capable of running Knoppix can be used for remastering provided it has enough free space on the hard drive. Approximately 6 Gig of free space is required:&lt;br /&gt;
&lt;br /&gt;
*HD installed Knoppix......................................................min 2.3 Gig&amp;lt;br&amp;gt;&lt;br /&gt;
*assembled compressed file system...............................700 Meg&amp;lt;br&amp;gt;&lt;br /&gt;
*final iso file system ready to burn to CD........................700 Meg&amp;lt;br&amp;gt;&lt;br /&gt;
*combined RAM &amp;amp; swap space totalling 1 Gig..................500-700Meg&amp;lt;br&amp;gt;&lt;br /&gt;
*toHD Knoppix operating system.....................................700 Meg&amp;lt;br&amp;gt;&lt;br /&gt;
*Total...............................................................................6.1 Gig&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we are going to assume we are starting from a HD with some form of Windows on it which will be set up for dual boot as this is probably more typical than a Linux only system. Functionally, the only difference having the Windows system actually makes is to change the partition numbers.&lt;br /&gt;
&lt;br /&gt;
The recommended HD partition is as follows:&lt;br /&gt;
&lt;br /&gt;
*hda1...Windows O/S....................................size as appropriate&lt;br /&gt;
*hda5...Knoppix HD install.............................min 2.3 Gig, 3-3.5 preferred&lt;br /&gt;
*hda6...new remastered isos........................min 1.5 Gig&lt;br /&gt;
*hda7...shared Windows/Linux data, VFAT format, all remaining space&lt;br /&gt;
*hda8...Linux swap......................................approx 500-700 Meg&lt;br /&gt;
*      (swap size as needed to total 1Gig RAM + swap)&lt;br /&gt;
&lt;br /&gt;
NOTE: Some Linux users add a separate partition for /home to keep their data on a separate partition from the O/S; instead of using a separate partition, put your data on hda7 &amp;amp; add symlinks in your /home directory to access the directories on hda7. The command for making symlinks is&lt;br /&gt;
&lt;br /&gt;
 '''ln -s /mnt/hda7/your''directory /home/knoppix/directory''name'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The HD install being remastered must be on a separate partition by itself (hda5) as the whole partition will be used as the source for creating the compressed file system.&lt;br /&gt;
&lt;br /&gt;
The create compressed file system command must be run from a different operating system than the source for the compressed file system. We are going to use the toHD install for this operation.&lt;br /&gt;
&lt;br /&gt;
The toHD system should preferably be installed on hda1 with a persistent home and configuration files on hda7. The reason is that Knoppix will not give write access to the partition on which the toHD system is installed. Since we must have write access to hda6 to create the compressed file system and should also have write access to the hda7 as it is our main data drive, the toHD install should go on hda1. Not having write access to hda1 is of no consequence as it contains only the Windows operating system.&lt;br /&gt;
&lt;br /&gt;
If it is not possible to put the toHD system on hda1, it should go on hda7 either with no persistent home or with persistent home on its own separate partition.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Partition the HD and install Knoppix ====&lt;br /&gt;
&lt;br /&gt;
Partition the HD as above and install Knoppix as a 'Knoppix style' HD install. With Knoppix 3.3 &amp;amp; 3.4 the install command is:&lt;br /&gt;
 '''sudo knoppix-installer'''&lt;br /&gt;
This may change for later versions of Knoppix. Put the bootloader lilo on the MBR, it will be used to boot the toHD install as well.&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Install the toHD system &amp;amp; set up to boot from lilo ====&lt;br /&gt;
&lt;br /&gt;
To install, just boot Knoppix with the boot code 'knoppix tohd=/dev/hda1' at the boot prompt.&lt;br /&gt;
&lt;br /&gt;
In order to boot the toHD install without requiring a boot disk, a directory /boot containing at least the minimum required files to boot Knoppix must be installed on hda1. Using the HD install on hda5, first create the directory then as root do the following:&lt;br /&gt;
&lt;br /&gt;
'''For Knoppix 3.3:&lt;br /&gt;
&lt;br /&gt;
The minimum files are vmlinuz and miniroot.gz which can not be directly copied from the CD, they are buried in /boot.img. To extract the files, the boot.img must first be mounted on a loop device then on an intermediate mount point (use the existing directory /mnt/floppy) from which they can be copied to hda1. For simplicity we are just going to copy all the files in the boot.img.&lt;br /&gt;
&lt;br /&gt;
 '''/sbin/losetup /dev/loop0 /mnt/cdrom/KNOPPIX/boot.img'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''mount /dev/loop0 /mnt/floppy/'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''cp /mnt/floppy/* /mnt/hda1/boot'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then edit /etc/lilo.conf adding the following&lt;br /&gt;
&lt;br /&gt;
 '''image=/mnt/hda1/boot/vmlinuz'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''label=&amp;quot;toHDKnoppix&amp;quot;'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''append=&amp;quot;lang=us fromhd=/dev/hda1 home=scan myconfig=scan apm=power-off&amp;quot;'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''initrd=/mnt/hda1/boot/miniroot.gz'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''read-only'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Change &amp;quot;lang=&amp;quot; as appropriate, only include the home=scan &amp;amp; myconfig=scan if you are using 'persistent home')&lt;br /&gt;
&lt;br /&gt;
'''For Knoppix 3.4:&lt;br /&gt;
&lt;br /&gt;
The required files are linux24, linux26, minirt24.gz &amp;amp; minirt26.gz. These are located in the directory /boot/isolinux on the CD and can be directly copied to hda1 from there. The easiest way is to just use konqueror and drag-drop the entire directory '/mnt/cdrom/isolinux' to /mnt/hda1/boot/.&lt;br /&gt;
&lt;br /&gt;
Then add the following to lilo.conf:&lt;br /&gt;
 '''image=/mnt/hda1/boot/isolinux/linux24'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''label=&amp;quot;Knoppix3.4-24&amp;quot;'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''append=&amp;quot;lang=us fromhd=/dev/hda1 home=scan myconfig=scan apm=power-off&amp;quot;'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''initrd=/mnt/hda1/boot/isolinux/minirt24.gz'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''read-only'''&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 '''image=/mnt/hda1/boot/isolinux/linux26'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''label=&amp;quot;Knoppix3.4-26&amp;quot;'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''append=&amp;quot;lang=us fromhd=/dev/hda1 home=scan myconfig=scan apm=power-off&amp;quot;'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''initrd=/mnt/hda1/boot/isolinux/minirt26.gz'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''read-only'''&lt;br /&gt;
&lt;br /&gt;
Don't forget to run lilo to update the settings before exiting.&lt;br /&gt;
&lt;br /&gt;
Now you can reboot into the toHD install, change the settings to your preferences, set up your persistent home and save your configuration settings to hda7. Persistent home doesn't have to be very large as the main data will be on hda7, /home contains primarily setup files &amp;amp; symlinks to hda7.&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Prepare hda6 to receive the remaster: ====&lt;br /&gt;
&lt;br /&gt;
; First, check your file /etc/fstab. There should be a line like this : '''/dev/hda6 /mnt/hda6 vfat noauto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0'''&lt;br /&gt;
&lt;br /&gt;
; as root, change it to add 'shortname=mixed' : '''/dev/hda6 /mnt/hda6 vfat shortname=mixed,auto,users,exec,umask=000,uid=knoppix,gid=knoppix 0 0'''&lt;br /&gt;
&lt;br /&gt;
This is to insure that the file KNOPPIX will be named KNOPPIX, not knoppix. Since linux is case sensitive, lower case 'knoppix' will cause a 'cannot find filesystem' error on the remaster.&lt;br /&gt;
&lt;br /&gt;
Make a directory which will contain the assembled remastered file system prior to creating the final iso.&lt;br /&gt;
&lt;br /&gt;
 '''mkdir /mnt/hda6/knx-remaster'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy everything from the CD except the big KNOPPIX filesystem to this directory&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Remastering Tips: ====&lt;br /&gt;
&lt;br /&gt;
You are now ready to tweak the remaster into your own personal system. There is lots of information on customizing and remastering available, I am not going to go into any detail except to add the following tips.&lt;br /&gt;
&lt;br /&gt;
==== Tip:  Updating sources ====&lt;br /&gt;
&lt;br /&gt;
 '''Use 'dselect update' instead of 'apt-get update''''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:dselect update' will keep the apt &amp;amp; deselect package lists in sync.&lt;br /&gt;
&lt;br /&gt;
==== Tip:  Removing applications ====&lt;br /&gt;
&lt;br /&gt;
 '''dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:will list packages sorted by size.&lt;br /&gt;
&lt;br /&gt;
 '''deborphan | xargs apt-get -y remove'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:will remove orphaned files not used by any package.&lt;br /&gt;
&lt;br /&gt;
 '''apt-get clean'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:will remove archived .deb packages. These are no longer needed once the package has been installed.&lt;br /&gt;
&lt;br /&gt;
 '''Use a purgelist to remove multiple packages at once'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;:make up a 'purgelist' of the applications to remove then apt-get remove them all at once.&lt;br /&gt;
&lt;br /&gt;
;:example purgelist :&lt;br /&gt;
&lt;br /&gt;
;:3270 ace-of amanda anacron artwiz-cursor atitvout bonobo brltty chromium emacs enigma euro falconseye fetchmail fluxbox fortunes freeciv&lt;br /&gt;
&lt;br /&gt;
;:Note that this is a space-separated list, all on one line and that wildcards are permitted. If you use a CR separated list and apt-get comes to an item it cannot find, it will not continue. If you use dpkg instead of apt-get you cannot use wildcards. [[Open Office]] can generate a space separated list from a CR separated by saving as filetype .csv&lt;br /&gt;
&lt;br /&gt;
;:The command for using the purgelist is&lt;br /&gt;
&lt;br /&gt;
 '''apt-get remove `cat purgelist `'''&amp;lt;br&amp;gt;&lt;br /&gt;
;:(The ` is the character under the tilde (~) key.)&lt;br /&gt;
&lt;br /&gt;
;:When making up your purgelist , TEST BEFORE USING. Interwoven dependencies can create some unexpected results...for instance removing aalib* will remove the Gimp and removing libarts1 will nuke all of KDE. For all but the simplest operations, apt-get will ask for confirmation before it does anything but be safe &amp;amp; use 'apt-get -s remove...' first. Read through the lists and make sure of what is going to happen before actually doing it.&lt;br /&gt;
&lt;br /&gt;
'''Clean up configuration files'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apt-get remove &amp;lt;package&amp;gt; will remove the package but does not remove the configuration files. You can clean up the configuration files with&lt;br /&gt;
&lt;br /&gt;
 '''COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you can do it all at once with&lt;br /&gt;
&lt;br /&gt;
 '''apt-get --purge remove &amp;lt;package&amp;gt;'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tip: Changing the default background ====&lt;br /&gt;
&lt;br /&gt;
 '''cp your-favorite-image.jpg /usr/local/lib/knoppix.jpg'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it the same as your WM background and you have a nice transition from text mode to desktop.&lt;br /&gt;
&lt;br /&gt;
==== Tip: Language support ====&lt;br /&gt;
&lt;br /&gt;
Internationalization takes up over 5% of the Knoppix filesystem; removing uneeded language support will free up considerable filespace. Install the package 'localepurge' to remove all the language support you don't need.&lt;br /&gt;
&lt;br /&gt;
 '''apt-get remove kde-i18n*&lt;br /&gt;
&lt;br /&gt;
will clear over 100 Meg by removing all alternate kde language support files except english. Of course if you need support for another language you will only be able to remove the ones you don't need.&lt;br /&gt;
&lt;br /&gt;
==== Tip: Accidentally removing knoppix-installer ====&lt;br /&gt;
&lt;br /&gt;
;:The hard drive installer package needs the lib file kdelibs4. Removing KDE by the common method of 'apt-get remove libarts1' (which will remove all of KDE) will also remove the knx-installer, so you must either reinstall it after nuking KDE or use a different method of removing KDE packages. Personally I am a KDE user so don't nuke KDE but it may still become an issue when upgrading KDE.&lt;br /&gt;
&lt;br /&gt;
The package knx-installer is available from: http://debian.tu-bs.de/knoppix/installer/&lt;br /&gt;
&lt;br /&gt;
==== Tip: Removing Window managers: ====&lt;br /&gt;
&lt;br /&gt;
;:Boot 'Knoppix 2' if you are planning to remove your window manager; the system gets pretty confused if you remove KDE while running KDE.&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Cleaning Up ====&lt;br /&gt;
&lt;br /&gt;
Remove the file /etc/X11/XF86Config-4. The /etc/X11/xsession.d/45xsession script will generate the correct configuration for the hardware found only if there is no existing XF86Config-4 file.&lt;br /&gt;
&lt;br /&gt;
Remove any unneeded configuration files for applications you have removed from /home/knoppix. These are hidden files in your /home/knoppix directory. Check with your favorite file manager with 'show hidden files' enabled and remove any you don't need.&lt;br /&gt;
&lt;br /&gt;
Transfer your /home/knoppix directory to /etc/skel if you wish to save your setup. Knoppix CD loads default settings from /etc/skel unless a persistent home is used.&lt;br /&gt;
&lt;br /&gt;
 '''(as root)'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''cp /home/knoppix/* /etc/skel'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''cp /home/knoppix/.* /etc/skel'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''cp /home/knoppix/Desktop/* /etc/Desktop'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should not be necessary to remove your existing /home/knoppix prior to making your compressed file system except to save space; Knoppix will automatically overwrite /home/knoppix with /etc/skel during boot. If you do remove /home/knoppix, save it somewhere first so you can restore it if need be. Your HDinstall will resort to default settings unless your existing /home/knoppix is restored.&lt;br /&gt;
&lt;br /&gt;
Update your system databases&lt;br /&gt;
&lt;br /&gt;
 '''updatedb'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''ldconfig'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''update-modules'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should also run apt-get clean, purge old configuration files and remove deborphans as above before making the compressed file system.&lt;br /&gt;
&lt;br /&gt;
; You should also create default /etc/resolv.conf &amp;amp; /etc/dhcpc/resolv.conf files : '''cat &amp;gt;/etc/dhcpc/resolv.conf &amp;lt;&amp;lt;EOT'''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''' # insert nameservers here'''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''' # nameserver 127.0.0.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''EOT'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''chmod 644 /etc/dhcpc/resolv.conf'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''ln -s /etc/dhcpc/resolv.conf /etc/'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 '''cat &amp;gt;/etc/resolv.conf &amp;lt;&amp;lt;EOT'''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''' # insert nameservers here'''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''' # nameserver 127.0.0.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''EOT'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''chmod 644 /etc/resolv.conf'''&lt;br /&gt;
&lt;br /&gt;
You can remove other system config files such as /etc/sysconfig/''' and /etc/sysconfig/network-scripts/'''. This will result in your remaster starting up with all default Knoppix settings including language settings.&lt;br /&gt;
&lt;br /&gt;
You may not want to do this. Since you are making a custom remaster rather than a general purpose universal operating system like the Knoppix original, you may wish to retain your personal settings instead.&lt;br /&gt;
&lt;br /&gt;
==== Cleanup Script ====&lt;br /&gt;
&lt;br /&gt;
A 'clean-up' script called 'remaster-clean' will be included with this how-to. It is based on the original script by Klaus Knopper but modifications by several users have been incorporated as well as comments to help the neophyte understand what it is doing. It does not restore all config files to default values nor does it remove /home/knoppix. I have set it up this way because it leaves the HD install which I am using as a source intact after making the remaster.&lt;br /&gt;
&lt;br /&gt;
WARNING: This script has been successfully tested but as usual there are no guarantees it will work on your system. It should give slightly smaller file size than the basic cleanup outlined above since it removed expanded manpage files, etc. but be prepared for possible problems.&lt;br /&gt;
&lt;br /&gt;
It must be run as root. Copy the script to the /user/sbin directory then 'sudo remaster.clean' to run.&lt;br /&gt;
&lt;br /&gt;
Copy by using cut &amp;amp; paste but check the script before using with a text editor such as KDE's Kate; the most likely source of copy problems is unwanted spaces at the beginning of the line. This may cause problems, in particular with the line&lt;br /&gt;
&lt;br /&gt;
'''EOT'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is found in two places in the script. This 'EOT' must be at the beginning of the line&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;space&amp;gt;EOT will not work.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 5: Making the compressed file system ====&lt;br /&gt;
&lt;br /&gt;
; This must be run from our 'alternate' operating system (the toHD install) : '''mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; -hide-rr-moved -cache-inodes -no-bak -pad /mnt/hda5 | nice -5 /usr/bin/create''compressed''fs - 65536 &amp;gt; /mnt/hda6/knx-remaster/KNOPPIX/KNOPPIX'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(this should be all on one line)&lt;br /&gt;
&lt;br /&gt;
Using the -b option for maximum compression will result in slightly better compression but will take much longer, sometimes as much as 12 hours.&lt;br /&gt;
&lt;br /&gt;
 '''mkisofs -R -U -V &amp;quot;KNOPPIX.net filesystem&amp;quot; -P &amp;quot;KNOPPIX www.knoppix.net&amp;quot; -hide-rr-moved \ &lt;br /&gt;
 '''-cache-inodes -no-bak -pad /mnt/hda5 | /usr/bin/create''compressed''fs -b - 65536 &amp;gt; \&lt;br /&gt;
 '''/mnt/hda6/knx-remaster/KNOPPIX/KNOPPIX'''&lt;br /&gt;
&lt;br /&gt;
FYI: What this means&lt;br /&gt;
&lt;br /&gt;
 ''mkisofs:''           the application to make the iso fs&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-R:''                generate SUSP &amp;amp; RR records&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-U: ''		allow untranslated filenames&amp;lt;br&amp;gt;&lt;br /&gt;
 (this is not iso9660 compliant &amp;amp; generates an error message which is of no consequence)&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-V &amp;quot;KNOPPIX.net filesystem&amp;quot;:	''Volume ID is &amp;quot;Knoppix.net filesystem&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 (change this to whatever name you wish)&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-P &amp;quot;KNOPPIX www.knoppix.net&amp;quot;: ''	Publisher ID is &amp;quot;KNOPPIX www.knoppix.net&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 (change this to whatever name you wish)&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-hide-rr-moved: ''renames the directory RR_MOVED to .rr-moved making it a hidden file&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-cache-inodes: ''this is a default setting&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-no-bak: ''do not include backup files&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-pad: ''pad the whole image by 300 sectors&amp;lt;br&amp;gt;&lt;br /&gt;
 ''/mnt/hda5: ''location of the source directory to be compressed&amp;lt;br&amp;gt;&lt;br /&gt;
 ''nice -5: ''sets an operating system priority of -5 on the compression job&amp;lt;br&amp;gt;&lt;br /&gt;
 ''| /usr/bin/create''compressed''fs: ''pipe output through the create''compressed''fs application&amp;lt;br&amp;gt;&lt;br /&gt;
 ''-b: ''use maximum compression (very slow output)&amp;lt;br&amp;gt;&lt;br /&gt;
 ''- : ''use std input (ie accept input from the pipe)&amp;lt;br&amp;gt;&lt;br /&gt;
 ''65536 : ''block size&amp;lt;br&amp;gt;&lt;br /&gt;
 ''&amp;gt; /mnt/hda6/knx-remaster/KNOPPIX/KNOPPIX: ''direct output to the file KNOPPIX&lt;br /&gt;
&lt;br /&gt;
==== Step 6: Testing the compressed filesystem ====&lt;br /&gt;
&lt;br /&gt;
Simply replace the compressed file system 'KNOPPIX' on our toHD install with the remaster.&lt;br /&gt;
&lt;br /&gt;
 '''cp  /mnt/hda6/knx-remaster/KNOPPIX/KNOPPIX /mnt/hda1/KNOPPIX/KNOPPIX'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the original first if you want to but it is almost as easy to just reinstall from the CD if you need to restore it.&lt;br /&gt;
&lt;br /&gt;
After copying, boot into your toHD install. You should now see the results of your remastering efforts.&lt;br /&gt;
&lt;br /&gt;
I also use this method instead a CD to transfer the remaster to my laptop which is currently running a toHD system due to lack of HD space. Since I can transfer directly from the desktop to the laptop using the 'fish' protocol, I am not limited to the 700 Mb size limit imposed by the CD for my remaster.&lt;br /&gt;
&lt;br /&gt;
==== Step 7: Make the final iso ready for burning to CD ====&lt;br /&gt;
&lt;br /&gt;
Update the md5 sums&lt;br /&gt;
&lt;br /&gt;
 '''cd /mnt/hda6/knx-remaster/'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''rm -f KNOPPIX/md5sums'''&amp;lt;br&amp;gt;&lt;br /&gt;
 '''find -type f -not -name md5sums -not -name boot.cat -exec md5sum {} \; &amp;gt;&amp;gt;   KNOPPIX/md5sums'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make the iso file to put on CD&lt;br /&gt;
&lt;br /&gt;
'''For knoppix 3.3:&lt;br /&gt;
&lt;br /&gt;
 '''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/hda6/knx-remaster/knoppix.iso /mnt/hda6/knx-remaster/'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''For knoppix 3.4:&lt;br /&gt;
&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/hda6/knx-remaster/knoppix.iso /mnt/hda6/knx-remaster/'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 8: Burn your iso CD: ====&lt;br /&gt;
&lt;br /&gt;
I just use k3b to do this.&lt;br /&gt;
&lt;br /&gt;
Or you can use Qemu ( see [http://fabrice.bellard.free.fr/qemu/] ) with the ISO image like this: qemu -m 128 -cdrom /temp/knoppix-custom.iso -boot d -user-net&lt;br /&gt;
&lt;br /&gt;
==== Other: ====&lt;br /&gt;
&lt;br /&gt;
There are other tweaks which can be done to improve performance such as sorting the files prior to burning the CD to optomize CD access time but the above covers the basics. There are also many other howtos &amp;amp; references available, in particular check out&lt;br /&gt;
&lt;br /&gt;
:[[Knoppix Remastering Howto]]&lt;br /&gt;
:[[Remastering Hacks]]&lt;br /&gt;
&lt;br /&gt;
Klaus Knopper's original scripts on which the remaster.clean script is based are posted [http://www.knoppix.net/forum/viewtopic.php?t=3314) here]&lt;br /&gt;
&lt;br /&gt;
but there are also newer versions posted [http://debian.tu-bs.de/knoppix/remaster/ here]&lt;br /&gt;
&lt;br /&gt;
which also includes scripting for remastering using the chroot method.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Cleanup Script: ====&lt;br /&gt;
&lt;br /&gt;
 ''#!/bin/bash''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''#This is the minimum cleanup script''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''#does not edit out all config files, remove /home/knoppix or restore system  to default state''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''#Original: Knoppix.checklibs (C) 2003 Klaus Knopper''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''#modified by !&amp;lt;nowiki&amp;gt;[[Crashed Again]]&amp;lt;/nowiki&amp;gt; for personal use''&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 umask 022&lt;br /&gt;
 &lt;br /&gt;
 /etc/init.d/autofs stop&amp;lt;br&amp;gt;&lt;br /&gt;
 /etc/init.d/apmd stop&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[-x /etc/init.d/knoppix-terminalserver ]]&amp;lt;/nowiki&amp;gt; &amp;amp;&amp;amp; /etc/init.d/knoppix-terminalserver deconfigure&lt;br /&gt;
 &lt;br /&gt;
 ''#remove only &amp;quot;temporary&amp;quot; or saved files in the given directories''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''#(rm -f is force, ignore non-existant files, never prompt)''&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nuke(){&amp;lt;br&amp;gt;&lt;br /&gt;
 for i in `find &amp;quot;$@&amp;quot; -name \*.gz -o -name \*.bz2 -o -name \*.0 -o -name \&lt;br /&gt;
 \*.0.log -o -name browse.dat -o -name \*.\*pk 2&amp;gt;/dev/null`; do&amp;lt;br&amp;gt;&lt;br /&gt;
 rm -f &amp;quot;$i&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 done&amp;lt;br&amp;gt;&lt;br /&gt;
 }&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''#set all files in the list to a length of zero''&lt;br /&gt;
 &lt;br /&gt;
 zero(){&amp;lt;br&amp;gt;&lt;br /&gt;
 for i in `find &amp;quot;$@&amp;quot; -type f -size +0 -not -name \*.ini 2&amp;gt;/dev/null`;  do :&amp;gt; &amp;quot;$i&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 done&amp;lt;br&amp;gt;&lt;br /&gt;
 }&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''#remove mount points''&amp;lt;br&amp;gt;&lt;br /&gt;
 rmdir /mnt/cdrom?* /mnt/hd?* /mnt/sd?* 2&amp;gt;/dev/null&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''# these config files must be removed for the Knoppix to setup for new hardware''&amp;lt;br&amp;gt;&lt;br /&gt;
 rm -f /etc/X11/XF86Config /etc/X11/XF86Config-4 /etc/XF86Config /etc/XF86Config-4&lt;br /&gt;
 &lt;br /&gt;
 ''# optional: remove these config files also''&amp;lt;br&amp;gt;&lt;br /&gt;
 rm -rf /tmp/* /var/tmp/* /var/backups/* \&amp;lt;br&amp;gt;&lt;br /&gt;
 /home/*/.ssh /home/*/.bash_history \&amp;lt;br&amp;gt;&lt;br /&gt;
 /var/run/screen/* \&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 nuke /var/log /var/cache&amp;lt;br&amp;gt;&lt;br /&gt;
 zero /var/local /var/log /var/spool /var/mail \&amp;lt;br&amp;gt;&lt;br /&gt;
 /var/lib/games /var/cache/man /var/lib/wine \&amp;lt;br&amp;gt;&lt;br /&gt;
 /var/lib/nfs /var/lib/xkb&lt;br /&gt;
 &lt;br /&gt;
 ''#remove expanded manpage files if a compressed version exists''&amp;lt;br&amp;gt;&lt;br /&gt;
 for i in `find /usr/*/man -name \*.\&amp;lt;nowiki&amp;gt;[[0-9ln\]]&amp;lt;/nowiki&amp;gt;` ; do&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[[ -f &amp;quot;$i&amp;quot;.gz -o -f &amp;quot;$i&amp;quot;.bz2 ]]&amp;lt;/nowiki&amp;gt; &amp;amp;&amp;amp; rm -f &amp;quot;$i&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 done&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''# delete old dowloaded packages''&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;Deleting old downloaded packages.....&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 apt-get clean&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;   Done&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''#remove 'orphaned files' not listed as used by any package''&amp;lt;br&amp;gt;&lt;br /&gt;
 ''#note: may be problems if you have added applications from source instead of .deb pkgs''&amp;lt;br&amp;gt;&lt;br /&gt;
 echo -n &amp;quot;Cleaning up orphans...&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 deborphan | xargs apt-get -y remove&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;   Done&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Cleaning up config files...&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 COLUMNS=200 dpkg -l |grep ^rc |awk '{print $2} ' | xargs dpkg -P&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;    Done&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''# Strip X11 Libs strip-unneeded removes all symbols not needed for relocation processing''&amp;lt;br&amp;gt;&lt;br /&gt;
 strip --strip-unneeded `find /usr/X11R6/lib/modules -name \*.so -o -name \*.o`&lt;br /&gt;
 &lt;br /&gt;
 ''# Recreate empty utmp and wtmp''&amp;lt;br&amp;gt;&lt;br /&gt;
 :&amp;gt;/var/run/utmp&amp;lt;br&amp;gt;&lt;br /&gt;
 :&amp;gt;/var/run/wtmp&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ''# regenerate module dependencies and ls.so.cache''&amp;lt;br&amp;gt;&lt;br /&gt;
 echo -n &amp;quot;Updating ld.so.cache...&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 ldconfig&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;          Done.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Updating modules.dep...&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 depmod -a 2&amp;gt;/dev/null&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;          Done.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Updating mandb...&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 mandb -c&amp;lt;br&amp;gt;&lt;br /&gt;
 man doesnotexist &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;     Done.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Updating locate-database...&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 ''# slocate is a security enhanced 'locate' file for finding files on the system''&amp;lt;br&amp;gt;&lt;br /&gt;
 '' # dlocate is a prgm to view pkg information''&amp;lt;br&amp;gt;&lt;br /&gt;
 updatedb --prunepaths=&amp;quot;/mnt/hd /mnt/cdrom /tmp /usr/tmp /var/tmp&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 update-dlocatedb&amp;lt;br&amp;gt;&lt;br /&gt;
 echo &amp;quot;		Done.&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Fixing permissions in /dev/...&amp;quot;&lt;br /&gt;
 chown root.root /dev/ttyp*&lt;br /&gt;
 chmod 666 /dev/ttyp* /dev/sg* /dev/audio* /dev/dsp* /dev/mixer* /dev/sequencer*&lt;br /&gt;
 echo &amp;quot;		 Done&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Fixing permissions in /etc/ppp/...&amp;quot;&lt;br /&gt;
 chown root.dip /etc/ppp/*secrets /etc/ppp/ppp_* /etc/ppp/peers/*provider /etc/ppp/peers /etc/ppp \&lt;br /&gt;
 /etc/chatscripts /etc/chatscripts/*&lt;br /&gt;
 chmod g+rwXš š /etc/ppp/*secrets /etc/ppp/ppp_* /etc/ppp/peers/*provider /etc/ppp/peers /etc/ppp \&lt;br /&gt;
 /etc/chatscripts /etc/chatscripts/*&lt;br /&gt;
 echo &amp;quot;		 Done&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;Removing unused architecture Kernel sources: &amp;quot;&lt;br /&gt;
 for i in `ls -1 /usr/src/linux/arch/ | grep -v i386`; do&lt;br /&gt;
 echo -n &amp;quot;$i &amp;quot;; rm -rf /usr/src/linux/arch/&amp;quot;$i&amp;quot; /usr/src/linux/include/asm-&amp;quot;$i&amp;quot;&lt;br /&gt;
 done&lt;br /&gt;
 echo &amp;quot; 		Done.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T05:07:40Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Installing software and clearing up space with Apt =&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
== Updating packages ==&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
= Boot =&lt;br /&gt;
&lt;br /&gt;
== Boot graphics ==&lt;br /&gt;
&lt;br /&gt;
When using the script method [[Knoppix Remastering with Menu Based Scripts]], will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
== Desktop ==&lt;br /&gt;
&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
=== Making a permanent desktop background change ===&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
=== Changing the desktop splash screen ===&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
== Adding Icons ==&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
= Startup =&lt;br /&gt;
== Adding init scripts that should run ==&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T05:02:20Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are so many howtos cropping up, each with individual tips and customization examples for Knoppix remasters, that it seems good to have a place to put generic tips, no matter how you go about remastering, be it using scripts, completely by hand, or via a HD install, Morphix, etc...  Please add your tips and example &amp;quot;hacks&amp;quot; here.  &lt;br /&gt;
&lt;br /&gt;
= Installing software and clearing up space with Apt =&lt;br /&gt;
== Removing a bunch of Internationalization support to save space`using Apt and grep ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
== Other packages commonly removed for custom images ==&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
== What to do when behind a proxy ==&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Useful packages for install packages and cleaning up locales ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
== Updating packages ==&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== Boot ===&lt;br /&gt;
&lt;br /&gt;
==== Boot images ====&lt;br /&gt;
&lt;br /&gt;
When using this method, will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
==== To keep certain desktop settings persistent ====&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Remastering_Hacks</id>
		<title>Remastering Hacks</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Remastering_Hacks"/>
				<updated>2005-11-11T04:53:21Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== Boot ===&lt;br /&gt;
&lt;br /&gt;
==== Boot images ====&lt;br /&gt;
&lt;br /&gt;
When using this method, will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
==== To keep certain desktop settings persistent ====&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T04:51:56Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Remastering Customization Tips and Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Customization Tips and Examples]] =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-11T04:50:07Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Examples of ways to customize from the chroot environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= [[Remastering Customization Tips and Examples]] =&lt;br /&gt;
&lt;br /&gt;
I have moved this section to the article linked above, as I think it is more generic than this document. [[User:Leah|Leah]] 04:50, 11 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== Boot ===&lt;br /&gt;
&lt;br /&gt;
==== Boot images ====&lt;br /&gt;
&lt;br /&gt;
When using this method, will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
==== To keep certain desktop settings persistent ====&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:53:02Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Other customizations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== Boot ===&lt;br /&gt;
&lt;br /&gt;
==== Boot images ====&lt;br /&gt;
&lt;br /&gt;
When using this method, will be located somewhere like &amp;lt;path-to-remaster dir&amp;gt;KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/images/&lt;br /&gt;
&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
==== To keep certain desktop settings persistent ====&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:51:37Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* To keep certain desktop settings persistent */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== Desktop ===&lt;br /&gt;
&lt;br /&gt;
==== To keep certain desktop settings persistent ====&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:32:23Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Installing software and clearing up space with Apt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
=== Package updates within the GUI ===&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:29:25Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Getting ready to customize from the graphical environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 apt-get install synaptic&lt;br /&gt;
&lt;br /&gt;
Synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:27:48Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Examples of ways to customize from the chroot environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
== Installing software and clearing up space with Apt ==&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Getting ready to customize from the graphical environment ==&lt;br /&gt;
&lt;br /&gt;
Add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude synaptic&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg, while synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:17:43Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Changing the desktop splash screen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that is finished, add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude synaptic&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg, while synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
Replace /usr/share/apps/ksplash/Themes/Default/splash_top.png &lt;br /&gt;
&lt;br /&gt;
(400X248 px is the normal size of this image)&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:07:29Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Examples of ways to customize from the chroot environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that is finished, add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude synaptic&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg, while synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
/usr/share/apps/ksplash/Themes/Default/splash_top.png&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	<entry>
		<id>https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts</id>
		<title>Knoppix Remastering with Menu Based Scripts</title>
		<link rel="alternate" type="text/html" href="https://knoppix.net/wiki/Knoppix_Remastering_with_Menu_Based_Scripts"/>
				<updated>2005-11-10T22:04:45Z</updated>
		
		<summary type="html">&lt;p&gt;Leah: /* Making a permanent desktop background change */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
This is based on the document originally written by James Pryor at the http://knoppix.net forum pages and at http://www.virtualacuity.com/james/knoppix-howto.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
This HOWTO can also be found on the Knoppix.net forums.&lt;br /&gt;
HOWTO: Remaster KNOPPIX the easy way using menu based remaster scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
Use this at your own risk. I am not responsible for anything that might go wrong. I am human and I may have made a mistake in this HOWTO. Please private message me if you notice any typos or errors. Corrections &amp;amp; suggestions are welcome.&lt;br /&gt;
&lt;br /&gt;
== Why Remaster ==&lt;br /&gt;
Knoppix is the best Linux live CD available. However, you might have the desire to have your own custom Knoppix. The remastering process is a way creating a new Knoppix CD based off your customizations. Some obvious reasons for making a custom Knoppix CD: - Knoppix does not have the programs that you require. - Knoppix is too big to fit on a USB flash drive. - Knoppix does not support your language. - You wish to change the default KDE themes &amp;amp; settings. See the Knoppix Wish List for more ideas.&lt;br /&gt;
&lt;br /&gt;
== Why James wrote parts of this HOWTO ==&lt;br /&gt;
This HOWTO is compiled from my numerous attempts of remastering, the knoppix.net documentation, and the brilliant posters in the forums. At knoppix.net, the documentation is well done and thorough and the remastering/customization documentation references a detailed and involved method of remastering. I have used this method of remastering and it works. In August, two Knoppix developers, Klaus Knopper &amp;amp; Fabian Franz, created a new set of scripts that &amp;quot;wrap around&amp;quot; the older method with a menu system. This menu simplifies the remastering process and hides the long and sometimes confusing commands from the user. This is my attempt to bring to light this new method that uses these scripts.&lt;br /&gt;
&lt;br /&gt;
From http://www.ukuug.org/events/linux2004/knoppix.shtml:&lt;br /&gt;
&lt;br /&gt;
:: Remastering KNOPPIX has always been a lot of hassle -- requiring numerous intricate steps on the command line making it easy to forget an important step. While there are several HOWTOs on the net that explain the steps, Ian Naylor thought it would be a good idea to write some scripts to automate the process. He described this during this year's UKUUG Linux conference in Leeds, England. Ian presented a talk on &amp;quot;Building your own Live CD based on KNOPPIX&amp;quot;. Fabian Franz, a member of the KNOPPIX team who attended the talk, said afterwards: Ian's scripts just opened my eyes -- it was a very clear structure and for the first time in my life I understood the remastering process from a user's point of view.&lt;br /&gt;
&lt;br /&gt;
:: Ian and Fabian started talking after the presentation and were inspired to develop a new graphical remastering tool to build acustomised KNOPPIX distribution. One day later Fabian was demonstrating the new script to a stunned audience. Unlike previous efforts to solve the same problem this is based on Klaus Knopper's originalscripts and written in a way so that future improvements in themaster scripts will be reflected in these.&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
Thanks to Klaus Knopper, Ian Naylor, Fabian Franz, Debian developers, KDE developers, the knoppix.net forum moderators, the plethora of knowledgeable forum posters and certainly knoppix.net site admin eadz for creating knoppix.net&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
This HOWTO assumes that the user has basic knowledge of the command line programs such as ls, mv, cp, df -h, mkdir, etc. You will probably need to use a command line text editor such as vim, emacs, joe, zile. If you remaster in KDE then you can use any of the graphical editors. You will also need a basic understanding of the Debian apt-get method of package management. At any point during the remastering process, you can make a backup of your progress. This allows you to fully experiment with your remaster and you can add or delete as you see fit without having to start all over. You can read about making a backup in a section I labeled as &amp;quot;THIS IS COMPLETELY OPTIONAL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
The total remastering time is dependant on the time it takes to make all the changes, the HD drive speed and CPU speed. I estimate about 2.5 hours for a mid-range system that follows the package changes listed below. &lt;br /&gt;
&lt;br /&gt;
The first half of the HOWTO can either be done from the command line runlevel 2 or inside X at runlevel 5. The only time you are forced to drop to a console session is running X from the chroot. If you choose to remaster from within KDE (runlevel 5), then when you must follow the steps listed at the section labeled &amp;quot;= END OF FIRST HALF =&amp;quot;. The HOWTO as a whole can be done from command line runlevel 2 without having to jump into KDE &amp;amp; runlevel 5. I use runlevel 5 because I like synaptic over aptitiude/apt-get and I hate the default Knoppix transparent menus and the Keramik widget style. &lt;br /&gt;
&lt;br /&gt;
I learned how to remaster just to install the kdeartwork package just so I can get the plastik widgets (which will be default style for KDE 3.4 thank god). If you don't need to custom configure the knoppix user's KDE desktop, and if you are comfortable with the command line and aptitude/apt-get, then you can stay in runlevel 2 and complete the remastering process.&lt;br /&gt;
&lt;br /&gt;
This HOWTO has been tested with versions:&lt;br /&gt;
&lt;br /&gt;
* Knoppix 3.6&lt;br /&gt;
* Knoopix 3.7 Pro (German PC Welt)&lt;br /&gt;
* Knoppix 3.7 public 2004-12-08&lt;br /&gt;
* Knoppix 3.8.1 2005-04-08&lt;br /&gt;
* Knoppix 3.8.2 [[User:Leah|Leah]] 19:43, 10 Nov 2005 (GMT)&lt;br /&gt;
&lt;br /&gt;
You will need a PC that can boot Knoppix 3.6 or 3.7 to a graphical KDE desktop. You should be able to remaster on that PC as long as you have at least 1 GB combined swap &amp;amp; RAM and 3GB of hard drive space. The 3GB figure is calculated using a remaster filesystem of about 2.1GB which compresses down to about 685MB CD ISO. &lt;br /&gt;
&lt;br /&gt;
;NOTE: &lt;br /&gt;
&lt;br /&gt;
You do not need to format your C: drive or lose data. This system is my test &amp;amp; experiment system. I format/partition/reinstall Linux &amp;amp; windows on that system regularly. This means I completely lose whatever was on the hard drives.&lt;br /&gt;
&lt;br /&gt;
= Starting a development system =&lt;br /&gt;
== Knoppix 3.6 ==&lt;br /&gt;
I boot to the console command line (called runlevel 2) with Knoppix 3.6 english using cheatcodes.&lt;br /&gt;
knoppix 2 vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix 3.7 ==&lt;br /&gt;
Get to the console command line (called runlevel 2) with Knoppix 3.7 using cheatcodes.&lt;br /&gt;
knoppix 2 lang=us vga=normal&lt;br /&gt;
&lt;br /&gt;
== Knoppix Later versions ==&lt;br /&gt;
In most cases no special boot parameters are needed.  The remastering process can be started from within KDE, and in fact, for configuring X later, it is useful to start from KDE.&lt;br /&gt;
&lt;br /&gt;
== Example build system partition setup ==&lt;br /&gt;
&lt;br /&gt;
In this document all examples are based on a setup using:&lt;br /&gt;
&lt;br /&gt;
* /dev/hda1 swap partition of 1GB in size&lt;br /&gt;
* /dev/hda2 partition of at least 6GB&lt;br /&gt;
* /dev/hdb1 partition of lots of size (optional, this is used in this example as a backup location for remastering filesystems)&lt;br /&gt;
&lt;br /&gt;
You can use a commands like&lt;br /&gt;
&lt;br /&gt;
 cfdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or &lt;br /&gt;
&lt;br /&gt;
 fdisk /dev/hd&amp;lt;a/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To run partitioning tools at this point to create these partitions, and then a reboot would be recommended.&lt;br /&gt;
&lt;br /&gt;
 init 6&lt;br /&gt;
&lt;br /&gt;
Again I boot with the appropriate cheatcodes/parameters. At the command prompt I format the filesystems.&lt;br /&gt;
&lt;br /&gt;
 mkswap /dev/hda1&lt;br /&gt;
 swapon /dev/hda1&lt;br /&gt;
 mke2fs -vj /dev/hda2&lt;br /&gt;
 mke2fs -vj /dev/hdb1&lt;br /&gt;
&lt;br /&gt;
Next I mount the hda2 partition which will be the place where I extract out the remaster&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hda2 /mnt/hda2&lt;br /&gt;
 mkdir /mnt/hda2/remaster&lt;br /&gt;
 cd /mnt/hda2&lt;br /&gt;
&lt;br /&gt;
= Creating the chroot environment =&lt;br /&gt;
== Install the remastering scripts ==&lt;br /&gt;
&lt;br /&gt;
Now get the remastering scripts located at http://debian.tu-bs.de/knoppix/remaster/, extract the scripts, and setup my directories:&lt;br /&gt;
&lt;br /&gt;
 wget http://debian.tu-bs.de/knoppix/remaster/remaster_0.1-6.tar.gz&lt;br /&gt;
 tar zxvf remaster_0.1-6.tar.gz&lt;br /&gt;
 mv remaster-0.1 scripts&lt;br /&gt;
 cd scripts&lt;br /&gt;
&lt;br /&gt;
Edit the config file so that my remastered CD is personalized. The config file is in the scripts folder at KNOPPIX.build/remaster_config. &lt;br /&gt;
&lt;br /&gt;
;Recommended:&lt;br /&gt;
&lt;br /&gt;
* Leave the _FILESYSTEM variables alone. &lt;br /&gt;
* Leave the REMASTER_COMPRESSION_BEST variable alone even though the best compression might be better since it would take about 4 to 6 times longer to make the compressed filesystem.&lt;br /&gt;
&lt;br /&gt;
== Proxy settings for remastering scripts ==&lt;br /&gt;
The cleanup remaster script uses apt-get and must access the Internet or the cleanup will fail. If you are behind a proxy and must authenticate against it to access the internet, then first gather the required proxy info and write it down in the following form:&lt;br /&gt;
&lt;br /&gt;
 http://username:passwd@yourproxy.company.com:portnumber/&lt;br /&gt;
&lt;br /&gt;
You need to edit the knoppix-remaster script and add the proxy settings. At line 136, add new line for the proxy&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
Becomes&lt;br /&gt;
&lt;br /&gt;
 136: cp -f /etc/dhcpc/resolv.conf &amp;quot;$REMASTER_CHOICE&amp;quot;/etc/dhcpc/&lt;br /&gt;
 137: export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
 138: CREATE_COMPRESSED_FS=&amp;quot;yes&amp;quot; CLEANUP=&amp;quot;$REMASTER_CLEANUP&amp;quot; COMPRESSION_BEST=&amp;quot;${REMASTER_COMPRESSION_BEST:+--best}&amp;quot; chroot $REMASTER_CHOICE&amp;quot; /KNOPPIX.build/Knoppix-3.4.mkcompressed &amp;quot;$REMASTER_MASTER&amp;quot; auto&lt;br /&gt;
&lt;br /&gt;
== Use the remaster scripts to create the chroot environment ==&lt;br /&gt;
&lt;br /&gt;
Run the remastering script with a command like (full path names seem to work best):&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
Then follow the menus and create a new remaster and hit &amp;lt;ENTER&amp;gt; for the default path. It will extract the contents of the CD. &lt;br /&gt;
&lt;br /&gt;
When it is done it will ask if I want to chroot into the extracted enviornment. Choose the chroot option &amp;amp; it will drop you into a command line environment that is inside the extracted Knoppix filesystem. &lt;br /&gt;
&lt;br /&gt;
To exit the chroot and get back to the menu, type exit or use the keyboard keys &amp;lt;CTRL-D&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== More information on the chroot environment ==&lt;br /&gt;
If you do not want to know more about the chroot, then skip this section. Chroot changes the perceived root ( / ) of the filesystem. Please examine the following command.&lt;br /&gt;
&lt;br /&gt;
 ls /etc/*.conf&lt;br /&gt;
&lt;br /&gt;
That command when run outside a chroot will give us a listing of all .conf files in /etc which are physically on the Knoppix CD. However, that command run inside the chroot will give us a listing of all the .conf files in /etc which is really /mnt/hda2/etc. This means that in our case /mnt/hda2/remaster is mapped to /. Also, all commands run in a chroot only affect the chroot filesystem. See the following links for more info:&lt;br /&gt;
&lt;br /&gt;
:http://www.ketec.ie/WebHelp/oh_site_about_chroot.htm&lt;br /&gt;
:http://www.ss64.com/bash/chroot.html&lt;br /&gt;
:http://en.wikipedia.org/wiki/Chroot&lt;br /&gt;
&lt;br /&gt;
= Examples of ways to customize from the chroot environment =&lt;br /&gt;
&lt;br /&gt;
(make sure to look at the [[Knoppix_Remastering_Howto]] for ideas and tips as well&lt;br /&gt;
&lt;br /&gt;
The  following command returns a listing of all packages installed.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | less&lt;br /&gt;
&lt;br /&gt;
While that command is useful, you can use grep to sort out which packages you to remove. The following command shows me packages that kde uses for internationalization support and strips off all the other extraneous information.&lt;br /&gt;
&lt;br /&gt;
 dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3&lt;br /&gt;
&lt;br /&gt;
I can feed this to apt-get so that it will remove those packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get remove `dpkg-query -l | grep i18n | grep kde | cut -d' ' -f3`&lt;br /&gt;
&lt;br /&gt;
You could remove openoffice and other German tools as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove openoffice-de-en manpages-de trans-de-en&lt;br /&gt;
&lt;br /&gt;
Remove enigma and bacula as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove enigma bacula-common&lt;br /&gt;
&lt;br /&gt;
Remove emacs as follows:&lt;br /&gt;
&lt;br /&gt;
 apt-get remove emacs21 emacs21-bin-common emacs21-common emacsen-common gettext-el zile&lt;br /&gt;
&lt;br /&gt;
This results in a reasonable base to begin updating and adding packages to this system. First configure /etc/apt/sources.list and add the appropriate entries for a local Debian mirror.&lt;br /&gt;
&lt;br /&gt;
If you are behind a proxy and must authenticate against it to access the internet, then use the following command.&lt;br /&gt;
export http_proxy=&amp;quot;http://username:passwd@yourproxy.company.com:portnumber/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that is finished, add three useful packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install localepurge aptitude synaptic&lt;br /&gt;
&lt;br /&gt;
Localepurge will only keep the locales that are marked. This means that it will free up additional space. After running through the configuration removing locales you don't need, you must run it from the command line:&lt;br /&gt;
&lt;br /&gt;
 localepurge&lt;br /&gt;
&lt;br /&gt;
Aptitude is a console menu front end to apt and dpkg, while synaptic is a graphical front end to apt &amp;amp; dpkg.&lt;br /&gt;
&lt;br /&gt;
Finally, update the system's package listing with the command:&lt;br /&gt;
&lt;br /&gt;
 apt-get -y update&lt;br /&gt;
&lt;br /&gt;
== Starting graphical environment from the chroot system ==&lt;br /&gt;
&lt;br /&gt;
;NOTE:&lt;br /&gt;
There are ways to use GUI apps that don't require direct console access to the system, this is just nice to know how to do when using a dedicated development system.  Check out the main Knoppix Remastering documentation, for more information on this.&lt;br /&gt;
&lt;br /&gt;
So far, all of the tasks I have done have been on the command line and requires quite a bit of knowledge and some people view the command line as tedious work. Fortunately you can also use synaptic to add/remove packages. Before entering a graphical enviornment, you need to make sure it is configured. &lt;br /&gt;
&lt;br /&gt;
Copy /etc/skel to /home/knoppix&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /etc/skel /home/knoppix&lt;br /&gt;
&lt;br /&gt;
Change the user of /home/knoppix &amp;amp; its files to user knoppix&lt;br /&gt;
&lt;br /&gt;
 chown -R knoppix:knoppix /home/knoppix&lt;br /&gt;
&lt;br /&gt;
'''This next command must be done outside the chroot'''. From virtual terminal 2 &amp;lt;ALT-F2&amp;gt; or another konsole session, copy the XF86Config-4 file from /etc/X11 to /mnt/hda2/etc/X11 (This file won't exist if you booted to runlevel two, so either grab it from a graphically booted Knoppix, or hopefully you have one that works for the system you are working from:&lt;br /&gt;
&lt;br /&gt;
 cp /etc/X11/XF86Config-4 /mnt/hda2/remaster/etc/X11&lt;br /&gt;
&lt;br /&gt;
==== If currently in KDE environment ====&lt;br /&gt;
&lt;br /&gt;
If you performed the first half of this HOWTO from within KDE, then you must follow these steps. If you performed the first half of the HOWTO from console command line session, then DO NOT DO THESE STEPS!  &lt;br /&gt;
&lt;br /&gt;
Exit the chroot by typing exit or &amp;lt;CTRL-D&amp;gt;. Exit the menu by choosing option 6 &amp;quot;Quit the program.&amp;quot; Use the following command to go to runlevel 2.&lt;br /&gt;
&lt;br /&gt;
 init 2&lt;br /&gt;
&lt;br /&gt;
It will close KDE and leave you at a command prompt.  (It may appear hung, but press Enter and you should see the command prompt.&lt;br /&gt;
&lt;br /&gt;
 cd /mnt/hda2/scripts&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
#Choose &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default. &lt;br /&gt;
#Choose the chroot option to enter the chroot. This section is complete.&lt;br /&gt;
&lt;br /&gt;
=== Finally start graphical environment ===&lt;br /&gt;
&lt;br /&gt;
NOTE for noppix 3.8.1 and higher:&lt;br /&gt;
You may need to change the permissions of /tmp to full read/write and execute. If you do not, then KDE might not run.&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /tmp&lt;br /&gt;
&lt;br /&gt;
END NOTE&lt;br /&gt;
&lt;br /&gt;
Become the user knoppix and startx&lt;br /&gt;
&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
(If you get a /dev/null permissions problem do&lt;br /&gt;
&lt;br /&gt;
 chmod 666 /dev/null&lt;br /&gt;
 exit&lt;br /&gt;
 su - knoppix&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Start X which will start KDE and bring us to a graphical desktop&lt;br /&gt;
&lt;br /&gt;
 startx&lt;br /&gt;
&lt;br /&gt;
Now that it is in the GUI, you can change the fonts, disable the menu translucency and the konsole translucency. &lt;br /&gt;
&lt;br /&gt;
You can use synaptic to add packages like mozilla firefox, openoffice.org, vncviewer, kdeartwork which contains the Plastik widget style, and you can even update the window manager. If you do update all or parts of KDE, it is suggested that I exit KDE (close session), drop back to the command prompt and rerun startx to make sure it is applied. &lt;br /&gt;
&lt;br /&gt;
When you are happy with all the changes that you have made, then it is time to exit . &lt;br /&gt;
&lt;br /&gt;
#Exit (close session) and I am dropped back at the prompt. &lt;br /&gt;
#Type exit to exit my session as the user knoppix and you are now root.&lt;br /&gt;
&lt;br /&gt;
== Other customizations ==&lt;br /&gt;
=== To keep certain desktop settings persistent ===&lt;br /&gt;
&lt;br /&gt;
I must now mention the file /etc/X11/Xsession.d/45xsession. This script controls how knoppix behaves &amp;amp; how knoppix creates the knoppix user's home directory. &lt;br /&gt;
&lt;br /&gt;
Edit the file /etc/X11/Xsession.d/45xsession and look for the ninth occurence of rsync in the script and it is found at or around line 128:&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is line 128 which populates the /home/knoppix folder. So In line 128, I delete from &amp;amp; including the { to the }. It is changed as follows.&lt;br /&gt;
&lt;br /&gt;
 126: if [ -z &amp;quot;$DONTCHANGE&amp;quot; ]; then&lt;br /&gt;
 127: # No persistent homedir, copy everything&lt;br /&gt;
 128: rsync -Ha --ignore-existing /etc/skel/ $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
 129: [ &amp;quot;$USER&amp;quot; = &amp;quot;knoppix&amp;quot; ] &amp;amp;&amp;amp; rsync -Ha --ignore-existing /usr/share/knoppix/profile/{.kde*,Desktop} $HOME/ 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
Make the change and save the 45xsession file.&lt;br /&gt;
&lt;br /&gt;
==== Making a permanent desktop background change ====&lt;br /&gt;
&lt;br /&gt;
Replace the &amp;lt;path to chroot env&amp;gt;/KNOPPIX.build/Knoppix.Master/KNOPPIX-CUSTOM/KNOPPIX/background.png from outside the chroot env to be the one you would like for the default desktop background.&lt;br /&gt;
&lt;br /&gt;
==== Changing the desktop splash screen ====&lt;br /&gt;
&lt;br /&gt;
/usr/share/apps/ksplash/Themes/Default/splash_top.png&lt;br /&gt;
&lt;br /&gt;
==== Adding Icons ====&lt;br /&gt;
&lt;br /&gt;
Plonk them into /etc/skel/Desktop or if you are working under a knoppix home directory, plonk them there.  Under any KDE or GNOME system you can find examples of the format for these files.&lt;br /&gt;
&lt;br /&gt;
=== Adding init scripts that should run ===&lt;br /&gt;
&lt;br /&gt;
Say you need to make sure certain services are started up at boot time.  You would think you could put them in the proper /etc/rc&amp;lt;num&amp;gt;.d/ directory and they would just work eh.  Ha.  Ha.  To get something to always start, you have to actually modify the /etc/init.d/knoppix-autoconfig script and have it start the services.  The init scripts will always be in the /etc/init.d/ directory, but they won't stay in the /etc/rc&amp;lt;num&amp;gt;.d directories, even if you put them there.  It will make you sad.&lt;br /&gt;
&lt;br /&gt;
For example, to add a custom vpn script and turn on some of the NFS client utils, one could add some lines after the automounty stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Start automounter now&lt;br /&gt;
/etc/init.d/autofs start &amp;gt;/dev/null &amp;amp;&amp;amp; echo &amp;quot;${GREEN}Automounter started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
if [ -f /etc/init.d/portmap ] ; then&lt;br /&gt;
        /etc/init.d/portmap start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}Portmapper started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
if [ -f /etc/init.d/nfs-common ] ; then&lt;br /&gt;
        /etc/init.d/nfs-common start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}NFS Common Services started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
# Start VPN&lt;br /&gt;
if [ -f /etc/init.d/vtundvpn ] ; then&lt;br /&gt;
        /etc/init.d/vtundvpn start &amp;gt;/dev/null &amp;amp;&amp;amp; \&lt;br /&gt;
        echo &amp;quot;${GREEN}VPN started for: ${MAGENTA}${AUTOMOUNTS}${GREEN}.${NORMAL}&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
#&lt;br /&gt;
# END CUSTOM SCRIPTY STUFF&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Backing up chroot environment =&lt;br /&gt;
&lt;br /&gt;
This assumes that you have at least 3GB of additional free hard disk space. At this point you may want to make a safe backup copy of all the changes that you have made. If you do not want to make a backup copy then skip this part. &lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt;. &lt;br /&gt;
#Now back at the menu, choose option 6, and quit the program. &lt;br /&gt;
#Next you may need to mount the drive that you have space on for backups, in our example: hdb1&lt;br /&gt;
&lt;br /&gt;
 mount -t ext3 /dev/hdb1 /mnt/hdb1&lt;br /&gt;
&lt;br /&gt;
Now copy the whole remaster to hdb1 (or some other place) for safe keeping:&lt;br /&gt;
&lt;br /&gt;
 cp -Rp /mnt/hda2/remaster /mnt/hdb1/backup-remaster&lt;br /&gt;
&lt;br /&gt;
#When that is complete I rerun the knoppix-remaster command and tell it &amp;quot;No&amp;quot;, I do not want to create a new remaster. &lt;br /&gt;
#Hit &amp;lt;ENTER&amp;gt; to choose the path /mnt/hda2/remaster as default.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 1 and chroot into the remaster.&lt;br /&gt;
&lt;br /&gt;
= Final manual cleanup steps =&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
The rest of the steps are written with the assumption that it is being done from runlevel 2. However they can be done within KDE by typing init 5, running the knoppix-remaster script, and then chroot into the remaster. &lt;br /&gt;
&lt;br /&gt;
Now you need to make the changes to the system so that the knoppix CD will boot without errors. As a reminder, these commands need to be done inside the chroot, virtual terminal 1 &amp;lt;ALT-F1&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Delete the existing /etc/skel.&lt;br /&gt;
&lt;br /&gt;
 rm -rf /etc/skel&lt;br /&gt;
&lt;br /&gt;
Move /home/knoppix to /etc.&lt;br /&gt;
&lt;br /&gt;
 mv /home/knoppix /etc/skel&lt;br /&gt;
&lt;br /&gt;
Change the owner back to root.&lt;br /&gt;
&lt;br /&gt;
 chown -R root:root /etc/skel&lt;br /&gt;
&lt;br /&gt;
Remove the XF86Config-4 file as it will get recreated on every bootup.&lt;br /&gt;
&lt;br /&gt;
 rm /etc/X11/XF86Config-4&lt;br /&gt;
&lt;br /&gt;
If you had to change the permissions for /tmp then change them back:&lt;br /&gt;
&lt;br /&gt;
 chmod 555 /tmp&lt;br /&gt;
&lt;br /&gt;
Enter the following command to clean up the downloaded .deb packages.&lt;br /&gt;
&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
I want to remove any traces of recently used programs in KDE so I edit /etc/skel/.kde/share/config/kickerrc and I find the field that reads something like&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=9 1096000374 /usr/share/applications/mozilla.desktop&lt;br /&gt;
&lt;br /&gt;
I edit the line and leave the end blank&lt;br /&gt;
&lt;br /&gt;
 RecentAppsStat=&lt;br /&gt;
&lt;br /&gt;
#Exit the chroot by either typing exit or using the keyboard &amp;lt;CTRL-D&amp;gt; and fliping back to virtual terminal 2 &amp;lt;ALT-F2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are paranoid delete /mnt/hda2/remaster/etc/skel/.bash_history &amp;amp; delete /mnt/hda2/remaster/root/.bash_history.&lt;br /&gt;
&lt;br /&gt;
 rm /mnt/hda2/remaster/etc/skel/.bash_history /mnt/hda2/remaster/root/.bash_history&lt;br /&gt;
&lt;br /&gt;
= Create the compressed filesystem =&lt;br /&gt;
&lt;br /&gt;
Flip back to virtual terminal 1 &amp;lt;ALT-F1&amp;gt; and run the knoppix-remaster script.&lt;br /&gt;
&lt;br /&gt;
 ./knoppix-remaster /mnt/hda2/remaster&lt;br /&gt;
&lt;br /&gt;
I choose option 2 &amp;quot;Create compressed fs&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
It will ask me &amp;quot;Do you want to cleanup your remaster?&amp;quot; &amp;amp; I choose yes.&lt;br /&gt;
&lt;br /&gt;
NOTE: &lt;br /&gt;
a remaster filesystem of about 2.1GB compresses down to about 685MB CD ISO. You can check the system size by issuing the commands df -h or du -h --max-depth=1.&lt;br /&gt;
&lt;br /&gt;
At this point it is fully automated and will create compressed Knoppix filesystem that is found on the Knoppix CD.&lt;br /&gt;
&lt;br /&gt;
Example compression times:&lt;br /&gt;
&lt;br /&gt;
* Pentium 3 - 450 MHz 384MB aprox. 1hr 15min&lt;br /&gt;
* Duron 1.6 GHz 768MB RAM aprox. 25 min&lt;br /&gt;
* Opteron 242 (1.4GHz) 1GB RAM aprox 12 min&lt;br /&gt;
&lt;br /&gt;
= Create ISO image =&lt;br /&gt;
&lt;br /&gt;
When the compressed filesystem step is complete, choose option 3 &amp;quot;Create isofs&amp;quot; to create the ISO file. Again, through the wonders of these scripts, it is all automated. Once that step is complete, choose the option 6 &amp;amp; quite the program.&lt;br /&gt;
&lt;br /&gt;
The finished ISO file, for this example, is located at /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso.&lt;br /&gt;
&lt;br /&gt;
= Burn ISO image =&lt;br /&gt;
&lt;br /&gt;
At this point burn the ISO to CD. If you have an available CDRW drive in your system like /dev/hdd, then type init 5 to go to runlevel 5 where it runs KDE and you can burn the CD with K3B. Or you can burn the CD from the command line. First get the CDRW device ID numbers via&lt;br /&gt;
&lt;br /&gt;
 cdrecord -scanbus&lt;br /&gt;
&lt;br /&gt;
It will scan your system and display a list of devices. Identify the ID numbers in form #,#,#. This example will use 1,1,0. Load the CDRW drive with a blank CDR and use the command below to burn the ISO to the CDR.&lt;br /&gt;
&lt;br /&gt;
 cdrecord -v gracetime=2 dev=1,1,0 speed=16 -dao driveropts=burnfree \ &lt;br /&gt;
 -eject -data /mnt/hda2/remaster/Knoppix.build/Knoppix.Master/KNOPPIX-CUSTOM.iso&lt;br /&gt;
&lt;br /&gt;
If you do not have a available CDRW drive, then perhaps you can boot into the graphical KDE environment via init 5. In KDE you can use the Knoppix menu and start the samba service to permit sharing of the hard drives via Windows network filesharing. Or you can copy the ISO to a FAT32 partition.  Or scp it somewhere, etc.&lt;br /&gt;
&lt;br /&gt;
[[Category: Remastering Knoppix ]]&lt;/div&gt;</summary>
		<author><name>Leah</name></author>	</entry>

	</feed>