Linux Kernel ,ISO images

Q.What is Kernel? Explain the task it performs. 

Ans: Kernel is used in UNIX like systems and is considered to be the heart of the operating system. It is responsible for communication between hardware and software components. It is primarily used for managing the systems resources as well.
Kernel Activities:
The Kernel task manager allows tasks to run concurrently.
Managing the computer resources: Kernel allows the other programs to run and use the resources.Resources include i/o devices, CPU, memory. Kernel is responsible for Process management. It allows multiple processes to run simultaneously allowing user to multitask. Kernel has an access to the systems memory and allows the processes to access the memory when required. Processes may also need to access the devices attached to the system. Kernel assists the processes in doing so.For the processes to access and make use of these services, system calls are used.

Q. Different types of Kernel.

Ans .Monolithic Vs Modular Kernel
Monolithic kernel is one single program that contains all of the code necessary to perform every kernel related task.  Most UNIX and BSD kernels are monolithic by default.
    Some advantages hinge on these points:
    Since there is less software involved it is faster. As it is one single piece of software it should be smaller both in source and compiled forms.
Less code generally means less bugs which can translate to fewer security problems.

Modular kernel allows an administrator to add functionality only when required. Keeping only what's necessary in kernel memory reduces the kernel's memory footprint and increases its overall performance. A few advantages to the modular kernel are: Faster development time for drivers that can operate from within modules. No reboot required for testing (provided the kernel is not destabilized). On demand capability versus spending time recompiling a whole kernel for things like new drivers or subsystems. Faster integration of third party technology (related to development but pertinent unto itself nonetheless).


Q.What is Initial Ram disk?

Ans: An initial ram disk is a temporary file system used in the boot process of the Linux kernel. initrd and initramfs refer to slightly different schemes for loading this file system into memory. Both are commonly used to make preparations before the real root file system can be mounted.

Q. Explain Different Option for updating kernel?

Ans:
A. install new kernel from rmp file
a. Get the Newest kernel and put in /tmp
b. rpm -i  /tmp/kernal-2.4.19-3.i386.rpm (Not ugrading.can be switched to old keranl if need)
c. Now Kernal ,RamDisk etc..are installed in /boot
d. New stanza added to grub.com (you need alter "default")

B. customizes, install and configure from kernel source code.
Required RMP's tool for customizing kernel source code.
             1. Kernel-source-*
             2.glibc-kernheaders-*
             3.glibc-deve;-*
             4.cpp-*
             5.binutils-*
             6.gcc-*
             7.tcl-*
             8.tk-*

Q. Explain the Steps to compile and install kernel?

Ans:    make mrproper  -- clean up the directory tree
            make xconfig -- tools for customixing the kernal
            make dep --- makes and build the dependecies
            make clean --- cleans any unecessary files used to build the previous steps
            make bzimage -- actually builds the kernel
            make modules -- Builds the modules
            make modules_install -- Install kernel modules
            make install -- copy the new kernel files to associated directory.


Q.What are ISO image files?



Ans: An ISO image is an archive file (also known as a disk image) of an optical disc in a format defined by the International Organization for Standardization (ISO). ISO image files typically have a file extension of .iso. The name ISO is taken from the ISO 9660 file system used with CD-ROM media according towikipedia.org.



Q. How to create an ISO image?



Ans: As of now I know two methods to create an ISO file. One is through dd command (disk dump) and other is mkisofs command



Q. Creating ISO files from cd-rom/dvd by using dd command



Ans: #dd if=/dev/cdrom of=/temp/songs.iso

dd if=/dev/dvd of=/temp/songs1.iso # for dvd

dd if=/dev/scd0 of=/temp/songs2.iso # if cdrom is scsi



Let me explain what actually the above command will do. dd is a disk dump command which will present in most of the Linux/nix systems and "if"specifies input file and "of" specifies output file. So we are specifying to dd command what is our input file and where is our output file.



Q. Creating ISO file using mkisofs command.



Ans: Method1: Creating an iso image from cd-rom

#mkisofs /dev/cdrom -o /temp/songs3.iso



Method2: Creating an iso image from a folder



Suppose i am having a folder /opt/data which contains some data to be converted in to .iso file, follow below step



#mkisofs -o /temp/songs4.iso /opt/data



Q. How to mount an ISO file?



Ans: #mount -o loop /temp/songs4.iso /opt/mountpoint



Q. How to unmount an ISO file?



Ans: #umount -lf /opt/mountpoint


Comments

Popular posts from this blog

Docker ,MakeFile and Jenkins pipeline

Networking Basics

Continuous Deployment - Jenkins , Capistrano And Docker.