Linux Boot Process 2 — Questions and Answers
Question 1: Which systemd target is the equivalent of the traditional SysVinit runlevel 3?
- graphical.target
- multi-user.target (Correct answer)
- rescue.target
- network.target
Correct answer: multi-user.target
multi-user.target corresponds to runlevel 3 — multi-user, non-graphical mode.
Question 2: What is the purpose of the initramfs (initial RAM filesystem) during the Linux boot process?
- To store the bootloader configuration
- To provide a temporary root filesystem so the kernel can mount the real root (Correct answer)
- To load the BIOS firmware
- To initialize network interfaces before the kernel starts
Correct answer: To provide a temporary root filesystem so the kernel can mount the real root
initramfs provides a temporary root filesystem in RAM that contains tools needed to mount the actual root filesystem.
Question 3: Which command displays the systemd boot log from the current boot session?
- dmesg -b
- journalctl -b (Correct answer)
- systemctl log --boot
- bootlog --current
Correct answer: journalctl -b
journalctl -b shows log entries from the current boot; -b 0 is implicit for the latest boot.
Question 4: In GRUB2, which file is the primary human-editable configuration file on most Linux distributions?
- /boot/grub2/grub.cfg
- /etc/default/grub (Correct answer)
- /etc/grub2.conf
- /boot/grub/menu.lst
Correct answer: /etc/default/grub
/etc/default/grub holds user-editable settings; grub.cfg is auto-generated from it via grub2-mkconfig.
Question 5: What does the kernel parameter 'rd.break' do when added to the boot command line?
- Skips loading network drivers
- Drops to a shell just before the real root is switched to (Correct answer)
- Forces the kernel into single-user mode
- Disables SELinux enforcement during boot
Correct answer: Drops to a shell just before the real root is switched to
rd.break breaks into a dracut/initramfs shell just before the switch_root call, useful for emergency root password recovery.
Question 6: Which systemd unit type is responsible for mounting filesystems during boot?
- .service
- .socket
- .mount (Correct answer)
- .path
Correct answer: .mount
.mount units correspond to filesystem mount points and are generated from /etc/fstab entries.
Question 7: What is the default behavior of GRUB2 when no kernel is selected during the timeout?
- It reboots the system
- It boots into rescue mode
- It boots the default (first highlighted) menu entry (Correct answer)
- It halts and waits indefinitely
Correct answer: It boots the default (first highlighted) menu entry
GRUB2 automatically boots the default entry once the timeout expires, which is typically the first or most recent kernel.
Which systemd target is the equivalent of the traditional SysVinit runlevel 3?