Book: LPI Linux Certification in a Nutshell Section: Chapter 22. Exam 102 Review Questions and Exercises
1. ### 22.2 Linux Installation and Package Management ( Topic 2.2) #### 22.2.1 Review Questions Why is it beneficial to keep the root partition relatively small? Why is the /var directory usually located in a partition of its own? As a system administrator for a network with many workstations and a central NFS file server, how can you safely share /usr with your users while still maintaining control of its contents? Describe how a tarball is made and how its contents are extracted. In general terms, describe the procedure used to compile and install free or open source software from source code. What is a shared library? How can you determine what library dependencies exist in a compiled executable? Briefly describe the major functional modes of RPM. Why might a Debian Linux administrator use dpkg -iG instead of simply dpkg -i to install a package? #### 22.2.2 Exercises ##### 22.2.2.1 Exercise 2.2-1: Disk layout In a shell, examine your disk layout using cfdisk or fdisk. For example:
       # fdisk
       Command (m for help): p

       Disk /dev/sda: 255 heads, 63 sectors, 1109 cylinders
       Units = cylinders of 16065 * 512 bytes

          Device Boot    Start       End    Blocks   Id  System
       /dev/sda1             1        51    409626   83  Linux
       /dev/sda2            52      1109   8498385    5  Extended
       /dev/sda5            52        90    313236   83  Linux
       /dev/sda6            91        97     56196   83  Linux
       /dev/sda7            98       136    313236   83  Linux
       /dev/sda8           137       264   1028128+  83  Linux
       /dev/sda9           265       519   2048256   83  Linux
       /dev/sda10          520       532    104391   83  Linux
       /dev/sda11          533       545    104391   82  Linux swap
       /dev/sda12          546      1109   4530298+  83  Linux
5. Is the entire disk consumed by the existing filesystems? Examine how system directories are mapped to disk partitions on your system. Are /var and /tmp in their own partitions? Is /boot in its own partition within cylinder 1024? Is the root filesystem relatively small? Where is LILO installed on your system? If it is installed in the boot sector, does your configuration allow for multiple boot scenarios? If it is installed in the root partition, is it within the first 1024 cylinders? Locate a tarball (from freshmeat.net, for example), and install it on your system with the following steps: Unpack it using tar xzvf file. Configure with ./configure. Build the software using make as directed in the documentation. Install the software using the instructions provided. Were there any difficulties with this procedure? Use ldd to examine library dependencies of executable programs on your system. For example:
       # ldd `which xterm`
          libXaw.so.7 => /usr/X11R6/lib/libXaw.so.7 (0x40019000)
          libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x4006a000)
          libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x4007e000)
          libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x400c7000)
          libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x400d0000)
          libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x400e6000)
          libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x400f4000)
          libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40101000)
          libncurses.so.4 => /usr/lib/libncurses.so.4 (0x401c4000)
          libc.so.6 => /lib/libc.so.6 (0x40201000)
          /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Using a system that utilizes dpkg, obtain a list of all packages installed under dpkg management with dpkg -l | less. Find a package in the list that looks unfamiliar, and query information about the package using dpkg -s pkg_name. Using a system that utilizes RPM, obtain a list of all packages installed under RPM management with rpm -qa | less. Find a package in the list that looks unfamiliar, and query information about the package using rpm -qi pkg_name.