Linux Interview Questions and Answers-Part-3

Question: Explain RHEL 6 Boot Process ?
Answer:
power on -> post - > mbr[bit 512, 446 bootstrip,64 bit partition table, 2 magic bit]->system.map->grub->VMLinux[decompress]-> mount /root as (RO) -> initrd -> init(start) ->inittab(complete)-> run level -> rc script -> (s-start k-kill)

Question: Explain RHEL 7 Boot Process.
Answer:
MBR => GRUB (Load Kernel image -> extract the content of initramfs image) => Kernel (Loads the necessary driver modules from initrd image -> start systems first process - systemd) => SYSTEMD (Read the configuration files from the /etc/systemd directory -> Reads file linked by /etc/systemd/system/default.target -> Bring the system to the state defined by the system target)

Question Boot the system from Grub prompts
Answer:

grub> ls
(proc) (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
grub> ls (hd0,msdos2)
Filesystem type is xfs,
grub> set root=(hd0,msdos1)
grub> linux /vmlinuz-3.13.0-29-generic ro root=/dev/mapper/centos-root
grub> initrd /initrd.img-3.13.0-29-generic
grub> boot

Question : How to regenerate the initrd image using recuse
Redhat Linux 7 boot issue-Kernel Panic and steps to troubleshoot

Answer:
# mkinitrd /boot/initramfs-3.10.0-957.el7.x86_64.img 3.10.0-957.el7.x86_64
# dracut -f /boot/initramfs-3.10.0-957.el7.x86_64.img 3.10.0-957.el7.x86_64

Question : How to check the booting issue in RHEL 7
Answer:
# systemd-analyze ## (It will share the time consumed to boot the system)
# systemd-analyze blame ## (It will share complete process details.)

Question: What is strace command ?
Answer: The strace is the tool that helps in debugging issues by tracing system calls executed by a program.

Question: What is differences between RHEL 7, 8, 9
Answer: 


No comments:

Post a Comment