In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to boot Linux to start bootstrap. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Turning on the computer is a mysterious process. We just press the boot button and see a progress bar or line by line of output on the screen until we reach the login screen. However, booting the computer is an extremely fragile process, and our desired login interface may not appear, but a command line or error message. Understanding the process of booting the computer will help us to fix the problems that may occur when we start up.
Initial stage
When we power on the computer, the computer will automatically read the stored programs from the BIOS (Basic Input/Output System) of the motherboard. This program usually knows some hardware directly connected to the motherboard (hard disk, network interface, keyboard, serial port, parallel port). Most BIOS now allow you to start your computer from a floppy disk, CD-ROM, or hard disk.
Next, the computer will read the initial 512 bytes from the storage device of your choice (for example, 512 bytes as soon as the CD is opened, if we boot from the CD). This bytes is called the master boot record MBR (master boot record). MBR tells the computer to load the boot loader (boot loader) from a partition (partition) of the device. Boot loader stores information about the operating system (OS), such as the operating system name, the location of the operating system kernel (kernel), and so on. The commonly used boot loader is GRUB and LILO.
Later, boot loader will help us load the kernel (kernel). The kernel is actually a program used to operate the computer. It is the kernel of the computer operating system. The main task is to manage the hardware resources of the computer and act as the interface between software and hardware. Any operation on the operating system is communicated to the hardware through the kernel. Windows and Linux each have their own kernel. In the narrow sense, the operating system refers to the kernel, and the broad operating system includes the kernel and various applications above the kernel.
Linus Torvalds is not so much the father of Linux as the father of the Linux kernel. He is still responsible for the development and maintenance of the Linux kernel. As for Ubuntu and Red Hat, they are all based on the same kernel and include a more complete version of the operating system composed of different applications and interfaces.)
In fact, we can install boot loader on multiple partitions, each boot loader corresponds to a different operating system, and select the boot loader we want to start when reading MBR. This is the principle of multiple operating systems.
Summary: BIOS-> MBR-> Boot Loader-> Kernel
Kernel
If we load the Linux kernel, the Linux kernel starts working. The kernel first reserves the memory space it needs to run, and then detects the computer hardware through the driver (driver). In this way, the operating system can know what hardware it has available. The kernel then starts an init process. It is process 1 in the Linux system (there is no process 0 in the Linux system). At this point, the kernel completes the work in the startup phase of the computer and is handed over to init to manage.
Summary: kernel-> init process
Init process
(according to boot loader's options, Linux can enter single-user mode (single user mode) at this time. In this mode, the initial script has not yet been executed, and we can detect and fix possible errors in the computer)
Init then runs a series of initial scripts (startup scripts), which are common shell scripts in Linux. These scripts perform the following functions:
Set computer name, time zone, detect file system, mount hard drive, clear temporary files, set up network.
When these initial scripts, the operating system is completely ready, but no one can log in yet. Init will give you a login dialog box, or a graphical login interface.
Enter a user name (such as vamei) and password, DONE!
In the following process, you will operate the computer as a user vamei. In addition, depending on the settings you set when you created the user, Linux will group you into a group, such as a stupid group or a vamei group.
So you will be the user vamei and a member of the vamei group. (note that group vamei and user vamei are just duplicate names, just as if you could be called Dell and be the boss of Dell. You can also be a user vamei and a member of the stupid group)
This is the end of the article on "how to boot Linux to start bootstrap". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.