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 and RHEL 8
Answer:

Features: RHEL 8 RHEL 7
Kernel Version 4.18.0-x 3.10.0-x
Kernel Code Name Ootpa Maipo
Repo Channels:

Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)  Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

Red Hat Enterprise Linux 7 Server (RPMs)
Network Time Synchronization Using only Chronyd. The ntp implemenation is not supported in RHEL8. Using either ntp or chronyd.
Package/Software Management: Package management is done by DNF (YUMv4) Yum being used and it is based on version 3.0.x

https://www.simplylinuxfaq.com/p/major-differences-between-rhel-8-and-7.html#:~:text=RHEL%208%20provides%20OpenJDK%2011,as%20the%20default%20Java%20version.&text=The%20NFS%20configuration%20file%20is,conf%22.

No comments:

Post a Comment