Ceci est une ancienne révision du document !
I always complain when tutors say one thing and do another, you know, like estate agents telling you a one bedroomed closet is “spacious”. So l had better not do the same. Since we are on the topic of LPIC issues, learning is one thing, but getting to grips with the mind of an examiner is another thing completely. Since this is technically the third installment after SAMBA, let’s get a feeling for some ways questions are asked in the exam. I will be pulling from 2022/2023 braindumps, so let’s not get overly excited. I grabbed these from a place trying to sell you other people’s free dumps, so we know the “sample” will be valid stuff to entice you to buy their stolen goods. These will be from the second tier LPIC-2 (450), and I can, maybe, give some insight and practical advice that you can do if you would like to pursue the exam. There will be overlap with LPIC-1, as the one builds on the other. I really like the LPIC exams, I just would not recommend them, as the certifications expire and I have no time for cash-grab schemes. Don’t just learn the questions and answers – there are a few versions of the exam; rather understand the answers, so there are no curve balls. Let’s start with a cracker:
Which commands below are useful to collect data about remote file system connections? (Choose TWO correct answers):
A. pidstat B. nfsiostat C. sadf D. cifsiostat
Answer: BD
Now on Ubuntu and derivatives, you will probably not find manual entries for some of these. The main thing on your mind should be the iostat part. Obviously NFS and CIFS are part of what we are covering, hence why I started with these. Why did I say iostat? Because it displays statistics about read and write operations on file systems – broken down, io = input/output (or read ‘n write if you wish), and stats = statistics. As you can see, they don’t do stupid crap like add bogus commands to confuse you like cifiostat and ntfsiostat, like you would get in other exams. This is why I like LPIC as an exam. The other commands like sadf are real commands, but are not related to the question, eg. pid = process ID and tells you nothing of a remote file system.
On to one I’m not too happy about (OK I hate these), but stare at if for a while:
Due to extreme system use, a Linux system requires some additional swap space. To initialize 5GB of additional swap space, which combination of commands should be used?
A. dd if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; mkswap /tmp/swapfile; mount /tmp/swapfile B. dd if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; swapon /tmp/swapfile C. dd if=/dev/zero of=/tmp/swapfile bs=1024 count=5120000; mkswap /tmp/swapfile; swapon/tmp/swapfile D. touch -5G /tmp/swapfile; swapon /tmp/swapfile E. mkswap /tmp/swapfile 512000; swapon /tmp/swapfile
Answer: C
OK, don’t overthink this one (trying to catch students when you give them little time is a truly nasty practice) while you can make free space or have a drive with free space to make a swapfile on; traditionally when you install Linux, you create a separate partition just for swap (mkswap). With swap files, you don’t need a separate partition any more. You create a file and tell your system to use it as the swap space. With a dedicated swap partition, resizing is a pain. With swap files, you can resize them as you like. D is command swapped, if you were wondering, fallocate is what you were looking for (sudo fallocate -l 5G /swapfile). My advice is to make one on your drive, you can always remove it. Easy. See: https://oracle.com/en/operating-systems/oracle-linux/6/admin/swap-create-use.html
If there are any of these questions you would want us to dive into, or if you just wrote your exam and there is a new question you would like us to discuss, feel free to drop us an email, misc@fullcirclemagazine.org
Just so you guys can see that it (the LPIC exam) is not perfect, here is one of the really useless (microshaft) ones, though it is a ‘gimme’:
On a server running the 3.4.50-11 Linux kernel, which file in the /boot directory contains the kernel configuration parameters?:
A. config-linux-3.4.50-11 B. config-3.4.50-11 C. system-3.4.50-11 D. vmlinuz-3.4.50-11 E. rc.config-3.4.50-11
Answer: B
To me this is like having a screwdriver attachment on a potato peeler, while there is a chance you may use it, you probably won't. I know by now that “config” is where my ‘config’ files are (and if I needed to be sure l’d cd /boot/ to have a look); muddying the waters with config-linux reeks of Microsoft-can’t-ask-questions. I used to teach this and I still could not care, as this does not test knowledge, but it is a filler question because they did not have enough time, or did not have enough practical experience to craft a real question.
However this segues quite nicely into a lesson, let’s quickly give it a once-over.
/boot/config*
This contains the configuration with which the kernel version specified in the file name was built. This is handy if ever you need to re-compile or re-build the same version of the kernel, as the configuration options are kept here.
/boot/initrd*
initrd literally stands for: initial RAM disks. Once the kernel loads, it generally is configured (or passed by the boot loader) the RAM disk’s name to load and mount. The main purpose of the initrd image is to hold modules and drivers that the kernel needs to initialise the rest of the system
/boot/symvers-*
The files in here contain debugging symbols for the modules included with the version of the kernel specified in the file name (like with config*). You might find this useful if you ever need to attach a debugger to your kernel or if a particular kernel module is having serious problems.
/boot/System.map*
These files contain the kernel symbol tables for said version of the kernel they're associated with. A ‘symbol table’ is a list of symbols and the memory addresses that they're associated with.
/boot/vmlinuz-*
The vmlinuz file is the Linux kernel, the heart of the operating system. This, plus the initrd, are the two files that your system needs to be readable and working in order to boot. Without a kernel and the RAM disk associated with that exact version of the kernel, you're probably not going to have a bootable system.
It is GRUB (LILO, SYSLINUX) - the boot loader configuration, that tells the system which kernel and RAM disk to load, and which passes parameters to the kernel, telling it key pieces of information about the system (like where to find the root file system, and which process to execute to begin the system start-up process).
In the real world, I have never (touch wood!) needed to access any of these, but you need to build a kernel at least twice to get to grips with these for most Linux exams. I suggest filing the above somewhere in your meat wallet, just so you know about them.
We can look at more real exam questions in the next exciting issue of FCM.