Thursday, 26 June 2014

How to start an operating system ???


When we switch on the cpu of our computer it follows a series of steps to start.

Ist BIOS of our system starts which is loaded by the manufacturer.BIOS loaded MBR which is located in our hard disk .MBR consist of bootloader & partition table for our operating system .
Bootloader(like GRUB) starts our kernel by selecting from a no of kernels available for the os.
After booting kernel starts the init process which further initialtes other drivers & programs.

Monday, 23 June 2014

Apt-get in fedora :

apt-get install package : apt-get is not installed in FEDORA so ,instead use :

yum install package 

WHAT IS KERNEL CRASH OR KERNEL PANIC??? + KERNEL CRASH DUMP


KERNEL CRASH :
It is an action taken by the operating system whenever os detects any fatal error from which kernel can not recover .It might occur due to :
i)hardware failure
ii)software bug

panic() is the function which handle such situation which might lead to system reboot.


KERNEL CRASH DUMP:
It is the portion of the volatile memory (RAM) that is copied in a file whenever kernel crashes which can be analysed to search the reason of crash & prevent any further harm to system .
(for fedora ) :

yum install --enablerepo=fedora-debuginfo --enablerepo=updates-debuginfo kexec-tools crash kernel-debuginfo

Sunday, 22 June 2014

depmod

DEPMOD: it is used to create module dependencies & save it in /lib/modules/kernel_version/modules.dep 

modprobe vs insmod

Both modprobe & insmod are used to load module into linux kernel but differ in some points:
i) modprobe load module from /lib/module/linux_kerenel/ & do not search for any other loacation until linked to other location while insmod can load module from any file location on the system .
ii)modprobe also take care & load module dependencies , it call insmod after getting module dependencies info while insmod does not  look for module dependencies.

MODULE DEPENDENCIES :

There are certain modules which rely on other modules for their functioning  & operate successfully.Moreover , we might need to remove some certain  modules which are not operating at the moment so we need to list dependencies.
Dependencies can be checked by :
i)lsmod -
Module                  Size  Used by
iptable_filter          1790  1 
ip_tables               7706  1 iptable_filter
x_tables                8327  1 ip_tables
vmhgfs                 41755  0  
 Used by cloumn depict dependencies .

ii)Use modinfo mudule_name
iii)Use # cat /lib/modules/3.9.10-100.fc17.x86_64/modules.dep
to list all the dependencies of all the modules of the kernel regardless of wheather modules are loaded or not .