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.

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)

Practise Linux installation and package management

The other objectives in LPIC-1 Exam 101-500