Linux installation and package management
Installation and package management covers disk layout planning, LVM awareness, the GRUB 2 boot loader, shared libraries, and both the Debian and RPM package toolchains. Objective 102 of LPIC-1 Exam 101-500, worth 18.33% of the exam.
- Share of the exam
- 18.33%
- Questions in a real sitting
- roughly 11 of 60
- Questions in this bank
- 62
- Signed for by a person
- 0
- Machine-checked only
- 62
Partly checked. None of the 62 questions here has been read against the cited source by a person. 62 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
What this objective covers
The 62 questions written for this objective cite 6 LPI exam objectives (102.1, 102.2, 102.3, 102.4, 102.5, 102.6) and 22 manual pages (apt-cache(8), apt-file(1), apt-get(8), bootctl(1), cloud-init(1), dpkg(1), dpkg-deb(1), dpkg-reconfigure(8), grub-install(8), grub-mkconfig(8), hier(7), ld.so(8), ldconfig(8), mount(8), qemu-ga(8), rpm(8), sources.list(5), swapon(8), vgcreate(8), yum(8), yum.conf(5), zypper(8)).
They break down as 43 single-answer questions, 8 choose-several questions and 11 type-the-answer questions.
What this objective is really about
This objective is broad and command-heavy, and it expects you to work in two package ecosystems rather than one. The most reliable revision strategy is to learn the Debian and RPM tools as pairs, because the exam frequently asks for the equivalent of a command you already know.
Disk layout and GRUB 2
The reason to give a directory its own filesystem is fault isolation. Variable data that grows unpredictably — logs, mail spools, print queues, package caches — lives under /var, which is why /var is the classic separate filesystem on a server: runaway growth fills only that filesystem and leaves root writable. The tradeoff is that space stranded in one filesystem cannot be borrowed by another unless LVM is managing the volumes.
LVM runs bottom-up: pvcreate labels a partition or disk as a physical volume, vgcreate pools physical volumes into a volume group, lvcreate carves logical volumes out of the group, and you run mkfs on the logical volume. LVM buys flexibility — online resizing, moving data between physical volumes, snapshots — and not redundancy. Plain LVM has none.
GRUB 2 splits into inputs you edit and an output that is generated. You edit /etc/default/grub and the scripts under /etc/grub.d, then regenerate /boot/grub/grub.cfg with grub-mkconfig -o (update-grub on Debian, grub2-mkconfig on Red Hat family). Editing grub.cfg directly works until the next kernel update silently overwrites it. Separately, grub-install writes the boot loader itself onto a device — that is the command for a replaced disk, and it is not what regenerates the menu.
Shared libraries and packages
The dynamic linker reads a compiled cache, /etc/ld.so.cache, not the text configuration in /etc/ld.so.conf and /etc/ld.so.conf.d. That single fact explains why adding a directory has no effect until you run ldconfig. ldd reports what a binary depends on and what each dependency currently resolves to, printing "not found" for the missing ones. LD_LIBRARY_PATH adds search directories for one process and its children, which is the right tool for testing against a private build without changing anything system-wide.
On the Debian side, dpkg operates on .deb files already on disk and does no dependency resolution — it reports unmet dependencies and stops, and the standard recovery is apt-get -f install. apt and apt-get work from repository metadata and resolve dependencies. apt-cache is query-only: search finds candidates by pattern, show prints one package's record. Repositories are configured in /etc/apt/sources.list and files under /etc/apt/sources.list.d.
On the RPM side, the three installation modes differ only in what they do about the current state: -i installs and fails if the package is present, -U upgrades or installs, -F upgrades only if already installed. Query mode is -q with a letter after it: -qf names the package owning a file, -ql lists a package's files, -qi prints metadata, -qa lists everything installed, and -p makes the query act on a package file rather than the installed database. The repository-aware tools dnf and yum can answer about packages that are not installed, which rpm cannot — dnf provides is the counterpart of rpm -qf.
Lessons in this objective
The objective cut into the pieces the blueprint declares. Each one has the material written out and the questions that test it.
- Planning a disk layout
- Installing and configuring a boot manager
- Shared libraries and the dynamic linker
- Debian package management
- RPM and DNF package management, and virtual guests
- Running Linux as a virtualization guest
Drill this objective
The trainer can run a short practice set drawn from this objective alone, which is what the weight column above is for: revise the heavy objectives first.
Practise Linux installation and package management
Questions on this objective (page 1 of 4)
- A mail server keeps filling its root filesystem because spooled mail and logs grow without bound, and when the disk fills the whole system becomes unusable. Which single change to the disk layout most directly contains that failure? machine-checked
- In LVM terminology, which object is created directly on a partition or whole disk so that its storage can be added to a pool? machine-checked
- You are laying out storage for a general-purpose Linux server. Which TWO of the following are genuine reasons to use LVM for the data filesystems rather than plain partitions? machine-checked
- Which file is the configuration file that GRUB 2 generates, and which administrators are told not to edit by hand on a typical Linux distribution? machine-checked
- You replaced the boot disk in a BIOS/MBR system and need to write the GRUB 2 boot loader into the master boot record of /dev/sda, installing the required GRUB modules under /boot. Which command does that? machine-checked
- On a GRUB 2 system whose configuration file is /boot/grub/grub.cfg, type the grub-mkconfig command — including the option and its argument — that regenerates that file. machine-checked
- A GRUB menu entry ends with the directives 'set root=(hd0,3)' followed by 'chainloader +1'. What is GRUB doing? machine-checked
- You want every future boot of a GRUB 2 system to pass an extra kernel parameter, and you want the change to survive the next kernel update. Which file do you edit before regenerating the configuration? machine-checked
- A program fails to start with an error about a missing shared object. Type the command that prints the shared libraries the binary /usr/bin/ssh depends on, and shows which file each one currently resolves to. machine-checked
- You installed a vendor application whose shared libraries live in /opt/vendor/lib. You added a line containing that directory to /etc/ld.so.conf.d/vendor.conf, but programs still cannot find the libraries. What is the missing step? machine-checked
- You have just edited /etc/ld.so.conf.d/local.conf to add a library directory. Type the command (no options or arguments) that rebuilds the dynamic linker cache so the change takes effect system-wide. machine-checked
- A developer wants to test a single program against a private build of a library in ~/testlib, without changing anything system-wide or affecting other users. What is the appropriate mechanism? machine-checked
- On a Debian system you have downloaded a single .deb file that is not in any configured repository, and you want to install it. Which command is designed for that job? machine-checked
- Type the command that installs the already-downloaded Debian package file /tmp/htop_3.0.5_amd64.deb using the low-level Debian package tool (not apt). machine-checked
- You know you want a Debian package for reading PDF files but you do not know any package's name. Which command searches package names and descriptions in the local package index for the word 'pdf'? machine-checked
- Select the TWO statements that correctly describe Debian package management on a standard system. machine-checked
- On an RPM-based system you have a set of .rpm files and you want to upgrade only those packages that are already installed, leaving the rest untouched. Which rpm option does exactly that? machine-checked
- On an RPM-based system, type the rpm command that reports which installed package owns the file /usr/bin/ssh. machine-checked
- You need to pull one configuration file out of an .rpm package without installing the package. Which approach works? machine-checked
- On a Red Hat family system using dnf, which command finds out which package provides the command /usr/bin/semanage, including packages that are not yet installed? machine-checked
Practise Linux installation and package management
The other objectives in LPIC-1 Exam 101-500
- 101. System architecture — 13.33% of the exam
- 103. GNU and Unix commands — 43.33% of the exam
- 104. Devices, Linux filesystems, filesystem hierarchy standard — 25% of the exam