Switch run level init command| how to switch the current run level

By default most red server there default run level is 3
Red hat work station default run level is 5
By through init command we can switch run level form one level to another level.
#init 3
The above command switch the system from current run level to run level 3
1:345:respawn:/sbin/mingetty tty2 in /sbin/init
The above line directs /sbin/init to run the mingetty program on tty2 in run levels 3 through 5

Linux six runlevel general name and there description

Runlevel 0
General name: HALT
These run level halts or stop the system
Rulevel 1
SINGLE USER MODE
This run level is single user mode and offer root bash shell with no other software is running.
Runlevel 2
MULTIUSER MODE
Perform Multi User mode without NFS (Network File System)
Runlevel 3
EXTENDED MULTI USER MODE
Offer extended full multi user mode with text login
Run level 4
NOT USED
Run level 5
GRAPHICAL MODE
Level 5 off full Multi-user mode with graphical Xll login
Run level 6
REBOOT
Performing Rebooting in the Linux system
These are the red hat Linux run level and there application
These run level and there application is not same for all Linux distribution.
Example: Red hat Linux run level 0 is shut down but in the sun’s Solaris OS shutdown function is performed by run level 5

Linux six run levels |system initialization with three steps Boot hardware, boot loader, Boot kernel

Linux system initializing it perform their process whenever system boots. Linux every system can be made to be in a pre-defined working condition called run levels. Linux it has six run levels.
System Initialization
When ever system boot up in Linux the following three steps happen.
Boot Hardware
On the basic information in the system store in read only memory
Example: BIOS the system examines and startup the hardware.
Some of that information will direct the computer to examine the devices for locating the bootable operating system,
Start Boot loader
Then there control passes to the start boot loader. The boot loader will be started and permits to select to boot Linux or any other operating system
Boot the kernel
Finally there control passes to kernel.
In that time Linux kernel will be loaded.
That kernel mount main file system and passes control to the init process.

Kickstart Installation overview | what is kickstart installation in Linux

Linux has been installed automatic just like automation method of installation called KICKSTART.This type of installation is help administrator to install Linux in the no of the system. These methods involve creating a configuration file and copying that file on to the machine in which Linux has to be installed and performing installation.

Referring kernel source structure-I| memory management, inter process communication, kernel ,PCI

Referring kernel source structure related to source tree with respect to a particular topic.
System Startup initialization
View /arch/i386/kernel/head.s it is make some architecture specific setup and proceed the main() routine in /init/main.c
Memory Management
/arch/*/mm it is directory for memory management.
Page fault handling code is in /mm/memory.c
Memory maping cache code in /mm/filemap.c
Swap cache is applied in /mm/swap.c
And buffer cache is applied in /mm/buffer.c
Kernel
/arch/*/kernel::it is directory
/kernel/sched.c ::kernel scheduler directory
/kernel/fork.c::fork codedirectory
/include/linux/interrupt.h::Bottom half handling code directory
/include/linux/sched.h::task_struct date structure directory
PCI
/drivers/pci/pci,c::PCI pseudo driver directory
/include/linux/pci.h::system wide definition directory
Interposes Communication

System V IPC object s has an ipc_term data structure present in /include/linux/ipc.h
ipc/msg.c:: system v messages are present
/ipc/shm.c::shared memory and semaphore directory
/ipc/pipes.c:: pipes are applied

Linux kernel Management | Thin layer of Linux system | Linux kernel modules

The innermost layer of the Linux operating system is the kernel.
This is the thin layer between hardware and software
When the system boot up the bios setting passes the control to the kernel
Then kernel manages all task of the system.
Kernel modules it contains chunks of codes that have to be linked to the kernel dynamically for use. In the modeling it perform two process
Loading modules
Unloading modules

Linux Kernel source structure | Linux kernel important directories

