Main Parts of a Linux Machine

Part of the power of Linux is that if you want to accomplish something in computing terms, you can do it with Linux. This is not to say that you can’t accomplish things with other OSs (Operating Systems), but it can be much easier to figure out, and accomplished more quickly with Linux than with other OSs.

Main Parts of Linux OS & Computer:

Software:
BIOS
     Basic Input/Output System (BIOS) software is known as firmware. It is the thing that starts hardware processes during the boot phase when starting a computer. It keeps runtime services for the OS and programs functional. BIOS software is the first software that runs when turning the power of a computer on. It also provides an abstract layer for hardware to communicate with software. There is another concept directly related to BIOS called the Unified Extensible Firmware Interface (UEFI.) Technically speaking, BIOS software is a sort of operating system that loads in order to handle low level tasks for the computer. 1 megabyte (MB) is the standard (or used to be) the amount of memory for the BIOS. Most BIOS systems are only able to allow 16-bit instruction, and support a Master Boot System (MBR) with a maximum of 2 terabytes (TB) of memory with only 4 partitions. The new UEFI allows up to 128 partitions and a maximum of 8 zettabytes (ZB) of harddisk (HDD) space. This is equivalent to 8 trillion gigabytes (GB). A hurdle that some Linux users may have to overcome is that they might have to manually add a new key to the UEFI database in order to install an OS. Adding a new key to a UEFI allows for what is known as a Secure Boot. Ubuntu has specific Secure Boot instructions. If you are working with more obscure versions of Linux you may want to check out more general guidance about how to make UEFI Secure Boot work for you.

Locking Down the BIOS?:
While setting an Administrator password in the BIOS will prevent people from enabling other hardware to boot from, it is easy to bypass if someone is determined to do so. If you are going to take this step, please also find a way to make it physically difficult for someone to open the computer case and/or access the motherboard of the machine. Most computers still require a CR2032 battery to power the CMOS. Computer Users who understand what it takes to boot from their USB, SSD, or Optical Drive know how to reach the motherboard’s battery that powers the BIOS. Removing this battery long enough will reset the BIOS and allow someone access. Often a jumper can be used to reset the BIOS as well. Another way for someone to affect the BIOS / Boot order of the machine is with a rootkit or user level software designed to allow access to BIOS functions. It is also possible to brute force into BIOS remotely if someone is determined. As it turns out, there are powerful viruses in the wild that can affect BIOS, but perhaps only compromising 32bit systems at this time. Who knows? Perhaps you like the idea of hacking your own BIOS. You could join a community of other BIOS hackers to learn some wonderful options about securing your BIOS. If you are wondering about the effects of running your computer without the CMOS battery take a look at these articles:

Seemingly unrelated fact:
The 2005 storm named Zeta broke a record as being the 28th named hurricane of the year in 2005. That was 7 more storms than the previous record made in 1933. This was the same year the famous Hurricane Katrina rocked New Orleans. Perhaps this is an indication that a “data/zeta storm is coming?”

BIOS Mod’ing:

Kernel
The Kernel communicates directly with computer hardware. This is what allows your keyboard and mouse to do what they do. Monitors, hard-drives, video cards, printers, and all sorts of things rely on the kernel. The kernel provides a layer between higher level programming and hardware. Code for a kernel or driver would require what is considered low level programming in contrast to something like Java for a video game server, or JavaScript for a website. Most kernel software is written in C. Types of kernels are Monolithic, Micro, Exo and Hybrid. The history of the Exokernel is interesting with its roots firmly planted at MIT in Cambridge just outside of Boston. Kernels can be specific for the operating systems they will support: Solaris, BSD, Linux, etc.. One neat aspect of the Kernel is that it is possible to specify precisely which hardware you want to use and compile the kernel to work exclusively with the hardware on your machine. Doing this would render that version of your kernel useless on any machine that did not have the exact same hardware. It would also make it very difficult to diagnose and fix your machine if it stopped working properly. The benefit of doing this would be that it would take far less time to boot the system and load all the supporting software that allows the hardware to do what it does. A main reason for compiling your own kernel is if you want to use hardware that is not supported by the OSs standard kernel. There is a chance that you can solve your problem more easily by finding the right drivers rather than messing with the kernel. To continue learning about the kernel, look into Linux-header packages. Another good reason to compile your own kernel is so that you can learn a lot about how Linux works.

It is worth noting that kernels of different types have common elements. In addition to listing the main sections, check out this really cool interactive map of a Linux Kernel or you can download it for free:

For comic relief, you may wish to view the official names of Linux Kernel Distributions. My personal favorite is version 2.6.30-rc4–2.6.30-rc6 known as Vindictive Armadillo. A close second is version 2.6.20-rc2–2.6.20– known as Homicidal Dwarf Hamster. Also quite funny is Linus Torvalds’ rant aimed at Andy Tanenbaum in early 1992. Of other importance, it is worth noting that Linus Torvalds is back to maintaining the Linux Kernel.

Kernel Mode
x86 CPU hardware provides for 4 levels of protection. Ring zero is Kernel Mode, while Ring 4 is User Mode. Considering the notion that the CPU hardware needs protection at all is worth a moment of reflection. Perhaps you think you know the difference between a Computer Virus and Malware. Kernel developers would beg to differ. Definitions of such things are getting blurred across all lines of defense. Some people even publish how to modify permissions to create Kernel Exploits. Katrina LaCurts at MIT has some solutions for this problem, but the development is not absolute. Suffice to say that this is a ripe area for development on all fronts. There is a lot of value that comes with computing permission on a large scale. If you decide to dive into the seedy world of kernel hacking, Proceed With Caution. << For this last link: advance through the website by modifying the numbers in the address bar rather than the “next” link at the bottom left of the pages.
User Mode
The less privileged mode or the 4th ring of the protection levels of your computer is where most of your software runs. Software, hacks, and exploits written for the User Mode have to be more discrete, or tactfully written so as to be less obvious to the actual user of the machine. If the software causes failures in the system, they will not cause the OS to crash in most cases. The trick with this level is hiding the fact that the software is running at all.

Kernel Modules
Kernel Modules load after the core kernel starts. Much of the functionality of the Linux OS is compiled as part of the Kernel, but many of these functions are performed by Kernel Modules that are loaded afterwards and are not considered native to the kernel code. One important distinction between drivers and kernel modules is that kernel modules add functionality to parts of the system that may not be considered hardware. Kernel modules can add functionality to ipv4, ipv6, security, and more.
Drivers
Drivers relate exclusively to hardware. They allow the software (which is running in RAM) to communicate with hardware to accomplish everything you may want to do on a computer. Drivers can exist in userspace, in kernel, or loaded as a module. Some drivers operate in multiple of these spaces at the same time.

System Library
The LSB is a standard that dramatically reduces costs to develop software for the many different distributions of Linux OSs. If you want to write code, or modify code that is run on any version of Linux, read about LSB and become familiar with the Charter. The different libraries throughout Linux serve different purposes. To understand them better you may want to look into Hooking DLL Injection though a conceptual overview can help before beginning software development. Of primary importance for the purpose of this article: understanding system calls will help you know how to change between execution mode of a program from user mode to kernel mode.

System Utility
System Utility is otherwise known as System Software is designed to provide services to other software like the operating system, game engines, or SaaS thin client software. If you are unfamiliar with the Thin Client concept, it’s worth understanding zero clients, thin clients, VDI, and … in terms of virtualization and how it can be utilized in a user environment.

Finally I will end this article with some intriguing machines that run Linux or other odd OSs.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s