Eh, actually no, you CANNOT write on the CD, that was just to catch your eyes !
You are attracted by the solidity of a system that can not go bad, such as Knoppix, avoiding you to partition your hard disks, letting you use the same system on many machines with quite the same configuration. You're a repairman, you want to promote Linux thanks to this demo... then you should be interested in reading this.
Actually, this allow you to compile and install new softwares onto knoppix (I installed Texmacs and tetex on it, which is about 400M), save your parameters and so on, using a windows partition the same way as a linux one.
As I did not find anything dealing with this, I decided to write my own.
Here are the steps :
First of all, when knoppix start, boot knoppix 2, which won't start up the graphical environment (namely KDE)
Now, you need a big empty file on the storage device (harddisk, but also external disks, flash cards...), let's say 1.0Gb, where to store everything. Here, it will be /mnt/windows/addons.img (need is to mount /mnt/windows before) This file can be created using the command : dd if=/dev/zero of=/mnt/windows/addons.img count=$[2*1024^3]
The odd syntax for count tells bash to compute the numerical expression. As 1 Gb is 1024 Mb, which are each 1024 kb, which are each 1024 b, it make a power of 3. I don't know why, but if you don't multiply per 2 then it will only make a 512 Mb file. Note about NTFS : I read in the kernel that Linux can Read on it, but only write onto existing file. That shouldn't be a big problem : just create the big file on windows (you can simply copy an existing file), and go back onto linux.
As this file is just nothing for linux yet, we need to morph it into an ext3 filesystem. This command should do it : mkfs.ext3 file It will warn you your writing onto a file, but we know it :-)
Then, we need to mount it, just as any other filesystem. Assuming your mounpoint will be /mnt/addons (it can be anything else, but it has to remain then), this will mount it : mkdir /mnt/addons (it shouldn't exist yet) mount /mnt/windows/addons.img /mnt/addons -o loop,rw,users,exec
loop is to tells the system it is a virtual device rw allow read-write access (might be useful for ntfs) exec specify we can execute programs from it (default is noexec) users placed before exec tells any user can execute programs (useless when in root, but will work on it as knoppix later)
Now, what about saving knoppix's settings (the user, not the distro) ? Well, you can notice that when using "knoppix 2" at boot up, directory /home/knoppix does not even exist yet. So, if the system can make it, we can make it too. Create directory /mnt/addons/knoppix, and then type : ln -s /mnt/addons/knoppix /home/ so that a symbolic links will be created.
Here it is, from now on, your settings will be saved elsewhere than in ram. Now, startup kde using : init 5 -----------------------------------------------------------------------------
Now, assuming everything is ok, let's resume the few commands to startup : 1 - knoppix 2 at bootup 2 - mount /mnt/windows 3 - mkdir /mnt/addons 4 - mount /mnt/windows/addons.img /mnt/addons -o loop,rw,users,exec 5 - ln -s /mnt/addons/knoppix /home/ 6 - init 5
Of course, from step 2, a bash script could do it. Thus, you'll have to enter at least 3 commands each time you start the system (but how much is it compared to what you type in a whole session ?)
------------------------------------------------------------------------------
Now, let's study the process of installing something new onto knoppix. The example taken will be the installation of TeXmacs, because it involves the installation of a third party program (namely tetex) and of a library. You need to download the latest stable version of TeXmacs, tetex-src, tetex-texmf and guile, found on any mirror (I mainly use gentoo mirrors).
Create a directory /mnt/addons/src unpack everything there, except for tetex-texmf Create /mnt/addons/subsystem/tetex/texmf Unpack texmf archive there using : tar x[jz]fv archive -C /mnt/addons/subsystem/tetex/texmf/ where j is for bz2 archive, and z for gz ones now, let's install tetex
Go in the sources of tetex sh ./configure --prefix=/mnt/addons/subsystem/tetex/texmf --bindir=/mnt/addons/subsystem/bin --man --mandir=/mnt/addons/subsystem/man && make world Be sure to respect the conventions, ie DO NOT PUT any trailing / after prefix directory, or installation will fail !
Now, go in /mnt/addons/subsystem/tetex/texmf/web2c/ and edit texmf.cnf Replace everywhere you can find /var by a writable directory of your choice (it should be in the addons device, since it contains the fonts generated by tetex, but if you do not want to store them, you can put it in ramdisk)
Now, tetex is set up.
We have to indicate bash were to find new binaries, and also the future libraries, and the manpages : cat >>$HOME/.bashrc export PATH=/mnt/addons/subsystem/bin:$PATH export LD_LIBRARY_PATH=/mnt/addons/substystem/lib:$LD_LIBRARY_PATH export MANPATH=/mnt/addons/subsystem/man:$MANPATH source $HOME/.bashrc
We store this in .bashrc so that each time we log in as knoppix, these PATH are updated (the best would be to write to /etc/bashrc, so that any user will benefit of it, but that's not worth it). Then source command update it to the current environment
Now, we have to install guile, so that TeXmacs can work. Go in guile sources sh ./configure --prefix=/mnt/addons/subsystem && make && make install Ok for guile
Now, let's do TeXmacs Go in TeXmacs sources sh ./configure --prefix=/mnt/addons/subsystem && make && make install Ok for texmacs
Type texmacs to see it magically appear on the screen. Try man texmacs to see if manpages work
|
|