Linux Kernel has many directories and the structure of the Linux kernel source.
Linux kernel source structure generally it present in the /user/src/linux directory
There important directories are
Documentation-> these consists of documentation of all the data
Arch-> This directory has the all kernel codes particularly related to architecture and it is further divided into subdirectory like
alpha,arm,1386,m68k,mipc,ppc,sparc,and sparc64,it has
boot code, interrupt, trap handling,fp emulation and optimized utility routines.
mm subdirectories for platform-specific memory.
Drivers- this directory contains all the system’s device driver
fs-it contain file system code
Example: vfs,vfat,ext3,proc,etc
include-<most of the include files required to building kernel codes
init-These directory contain initialization code.
ipc- the kernel has inter process communication code
kernel-these directory contain main kernel code. And the architecture specific kernel is in /arch/*/kernel
lib- lib directory contains library code of the kernel and architecture specific library in /arch/*/lib
mm-mm directory has memory management code and directory /arch/*/mm
net-net directory contain networking code of the kernel
script-script directory used to configure the kernel
modules-All built modules are contain in these directory.

Important directories LILO BOOT Loader and hard driver | sbin, lilo, boot,lilo.conf,/dev/hda,hdb,sda,sdb

The following files are significant to LILO and generated at the time of initial installation
/sbin/lilo map installer directory present in /sbin/lilo
/boot/boot.b boot loader directory are present in /boot/boot.b
/boot/map Boot map has the location of the kernel /boot/map
/etc/lilo.conf is the configuration of lilo directory /etc/lilo.conf

Linux hard driver referred as device files that will be present in /dev directory
If the system have one or more IDE drive then there file are /dev/hda and /dev/hdb
If the system have one or more SCSI drive then there files are /dev/sda and /dev/sda



Installing Configuring LILO MBR | how to configure LILO boot loader in MBR-Master BOOT RECORD

LILO can be installed as the MBR-(MASTER BOOT RECORD) of the boot drive. System has one operating system or it contains two operating system windows and Linux.If the system has the two operating system OS/2 then LILO can be installed on the root partition of the hard drive. If the window Os is install then windows will overwrite MBR at the time of installation and then MBR of windows can be overwritten by LILO.
LILO boot loader installed in the following three ways.

1. From the Master boot record of the hard drive.
2. from the superblock of root partition on the hard drive
3. From the CD-Rom or Floppy disk


LILO can be installed for the first time using shell script named QuickInst
If LlLo is not installed at the time of installing Linux without using quickinst.
The user can still install LILO in two steps
File /etc/lilo.conf is created and configured
/sbin/lilo is run to install LILO and LILO will be made active


LILO Boot loader | LILO Loading in two stages.

LILO is the flexible boot loader for Linux, which is independent of the file system. Using LILO it is possible to select one of sixteen different images at boot time.
LILO can be use MASTER BOOT RECORD (MBR).
MBR-Master boot record it is first sector of the hard disk.
LILO loads it self into the computer memory in two stages.
STAGE1: This stage is know as primary BOOT loader

It is read from the memory by the BIOS from the master boot record.
This stage1 will exist on less than 512 bytes of disk space with MBR and MBR will load stage 2 boot loader.
STAGE2: it is known as secondary boot loader is read into the memory and display the red hat Linux initial screen. These screen the option to select the operating system. After selecting the operating system. It will load into memory and transfers control of the computer to that operating system.
If the users want to have command prompt to key in a command to LILO pressing ctrl XLILO will display a LILO prompt on the screen.
The list of available boot targets is displayed by pressing the key.


Linux Boot Loader |LILO and GRUB Grand Unified Boot Loader

Boot loader is a small program that presents in the system and load the operating system into to the system memory at system boot. When the system is started, the boot loader that loads operating system and passes the control to the kernel. These module it is done deals with two most popular boot loader of Linux,
That is
LILO and GRUB
LILO has the two stages
GRUB has the three stages.

Cron submission of tasks | cron important configure files and directory

/var/spool/corn/username file it contain each user regulates his distinguished file and this is used in the UNIX system five
/etc/crontab file. These file it is accessible only by the root. crontab file from BSD Unix and it is derivatives.
/etc/cron.d directory. It is similar to crontab file. Only root user has permission to access the files.
/etc/cron.hourly
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
these are the directory all these files are shell script which run time indicated in /etc/crontab file. Only root use has permission to access the files.

Cron daemon Linux task scheduling |cron tables fields | /etc/cron.allow and /etc/cron.deny

Cron command similar to the task scheduling “at” Linux command. Cron it performs the task can scheduled to run without being attended. It is component of vixiecron rpm packages and it permits more flexibility in automation of execution in command. If the user who did not perform the task automation then it face error message or output are emailed to the user.
Cron Access control files
/etc/cron.allow->list of user access submitting task
/etc/cron.deny->list of user deny submitting task
Cron tables
Cron daemon is suited for recurring task as it will use configuration files called cron tables.
It contains six fields. Five fields are times for running the command and the sixth field is the complete the path name to the shell script.