Linux Kernel Is Stuck in Compiling
Compiling a Linux kernel is a delicate process, requiring extensive knowledge of the specific computer on which the kernel will be running and the process of actually initiating the compilation itself. Compiling a kernel requires most of a computer's processing power, so the computer's use can't do anything else until the process is complete. If a kernel's compilation appears to be stuck, the user can check if they need to end the process.
-
Linux Kernel
-
The Linux kernel is the engine that allows every distribution of the Linux operating system to run on a computer. It is a collection of the firmware communicates with all the hardware components, passing data between the operating system and programs that are running on it and the computer's hardware. The Linux foundation releases a standard, precompiled kernel. However, advanced users can choose to compile their own kernels that include only the pieces of firmware they need, for a more efficient system. They can also compile their own kernel to include specialized pieces of firmware that most users do not need.
Compilation Time
-
While advancements in processor speed and efficiency have greatly reduced the amount of time it takes to compile a Linux kernel, it is still a lengthy process. The more firmware components the user includes, the longer the process will take. Even if a user chooses to make certain firmware components modular, and auxiliary addition to the kernel which users can turn on or off, their source code still needs to be compiled.
-
Checking Process Status
-
The standard kernel compilation process will not display every substep it is actively performing. Rather, it will list when it has started and finished working on different kernel components. If the terminal window that belongs to the kernel compilation process has not displayed a new entry in a very long time, the user can open another terminal window and use the "ps aux -all" command to check the state of the process. If the "gcc" process has a "Z" under the "stat" column in the command's output, then the process has frozen and needs to be terminated.
Terminating the Process
-
Before the user moves a compiled kernel into the appropriate system folder and sets the boot loader to use it, the kernel is just another file on the computer. Consequently, terminating the compilation process for a kernel does not harm the Linux system. The user simply needs to restart the compilation process. Users can stop the compilation process by typing the command "kill -9 PID" into another terminal window, where "PID" is the number next to the "gcc" entry when the user issues the "ps aux -all" command.
-