Introduction to Linux Operation and Maintenance 06-01 (System Initialization and Service)

Please indicate the source " Old Boy IT Education "
Source URL: https://www.sholdboyedu.com/new/394.html

In Linux and other Uniux systems, the init (initialization) process is the first process executed by the kernel when the system is started, its process ID (PID) is 1, and it runs silently in the background until the system is shut down. So how to properly learn the initialization and service of the system? ? ?

1. The boot sequence of the Linux system (see Linux System Management P312 for details)

1) Master the boot sequence of the Linux system: (see Appendix 1 for details)

Among them, the job of BIOS is to check the computer's hardware devices, such as CPU, memory, and fan speed;

MBR will be 512B in the first block of the boot disk. The program code in the first 446 is used to select the boot partition (partition), that is, which partition is used to load the boot code;

The kernel part is mainly to install the driver of the computer equipment so that the operating system can control the equipment on the computer. And mount the / (root) file system in a read-only manner, that is, the operating system at this time can only read the partition where the root file system (directory) is located;

The process id of the init program is 1, which is the first program executed by the Linux operating system.

1. BOIS initialization and boot loader (see linux system management P313 for details)

1) Master the definition of BIOS: BIOS (Basic Input/Output System) (abbreviation for basic input/output system), it is the interface between hardware and software, and it is a very basic interface.

2. GRUB program and grub.conf file (see linux system management P317 for details)

1) Grasp the definition of GRUB: GRUB is the abbreviation of Grand Unified Bootloader (Multiple Operating System Boot Manager).

2) The configuration file for mastering grub is: grub.conf

Set grub Md5 encryption command grub-MD5-crypt

Password = plain text or password --md5 cipher text (edit the password of the grub configuration file)

Title red hat title

Password = plaintext or password --md5 ciphertext (the password necessary to load the kernel system boot)

3. Kernel initialization and init initialization (see Linux system management P322 for details)

1) The configuration file to master init is: /etc/inittab

2) Understand what the init program does:

  a) Decide which run levels to use for the preset (default).

  b) Execute some system initialization scripts (programs) to initialize the operating system.

  c) Execute the programs in the corresponding directory according to the run level setting to decide which services to start.

  d) Set some key combinations.

  e) Define the UPS uninterruptible power supply system, that is, which procedures should be executed when the power supply fails or when the power supply is restored.

  f) Generate 6 virtual consoles, namely tty1~tty6.

4. run levels (see linux system management P326 for details)

1) Master all run levels and the functions corresponding to each run level:

5. Shut down the system and restart the system (see linux system management P342 for details)

1) Master the commonly used commands that can shut down the system:

  shutdown -h now

  halt

  poweroff

  init 0

2) Master the commonly used commands that can restart the system:

  shutdown -r now

  reboot

  init 6

  Ctrl + Alt + Delete Key

6. Master the single user mode to modify the user's password

7. Master the rescue mode

8. Homework (70 minutes)

1) Log in to the system as the root user

2) Modify the grub configuration file, start with the first operating system by default, and modify the default countdown to 10 seconds

3) Set the cipher text password "123" for the grub menu

4) Modify the default run level of the system to 3

5) Restart the system using commands related to the run level

6) Use single user mode to change the user's password to "123"

7) Use rescue mode to delete grub menu password


Guess you like

Origin blog.51cto.com/15064427/2676511