Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

Wednesday, March 8, 2017

Linux Query or Interview question - 6

Query 1. What is boot loader?

Ans: A boot loader is a small program which loads OS/kernel into memory (RAM). It is stored in the 1st sector of HDD i.e. MBR (Master Boot Record) partition table.
When your machine is powered-up or restarted, the BIOS perform some initial tests and then transfers control to the MBR where boot loader resides.

Note: The MBR contains boot loader information and the partition table information.

Without boot loader your OS will not be loaded in memory.

In Linux we use below two types of boot loader.
a.LILO – In older version
b. GRUB (GRand Unified Bootloader)

Grub configuration files and supported files are stored under /boot/grub/grub.conf and its symlink is /etc/grub.conf.
[root@ testmachine ~]# ls -l /etc/grub.conf
lrwxrwxrwx. 1 root root 22 Mar 26  2015 /etc/grub.conf -> ../boot/grub/grub.conf

You will see kernel information in your grub.conf file. The latest kernel in our case is “initrd /initramfs-2.6.32-573.3.1.el6.x86_64.img”
[root@ testmachine ~]# cat /etc/grub.conf|grep -i initrd
        initrd /initramfs-2.6.32-573.3.1.el6.x86_64.img
        initrd /initramfs-2.6.32-431.el6.x86_64.img


Query 2: What is load average cpu?

Load average shows the amount of traffic/load on your CPU in past 1, 5, 15 minutes. It is totally depend on how many CPU core you have in your machine.

If you are having 3 logical CPU in your machine and having load average value is less than 3 then your load average is OK means there is no processes in waiting or queued state in your CPU. 

1 CPU and 1 load average means there is 100% load on your CPU.

[root@ testmachine boot]# cat /proc/loadavg
2.54 1.73 1.53 3/368 25745

You can get CPU load average details from #top and #uptime command as well.

[root@ testmachine ~]# uptime
 14:49:34 up 455 days, 21:33,  5 users,  load average: 2.54, 1.73, 1.53

Thanks & Regards,

Kiran Jadhav 

No comments:

Post a Comment