First, the Knoppix boots on two stages, first using the initrd method (if you mount the boot.img image from the CD in the directory KNOPPIX with the loop module, you'll find that it use syslinux to boot from a fat disk and inside you'll find an archive called miniroot.gz, this is the initrd filesystem compressed, you can uncompress it and mount it with loop again, after that you'll find a script called linuxrc that does the first boot process, it searchs all devices and partition looking for the KNOPPIX image, mount it and do other stuff, look at the script that is a bash one).
The before mentioned script also creates the ramdisk, the directory structure for temporal writable files (as for example /tmp, /var, etc...) and mount the KNOPPIX compressed image with the cloop module that is the loop module modified to use compression on the fly to compress the 2 Gb of the Knoppix filesystem into a 700 Mb image, the script mounts the image on /KNOPPIX. After that, it swaps the / to the one created on ramdisk (before it was using the / on the initrd filesystem).
Then, the second stage begins finnish the boot process as an almost normal Debian system by calling the init process that runs the script /etc/init.d/knoppix-autoconfig bash script that configure the rest of the system (for example, calls the hardware detection program).
I'm sure that I'm forgeting lot of things probably, but the best way to understand how all this works is to look at the two scripts mentioned so you can learn the fundamental process of how it works.
I also suggest reading the documentation of the syslinux package as the documentation of the initrd process that you can find on the Documentation directory of the linux kernel tree.
Greettings and I hope this clarify a little more how all this works, I also has pending the task of writing a nice documentation about what I have learned of this great project when I begin working on a customized CD for my university, if someone wants to help on this or are doing something similar please let me know.
Ernesto. Mihai Tanasescu wrote:
Hello, I've read some of the knoppix documentation and I still can't figure out how it all works. I'm having problems with all those knoppix mounts. I saw that /home and /usr are mounted under /ramdisc which is RAM memory emulated from /dev/shm (usually it emulates half of the total RAM memory). I presume the /usr directory is taken from the cd and placed into ramdisc. But when I issue a du -k under the root directory I see a KNOPPIX one occupying about 2 Gb of space. How is this possible? while the rest occupies a total of 700 Mb (exactly the cd size). And what is realy that device /dev/root which is mounted as "/"? I want to understand the concept behind this. And if I modify with vim the file lets say /etc/resolv.conf where does he save it afterwards ? as the file resides in /etc/ on /dev/root which is mounted as "/". and /dev/root is mounted from the cd..and it seems strange. And the directory structure on " /" look exactly like the one under the KNOPPIX folder.(the only difference being that / occupies 700 Mb not counting the knoppix folder it contains) Please help me understand the way this works. (and how knoppix emulates and uses the system ram). or give me some relevant material that explains this process of organizing files and running programs and allowing the user to modify files that are not mounted in ramdisc but are on a cd.(like the ones in /etc ). Regards, Mihai
_______________________________________________ debian-knoppix mailing list debian-knoppix@linuxtag.org http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix