LCA Linux System Installation & Configuration 3 — Questions and Answers
Question 1: Which partition table format supports disks larger than 2TB and more than 4 primary partitions?
- MBR
- GPT (Correct answer)
- BSD disklabel
- APM
Correct answer: GPT
GUID Partition Table (GPT) supports disks over 2TB and allows up to 128 partitions by default, overcoming MBR's limitations.
Question 2: What does the 'noatime' mount option do?
- Prevents file creation timestamps from being set
- Disables updating access timestamps on reads (Correct answer)
- Removes modification times from files
- Stops journaling of time metadata
Correct answer: Disables updating access timestamps on reads
The 'noatime' option prevents the kernel from updating the access time (atime) on every file read, reducing disk write overhead.
Question 3: Which command permanently sets the hostname on a systemd-based Linux system?
- hostname newname
- echo newname > /etc/hostname
- hostnamectl set-hostname newname (Correct answer)
- sysctl kernel.hostname=newname
Correct answer: hostnamectl set-hostname newname
hostnamectl set-hostname writes the hostname to /etc/hostname and updates the running system simultaneously, making the change persistent.
Question 4: During Linux installation, the 'swap' partition is recommended to be at least what size for a system with 8GB RAM when hibernation is required?
- 4 GB
- 8 GB
- 16 GB (Correct answer)
- 2 GB
Correct answer: 16 GB
For hibernation to work, swap must be at least as large as the amount of RAM (8GB) plus some buffer, so 16GB is the safe recommendation.
Question 5: Which file controls which services are started at boot in a systemd system?
- /etc/rc.local
- /etc/systemd/system/default.target.wants/ (Correct answer)
- /etc/init.d/
- /etc/services
Correct answer: /etc/systemd/system/default.target.wants/
Symlinks in /etc/systemd/system/default.target.wants/ (or similar .wants directories) define which units are enabled to start at the default target.
Question 6: Which installer option in Anaconda allows automated network-based installation without user interaction?
- --unattended
- Kickstart (Correct answer)
- preseed
- --auto
Correct answer: Kickstart
Kickstart is Red Hat/Fedora's automated installation system; a Kickstart file specifies all installation parameters, enabling unattended installs.
Question 7: What is the effect of passing 'init=/bin/bash' as a kernel parameter at boot?
- Boots into single-user mode
- Replaces init with a bash shell as PID 1 (Correct answer)
- Starts bash after normal boot completes
- Disables all services and opens bash
Correct answer: Replaces init with a bash shell as PID 1
Passing init=/bin/bash makes the kernel launch /bin/bash as PID 1 instead of systemd/init, providing a root shell for emergency recovery.
Which partition table format supports disks larger than 2TB and more than 4 primary partitions?