Linux Kernel Compilation

Compilation In computer programming, the translation of source code into object code by a compiler. Wikipedia

Uname Command

Print system information

Print all information

user@workstation:~$ uname -a
Linux kali 4.12.0-kali2-amd64 #1 SMP Debian 4.12.13-1kali2 (2017-10-03) x86_64 GNU/Linux

Print the Kernel Release

user@workstation:~$ uname -r
4.12.0-kali2-amd64

/boot Directory

This directory contains everything required for the boot process except for configuration files not needed at boot time (the most notable of those being those that belong to the GRUB boot-loader) and the map installer. LDP Linux Filesystem Hierarchy /boot

user@workstation:~$ cd /boot/
user@workstation:~/boot$
user@workstation:~/boot$ ls
config-4.12.0-kali1-amd64      initrd.img-4.12.0-kali2-amd64  vmlinuz-4.12.0-kali1-amd64
config-4.12.0-kali2-amd64      initrd.img-4.15.0-kali1-amd64  vmlinuz-4.12.0-kali2-amd64
config-4.15.0-kali1-amd64      System.map-4.12.0-kali1-amd64  vmlinuz-4.15.0-kali1-amd64
grub                           System.map-4.12.0-kali2-amd64
initrd.img-4.12.0-kali1-amd64  System.map-4.15.0-kali1-amd64

config

Installed kernel configuration

initrd

In computing, initrd (initial ramdisk) is a scheme for loading a temporary root file system into memory, which may be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted. Wikipedia

System

In Linux, the System.map file is a symbol table used by the kernel. A symbol table is a look-up between symbol names and their addresses in memory. A symbol name may be the name of a variable or the name of a function. The System.map is required when the address of a symbol name, or the symbol name of an address, is needed. It is especially useful for debugging kernel panics and kernel oopses. The kernel does the address-to-name translation itself when CONFIG_KALLSYMS is enabled so that tools like ksymoops are not required. Wikipedia

Vmlinuz

On Linux systems, vmlinux is a statically linked executable file that contains the Linux kernel in one of the object file formats supported by Linux, which includes ELF, COFF and a.out. The vmlinux file might be required for kernel debugging, symbol table generation or other operations, but must be made bootable before being used as an operating system kernel by adding a multiboot header, bootsector and setup routines. Wikipedia

/lib/modules/ Directory

The /lib directory contains kernel modules and those shared library images (the C programming code library) needed to boot the system and run the commands in the root filesystem. LDP Linux Filesystem Hierarchy /lib

/usr/src Directory

Mainline

Configuration Setup

Compilation Kernel and Modules

Installation Modules

Installation Kernel

Uname

Reboot your workstation and confirm the new version has been installed, print the Kernel Release

Last updated