Summary: This article is to tell you how a computer starts, works, what kind of problems may take place during the whole process, and how to react with those problems. By the way, this article is oriented toward those unprofessional Windows/Mac users but who have an interest exploring the myth of the computer and will just tell you the computer working principles instead of the concrete solutions.
Intro: When the Windows/Mac users are confronted with trouble and hurry to use the wrong methods to reply the trouble due to lack of basic computer starting and working knowledge, much more trouble is thought to be showing up.
So, we have to admit that it is important to master the basic knowledge of how a computer starts and works.
How does a computer generally start and work?
The computer gets started through POST (power-on-self-test), system boot, kernel boot, and system initialization. After the computer gets started, the computer is going to work through the joint force of hardware, software, and algorithm (binary system/hexadecimal).
1.The booting process of a Windows computer.
1.1. Pre-boot (preparation for booting)
① The POST will automatically be held to check the information on the motherboard, CPU, storage devices, and other hardware.
What is the POST and what's the use of the POST?
The BIOS producers give each hardware a specific POST code, and each hardware has its own alarm sound. Before the hardware is tested, the POST code of the hardware will be written into the 80H diagnosis port. If the being tested one passes the test, then will go ahead the next one; If it doesn't, then the test procedure will be stopped with the settled alarm sound on. We can tell where the fault lies in through the alarm sound.
The BIOS booting system is giving its future to the UEFI booting system.
POST is run both in the BIOS booting system and the UEFI booting system. But, POST in the latter is much more efficient and safer than the former for a range of reasons. Thus, the advantages of the new ruler have been standing out itself in stark contrast with the devastated old-fashioned booting system. To some extent, the UEFI booting system is the updated version of the BIOS booting system.
The old-fashioned BIOS booting system:
1）It still runs in 16 bit that has been out of date years ago, which leads to its low exploiting efficiency.
2）It only has 1MB address space and doesn't support addressing boot if the target place is over 2TB.
3）Its stubborn code has barely changed all those decades, making its extensibility poor.
4）It considers nothing about security when the executable code runs.
5）It can't execute the basic input and output consistently and waste no little money and time at all.
The new ruler - UEFI booting system:
1) Its address space is more flexible.
2) It is compatible with any existing operating system.
3) It is easier to maintain and develop the hardware.
4) It has a humanizing, pictured, and mouse-controlled interface.
5) It runs in 32/64 bit, and therefore it can surpass the addressing ability of the BIOS booting system embracing the near future when the CPU will have be beyond our imagination.
For these reasons, POST in the two booting systems has different reactions in the process. By the way, POST is held only in cold boot mode. In warm boot mode, this stage will be skipped.
② Locate the proper boot device and load its MBR.
MBR is important:
Its full name is Main Boot Record. Narrowly speaking, it is a paragraph of boot code (located in the first sector in a disk). Generally speaking, it is a sector (which covers the paragraph of the boot code in the first sector in a disk). It is used to check whether the partition information is illegal and locate the partition boot record. If the MBR of your computer's booting device is damaged, then your computer cannot even startup.
Some common problems in this booting stage:
I. Hardware configuration error.
Scene 1: Memory problem.
1) The system halted for running out of the RAM.
2) Unable to detect the signal for ORM damaged.
3) The memory bank is not compatible with the computer.
If your disk is damaged, then it would be impossible for you to start up your computer.
II: NTLDR is missing.
It's mostly because the NTLDR is deleted/killed by the virus, or the file system is broken.
III: Boot device not found.
Its occurrence means the boot device is broken or lost.
Solution: Check if your HDD/external USB drive/optical disk is damaged or falls in the connecting problem. If you want to know more about this, then refer to this article, [Solved] Boot Device Not Found at Startup.
1.2. Initialize CPU, memory and search for the boot device
① Initialize the bootloader.
② Select an operating system.
③ Check the hardware.
④ Choose the hardware configuration profile.
Some common problems in this booting stage: Boot volume is unmountable.
If your computer feeds you back a blue screen error like this,
then it's likely to be that the volume where lives the operating system profiles can't be recognized.
If you want to know more, you can look up at this article, Easily Fix Unmountable Boot Volume Error.
1.3. Load the kernel components
① Load the Ntoskrnl.exe.
② Load the hardware abstraction layer (hal.dll).
③ Load the Registry keys.
Loading the Ntoskrnl.exe is the first big deal
Short for "Windows NT operating system kernel executable", also known as "kernel image", Ntoskrnl.exe provides the kernel and executive layers of the Microsoft Windows NT kernel space and is responsible for various system services, such as hardware abstraction, process, and memory management, thus making it a fundamental part of the system. It contains the cache manager, the executive, the kernel, the security reference monitor, the memory manager, and the scheduler.
Loading the hardware abstraction layer is also fatal
1) It can overlook the wrong or invalid Hardware Calls. The existence of the hardware abstraction layer is something like a filter between the hardware and the operating system kernel, and it will filter out all the error or hardware calls that may bring about to the operating system.
2) It can play as a translator on multiple platforms. The translator, hardware abstraction layer can get all various hardware languages, and translate them into a common language that can make across different operating systems.
1.4. Initialize the kernel components
The rotary movement won't stop till the four steps are completed within this stage:
① Establish the real-time hardware Registry keys based on the information obtained earlier.
② Backup the contents in Control Set.
③ Load and initialize the driver.
During step ③, the kernel will at the very beginning load the underlying device drivers before it gets initialized, and then the kernel will search for all the device drivers whose start key value are "1" as well as some device drivers whose key values may not be "1" but are necessary for the computer, like the network driver, hard disk driver, file system driver, system bus driver, etc. These device drivers will be initialized the moment they are loaded, and if there shows up any error, the kernel will dispose that through the key values of the ErrorControl.
There are four kinds of the key values of the ErrorControl.
0 ➔ Omit: continue to boot, no error information will be given.
1 ➔ Normal: continue to boot, show the error information.
2 ➔ Recover: stop booting, and use the Last Known Good Configuration to reboot the operating system. If it is the same consequence when another time has been tried, then, omit.
3 ➔ Severe: stop booting, use the Last Known Good Configuration to reboot the operating system. If it is the same consequence when another time has been tried, then, stop booting and shows up an error message.
④ Start service.
During step ④, after the kernel has been successfully loaded and all the underlying device drivers have been initialized, the session manager will start the high-level services and subsystems, and then start the Win32 subsystem that can control all the I/O devices and be accessible to the display equipment. Next, comes out the Windows graphical interface, and the keyboard or other I/O equipment is to be available. The users can log in right after the session manager starts the winlogon.exe.
Some common problems in this booting stage: Blue screen (please attention that reasons for the blue screen can be quite different).
Reason 1: Software incompatibility.
Solution: Remove the compatible software that has been installed in Safe Mode.
Reason 2: Virus attack.
1) Use third-party tools, like Kaspersky, to kill the virus.
2) Use the Process Explorer to monitor and forcibly end the hostile process.
Tips: Except for the Last Known Good Configuration, you can use 3 other built-in tools to survive, which are:
1) Safe Mode.
2) Driver load in Safe Mode.
3) Recovery Console (including bootcfg, chkdsk, etc).
1.4. The last step: log in the operating system and work with it
During this stage, the winlogon.exe process will start up the Local Security Authority Subsystem, after that, there will be a welcome screen or a login screen, and then you can get into the Windows desktop.
Note: The operating system is to scan the registry one more time after the user logs in and find as well as start all the non-critical services whose key value is no less than "2".
Some common problems in this booting stage: Fail to log in.
Reason 1: The user forgets the password.
1) Set a new password by answering your security questions.
2) Reset the password by removing everything (all data to be lost).
Reason 2: User profile configuration error.
Solution: Set the computer back to the Last Known Good Configuration.
Note: Non-critical services are loaded before the login process, and the loading priority of them can be adjusted in the registry by adjusting the key values Of the services.
The booting process of a Mac computer.
As both Windows and Mac computers have most of the same booting process, thus the booting process of a Mac computer will be simplified.
Similarly, there are 7 stages to boot a Mac, which are:
① Power on.
② Run the code in the firmware, collect information on the hardware and start to initialize them.
③ Set the boot order.
④ Hand over the control to /System/Library/CoreServices/BootX.
⑤ BootX loads the kernel.
⑥ The kernel gets initialized and load all kinds of data structure and I/O devices.
⑦ Login window pops up, the user logs in and enters the desktop interface.
Some common problems during the Mac computer booting process:
I. Stuck on the loading bar.
II. Black screen.
Solution: Fix MacBook & iMac Black Screen of Death.
III. Stuck on the login screen.
Solution: Mac Stuck on Login Screen, How to Fix?
Click for more detailed information on the common Mac not booting problems.
3. After the booting process, how does a computer work?
① A computer inputs all the to-be-handled information, which originally comes from the software, into itself through input devices (keyboard, mouse, etc).
② Then the CPU (which consists of a control unit, an arithmetic logic unit, and a memory unit) will process the input information.
③ Finally the output device (screen, printer, etc) will show the result of the processed information to us.
What's the relationship among hardware, software, and algorithm?
It's like that in a factory: the hardware provides the venue, the software provides the tools and the algorithm provides the manufacture methods.
Ending: Sincerely hope that you can be dependent in the field of computer booting after you have read this article. We would like to offer more original articles about data recovery and computer working principles. It'll be so much kind of you if you can send your valuable advice to us at our mailbox, [email protected] Thanks for every second that you stay with us.