LCA Linux System Installation & Configuration 2 — Questions and Answers
Question 1: Which file in /etc contains the default runlevel for a System V init-based Linux system?
- /etc/runlevel
- /etc/inittab (Correct answer)
- /etc/rc.conf
- /etc/init.conf
Correct answer: /etc/inittab
The /etc/inittab file defines the default runlevel and controls the init process behavior on System V init systems.
Question 2: During a Kickstart-based RHEL installation, which directive specifies the disk partitioning scheme?
- diskconfig
- partition
- part (Correct answer)
- fdisk
Correct answer: part
The 'part' (or 'partition') directive in a Kickstart file defines disk partitions, but 'part' is the standard short form used.
Question 3: What is the purpose of the /etc/fstab 'dump' field (5th column)?
- Sets mount priority
- Enables filesystem backup via dump utility (Correct answer)
- Defines filesystem type
- Controls journal mode
Correct answer: Enables filesystem backup via dump utility
The 5th field in /etc/fstab is used by the dump utility to determine if the filesystem should be backed up (1=yes, 0=no).
Question 4: Which bootloader configuration file must be updated after adding a new kernel in a GRUB 2 system?
- /boot/grub/grub.cfg
- /etc/grub.conf
- /boot/grub2/grub.cfg (Correct answer)
- /etc/default/grub
Correct answer: /boot/grub2/grub.cfg
On GRUB 2 systems, /boot/grub2/grub.cfg is the active config file, but it should be regenerated with grub2-mkconfig rather than edited directly.
Question 5: Which command verifies the integrity of an RPM package against its installed file list?
- rpm -V packagename (Correct answer)
- rpm -q packagename
- rpm -i packagename
- rpm --check packagename
Correct answer: rpm -V packagename
The 'rpm -V' (verify) command checks installed package files against the RPM database for size, checksum, permissions, and other attributes.
Question 6: A system fails to boot after editing /etc/fstab. Which rescue mode command removes a bad entry without a GUI?
- fdisk /etc/fstab
- vi /etc/fstab after mounting root read-write (Correct answer)
- fsck /etc/fstab
- mount --repair /etc/fstab
Correct answer: vi /etc/fstab after mounting root read-write
In rescue mode, remounting the root filesystem read-write with 'mount -o remount,rw /' then editing /etc/fstab with vi corrects bad entries.
Question 7: Which systemd target is the closest equivalent to SysV runlevel 3?
- rescue.target
- multi-user.target (Correct answer)
- graphical.target
- emergency.target
Correct answer: multi-user.target
multi-user.target corresponds to SysV runlevel 3: full multi-user, network enabled, but no graphical display manager.
Which file in /etc contains the default runlevel for a System V init-based Linux system?