[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-knoppix] KNOPPIX Booting by sandesh(Thanks to R. Dale Thomas)



Hello jeremy and people,
I am sending text doc.
 
here...
sandesh

jeremy@saopaulo.illuminatedtechnologies.com wrote:

If you send your .doc in .txt I will read it.

- Jeremy

On Thu, 22 Jan 2004, sandesh singh wrote:

> Hello people,
>
> I am sending a detailed documentation describing Knoppix booting. I have tried to cover every minute detail, that happens at the time of booting of knoppix cd.
>
> Initial part of this documentation is taken from the reply of R. Dale thomas. Thanks to R. Dale Thomas.
>
> Since I am a newbie to knoppix, hence it is quite possible that some intrinsic, important detail have been missed out Or some incorrect detail has become a part of this doc.
>
> I am eager to know the mistakes or wrong understanding in my mind about booting process of knoppix. Please let me know.
>
> thnks...
> here...
> sandesh
>
> Yahoo! India Mobile: Ringtones, Wallpapers, P icture Messages and more.Download now.

Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more. Download now.

Knoppix Booting:
#Sandesh Singh jan,2004
Knoppix booting always creates a speculation. Particularly when a person sees for the first time, that an operating system (here, GNU/Linux) can boot without installing it on hard drive.
Knoppix booting takes care of many things. Few things you can see happening (in front of yourself) on the screen. A number of things happen at the background, when Knoppix boots. 
This documentation is done to make you know the details of what Knoppix CD does at the time of booting. Obviously, I being a newbie to Knoppix, I do not consider myself to be perfect. There might be mistakes(or incorrect detail) in this documentation. If you find any discrepancy, then please let me know.
Please mail me at: sks_tr@yahoo.co.in
I must thank Mr. R. Dale Thomas  on email for giving me their valuable time in replying mine questions.
-----------------------------------------------------------------------
A BREIF OF BOOTING:
Before I move with Knoppix booting, I must discuss how a normal operating system boots. Generally an operating system follows this approach.
 Locate bootloader--à loads kernel----à mounts root filesystem
 
As shown above, initially bootloader is located,which loads the kernel. It?s the kernel, which mounts the root filesystem. Then /etc/init is called for normal startup. 

In the knoppix cdrom, the kernels can not mount directly it's root filesystem. Hence it follows a little different approach as  
Bootloader--àkernel--àmount initrd as ?/?--àrun /linuxrc-à mount ?/?-àrun /etc/init. 
Here initrd is a filesystem (based on ramdisk) installed in RAM by the bootloader.
-----------------------------------------------------------------------
DETAIL: 
Initially Knoppix is put in CDROM Drive and Bios settings are properly done to boot from CD. If everything is fine, then an initial prompt comes up like this?
?BOOT FROM ATAPI CDROM? .
	The el torrito bootable cdrom format using the syslinux 
boot loading process uses floppy emulation to boot.  The emulation
process uses the boot.img as the filesystem image of a floppy disk.
This info is given to the mkisofs program during the building of
the iso image for burning to the cdrom.  During the boot process,
the boot.img is used as if it were from a floppy drive. 
        Located on that image is the ldlinux.sys driver which gets executed. The syslinux.cfg is a text file that is configuration for ldlinux.sys. It specifies files to display with various key-presses, and kernel files to load with their parameters such as ramdisk images.  At this point in the booting, a user will have screen with different
boot choices from which to pick.
	With the Knoppix cd, when the user picks one of those
choices, either by waiting for the timeout period to expire or by
typing in a selection such as 'knoppix lang=us', the kernel image
and initrd image as specified by that entry in the syslinux.cfg
configuration file, will be loaded into memory and the kernel (vmlinuz) is executed. The kernel will use the initrd as the initial root file-
system.  This root filessystem will be the miniroot.gz file on the boot.img file with Knoppix.
       Now, linuxrc is a script located in miniroot.gz that the kernel
will execute as the first process. It does a number of things. I will mention here few of things that linuxrc script does... 
It is the linuxrc script, which gives you following message on the screen...
Welcome to KNOPPIX live-linux CD.
It first loads the right SCSI module, if needed, then searches cdroms and harddisk for the KNOPPIX image.
It finds the total RAM capacity.
linuxrc mounts the KNOPPIX image, then builds a root in the                                                  initial ramdisk.
Then it builds writable directories and symlinks on ramdisk.
When the linuxrc script finishes, /etc/init is run.
	 /etc/init is another very important process, which brings GUI on the screen. Init examines /etc/inittab before entering any multi-user runlevel, where it runs /etc/init.d/rcS(inittab sysinit line). /etc/init.d/rcS runs all the scripts in /etc/init.d/rcS.d. The essential script, which runs here is S00knoppix-autoconfig. S00knoppix-autoconfig does many things, some of which are listed here...
Here language and keyboard specification and setting is done.
Desktop will be set to appropriate ??????
All the settings are inserted into /etc/sysconfig and /etc/sysconfig/KNOPPIX.
It finds and prints CPU information.
It detects APM BIOS, PCMCIA bus, USB and firewall.
It enables hotplug manager.
It searches & configures the supported hardware and checks for options relevant to hardware setup. It configures mouse, sound card, AGP Bridge, Video, Monitor, etc.
It scans harddisk partitions and puts it into /etc/fsab.
It uses the swap space, if it is already created.
It mounts certain devices automatically such as floppy,cdroms etc.
	  init keeps looking at  /etc/inittab and sees that it has to enter runlevel 5 by default(inittab default line). But before it goes to runlevel 5, it has to execute /etc/init.d/rc with the argument 5. /etc/init.d/rc 5 runs the scripts in /etc/rc5.d. Since /etc/rc5.d is empty, so nothing is done.
      init looks again at /etc/inittab and sees that the next thing to do for entering runlevel 5 is to run /bin/sleep with argument 2(i.e. wait for 2 seconds). After this it executes /etc/init.d/xsession with the argument start.
/etc/init.d/xsession initially determines the runlevel, it has to enter.
/etc/X11/Xsession checks various conditions such as whether brltty is running? or the memory is enough to start X, then it generates X configuration.(Finally it starts X).
/etc/init.d/xsession executes as user ?knoppix? the script etc/X11/xinit/xinitrc.
This script in turn invokes script /etc/X11/Xsession, which is a Global session file. It is used by display managers and xinit(startx).
/etc/X11/Xsession performs some sanity checks. After this it executes all the scripts in /etc/X11/xsession.d. Purpose of individual scripts within this directory is detailed here...
/etc/X11/Xsession.d/20xfree86-common_process-args is called without args, so does nothing. 
etc/Xsession.d/30xfree86-common_xresources loads X resources in /etc/X11/Xresources.
/etc/X11/Xsession.d/45xsession sources various files created during knoppix-autoconfig containing hardware and locale configuration.  It copies specific directories and files   from /etc/skel/ (i.e. not whatever happens to be there at the moment).                           If the username is "knoppix", it also copies specific directories from     /usr/share/knoppix/profile.                         It sets language for mozilla and netscape, and moves the 
   $HOME/.mozilla/*/*/chrome/chrome.rdf.$LANGUAGE 
	 to $HOME/mozilla/*/*chrome/chrome.rdf.           It creates automatic desktop icons and Kde is startup. Entire process is indicated by a GUI indicator, which is present in ksplash file. 
4. Finally GUI screen is up. By default KDE desktop is there in front of you,where you can work.

 	5. When /etc/init.d/xsession ends and system is shut down. 
	








Reply to: