LPIC 2 Certification
Total Page:16
File Type:pdf, Size:1020Kb
LPIC 2 Certification Henk Klöpping Preface This book reflects the efforts of a number of experienced Linux professionals to prepare for the LPIC-2 beta-exam. It is -- and always will be -- a work in progress. The authors previously obtained LPIC-1 levels, and wanted to participate in the beta-exam for various reasons: to help LPI with their beta-testing, to learn from it and to help others to pass the exam. And, last but not least: for the fun of it. In my opinion, one of the most important mile stones set in the Linux world is the possibility for certifying our skills. Admittedly, you do not need certification to write Open Source software or Open Source documentation - your peers certainly will not ask for a certificate, but will judge you by your work. But Linux is not just a nice toy for software-engineers. It has always been a very stable and trustworthy operating system - even more so in comparison with it's closed-source alternatives. Driven by closed source vendors' questionable license policies, security risks, bugs and vendor-lock, more and more IT-managers choose the Linux alternative. Though it's perfectly feasible to out-source system management for Linux systems - a lot of major and minor players support Linux nowadays and Linux is stable as a rock - a large number of companies prefer hiring their own sysadmins. Alas, most recruiters would not know a Linux admin if he fell on them. These recruiters need a way to certify the skills of their candidates. And the candidates need a way to prove their skills, both to themselves and to the recruiter. A number of organizations offer Linux certification. Some of them are commercial organizations, that both certify and educate. Some of them certainly do a fine job - but I sincerely believe certification organizations should be independent, especially from educational organizations. The Linux Professional Institute fulfills these prerequisites. They also are a part of our community. Support them. The first drafts of this book were written by a limited amount of people. We had limited time: we were offered the opportunity to do beta-exams in August 2001 and had to take the exam in September. Therefore, above all the authors had to prove to be good at cutting and pasting other peoples work. It is up to you to judge our efforts, and, hopefully, improve our work. To the many people we unintentionally forgot to give credit where due, from the bottom of our hearts: we thank you. Henk Klöpping, September 2001 - 2 - Contents Henk Klöpping .................................................................................................................. 1 Preface ................................................................................................................................. 2 Contents .............................................................................................................................. 3 Chapter 1. Linux Kernel (2.201) .................................................................................13 Topics ................................................................................................................................ 13 Kernel Components (2.201.1) ........................................................................................ 14 Different types of kernel images ................................................................................ 14 Note ............................................................................................................................ 14 Identifying stable and development kernels and patches .......................................... 14 Using kernel modules ................................................................................................ 15 Compiling a Kernel (2.201.2) ......................................................................................... 23 Getting the kernel sources .......................................................................................... 24 Creating a .config file ................................................................................................ 24 Note ............................................................................................................................ 27 Note ............................................................................................................................ 27 Compiling the kernel .................................................................................................. 27 Installing the new kernel ............................................................................................ 28 Note ............................................................................................................................ 30 mkinitrd ...................................................................................................................... 31 Patching a Kernel (2.201.3) ............................................................................................ 36 Patching a kernel ........................................................................................................ 36 Removing a kernel patch from a production kernel ................................................... 37 Customizing a Kernel (2.201.4) ..................................................................................... 38 kmod versus kerneld .................................................................................................. 39 Chapter 2. System Startup (2.202)................................................................................41 Customizing system startup and boot processes (2.202.1) ........................................ 42 The Linux Boot process ............................................................................................ 42 What happens next, what does /sbin/init do? ............................................................ 46 System recovery (2.202.2) .............................................................................................. 52 Influencing the regular boot process ......................................................................... 52 The Rescue Boot process .......................................................................................... 55 Chapter 3. Filesystem (2.203).........................................................................................57 Operating The Linux Filesystem (2.203.1) ................................................................... 58 The File Hierarchy ..................................................................................................... 58 Filesystems ................................................................................................................. 59 Important .................................................................................................................... 59 Creating Filesystems .................................................................................................. 60 Mounting and Unmounting ........................................................................................ 60 Swap ........................................................................................................................... 63 Maintaining a Linux Filesystem (2.203.2) .................................................................... 64 fsck (fsck.e2fs) ........................................................................................................... 65 tune2fs ........................................................................................................................ 67 dumpe2fs .................................................................................................................... 68 - 3 - badblocks ................................................................................................................... 69 debugfs ....................................................................................................................... 69 Creating And Configuring Filesystem Options (2.203.3) .......................................... 70 Autofs and automounter ............................................................................................. 70 CD-ROM filesystem .................................................................................................. 71 Chapter 4. Hardware (2.204).........................................................................................75 Configuring RAID (2.204.1) ........................................................................................... 76 What is RAID? ........................................................................................................... 76 RAID levels ............................................................................................................... 76 Hardware RAID ......................................................................................................... 77 Software RAID .......................................................................................................... 78 Configuring RAID (using mkraid and raidstart) ........................................................ 78 mkraid ........................................................................................................................ 79 Persistent superblocks ................................................................................................ 79 /etc/raidtab .................................................................................................................