Outils pour utilisateurs

Outils du site


issue151:certifie_linux
no way to compare when less than two revisions

Différences

Ci-dessous, les différences entre deux révisions de la page.


Prochaine révision
issue151:certifie_linux [2019/11/30 13:54] – créée auntiee
Ligne 1: Ligne 1:
 +
 +Before we start , here is a new link to test yourself: http://www.penguintutor.com/quiz/index.php
 +
 +Where we are: https://www.lpi.org/our-certifications/exam-201-objectives (Topic 201: The kernel). In your LPIC study guide, mine is the second edition, this will be chapter 3 (pages 94 – 132). If you are using the free book above, it’s chapter 1 (page 15-44).
 +
 +Welcome back learners, and a nod to those “just interested”. 
 +
 +This issue, our study material is short and sweet, yet I urge you to go hands on. (It is actually pages 15-18 in the free book, but I needed to break it up as next lesson is a bit longer).
 +
 +Compiling a kernel is something that rarely gets done any more. Yet it is something you have to know. I got my toes wet the very first time on a Gateway Pentium2 with 256MB memory that needed Gentoo. The experience was such that I can tell you all the details almost 15 years later! Let us start with the older kernels 2.x & 3.x (you should know the numbering from LPIC-1). For the 2.x-branch, I would suggest CentOS 5 or 6, not 7. (Suse doesn’t know where it wants to be with version numbering, so leave it for now). I suggest metal here, adding things, then plugging them in, is just better on metal. Make sure the machine we are going to play on has its BIOS updated beforehand. Lots of vendors supply BIOS updates in windows-only packages. Boo, hiss. 
 +
 +Back To The Future
 +
 +Back to the kernel – and we do not need 1.21 gigawatts either! We need to know where and how. Where to find source code and documentation, and how to apply it. If you have ever installed synaptic package manager and just perused the available packages, you may have seen packages with “-devel” in the name. This usually indicates that you get the source code too. In the kernel, this is the case. Every distribution has its own nuances when it comes to compiling the kernel. You have to know the “.rpm-distros” way, and the “.deb-distros” way. The Arch documentation is actually also very good if you would like to play on your own. 
 +
 +On a “.rpm-based distro”, you can run: yum install kernel-devel, which will pull the sources for you and dump it in: /usr/src/kernels/. Each version of the kernel source will have its own folder, named for the version. To see which is the current source, you can use: uname -a. As for the documentation, this depends on your version of the kernel. If you use the 2.6.x branch, it still needs to be installed separately: yum install kernel-doc. Unlike the source, there is more than one place to find it. There is the place defined by the standard, /usr/src/Linux/, but Suse, CentOS, Mageia, and Red Hat, each have their own hidey-hole. (Looking in /usr/share/doc/ should be your first destination). However, your targets for the exam are Red Hat and Debian and kernels 2.6 and 3.5.
 +
 +Back to the 2.6 branch. If you find the documentation directory, you will notice that it is a whore’s handbag, there is no consistency. In my humble opinion, this is the folder that needs Linus Torvald’s angry rants most. For the exam, you need to be able to find it – looking on an old CentOS machine, it is in /usr/share/doc/kernel-doc-<version.number>/Documentation, and I urge you to go find it yourself.
 +
 +Now on a 3.x kernel system (Ubuntu, my case), you can grab it all with one go: “apt-get source.” The full command being: apt-get source linux-image -<version.number>. If you know a bit about bash scripting, you can substitute the <> part in angle brackets, with $(uname -r) if it is the current one you are looking for, but it will work with other versions too. Navigate to /usr/src/ and look for the linux-headers folder, and inside of that you should find the documentation folder. Now you may ask “what is all this ‘should’ nonsense?” Well, you may find multiple folders here and you need to run uname -a again to find out which one you are using. NEVER assume it is the latest (biggest number) one. 
 +
 +Now you may have done things differently, I know I have, but for the exam, know the stock standard way. 
 +
 +This is basically all you need to know about the documentation. It is really not a lot, but go and do it, that way it will stick. Go grab the documentation for kernel 3.1, then go grab the documentation for kernel 3.3, see what happens in the folders when you do. 
 +
 +Next issue we will look at the kernel components and compression. 
 +
 +If you would like to jump ahead, or test your skills at an LPI exam, do a test paper here: https://www.itexams.com/exam/117-201 (These were once valid LPI questions and will ease you into the format):
 +• The new exam number is 201-400 and 117-201 was the old one.
 +• The site does require signing up, but sign up with temporary email – not your real email.
 +• DO NOT learn these questions parrot fashion, as they are probably not real exam questions.
 +
 +Let us know how you did – good or bad, it does not matter. Good, means you are ready to write and confident in your skills. Bad means you will be learning new stuff!! Yay! There is no down side here. If you do not know why an answer is the way it is, contact us.
  
issue151/certifie_linux.txt · Dernière modification : 2019/12/11 15:22 de andre_domenech