Linux boot process analysis, linux boot process

Source: Internet
Author: User

Linux boot process analysis, linux boot process

Iii. linux boot process parsing date the current system hardware clock hwclock firmware (between hardware and software) clock ----> the general system clock and firmware clock are synchronized hwclock -- hctosys synchronous clock manual modification of the current system time: date 040617032015.38 (17:03:38) manual modification of the firmware time :( man hwclock can be viewed) hwclock -- set -- date = "4/6/15 17:06:40" linux pc server generally uses CMOS/BIOS resolution: System Boot Process firmware (CMOS/BIOS) post power-on self-check --> bootstrap loader (GRUB, in vi/etc/grub. check in conf) load the Kernel --> load the Kernel (driver hardware) --> start the process init --> Read the execution configuration file/etc/inittablinux Kernel File: ls /Usr/src/linux (kernel only: 1, driver referral 2, start inittab process vi/etc/inittab) A: linux boot process B: linux running level C: linux Startup Service Management D: GRUB configuration and application (vi/boot/grub. conf) E: Start Fault Analysis and Solution case: Single User Mode Application 1: root Password forgot to enter single user mode reset root password, the method is as follows: boot to enter Grub interface, press the e key to enter the editing mode. Select the kernel line and press the e key again. Enter l or s in the last line of the new interface to enter the single-user mode. Supplement: grub command (function key) e: edit the current Start Menu item c: Enter the grub command line mode B: Start the current menu item d: Delete the current line Esc: return to the grub Startup menu to cancel any modifications made to the current single item. perform the following operations: restart to the last five seconds, press ESC to go To the GRUB interface --> yes, and then select the one you want to modify and press e to edit --> change the running level: grub edit> kernel/vmlinuz-2.6.18-194.e15 ro root = LABEL =/rhgb quiet 1 (Press enter to save, 1 is the run level) ---> press B --> you can't use the graphical interface of this --> Change Password: password root, but the above method is not safe: "set grub and password" to prevent others from entering. 1: The method is as follows (both methods can get ciphertext): 1: Use the built-in grub-md5-crypt command # grub-md5-cryptPassword: 123456 & wwefEFWES * & % dssdsadfag ^ $ gtuhtGGUU (encrypted password) 2: run the md5crypt command # grubgrub> md5cryptPassword: $ DGR1 @ DGR $ % SDGR * SDFGS * ^ % $ DGRG on the grub interactive command line interface (obtain the MD5 password). 2: copy the ciphertext to the grub configuration file vi/etc/grub. add a password to the title in the conf file: password -- md5 $ DGR1 @ DGR $ % S encryption OK. The next time you enter "single user mode", enter the password GRUB to fix it: when the grub interface is started, but there is no menu, there is only one grub> prompt. Solution: Enter the interface and press the c key ---> enter the grub command status grub> cat/boot/gr Ub/grub. conf (for viewing parameters) grub> root (hd0, 6) (manual boot, set boot partition) grub> kernel (hd0, 6) /vmlinuz-2.4.15-14 ro root = LABEL =/3 (specify the location of the kernel) grub> initrd (hd0, 6)/initrd-2.4.18-14.img (mirror file) grub> boot (the system can boot normally) if an error occurs, What can I do if I cannot enter the single-user mode? That is, the disc repair mode! Simulation: 1. cp/etc/inittab. bak backup 2: rm/etc/inittab (this file is an important file for system running and startup, and deletion of this file cannot be properly booted) in this case, we cannot enter the "single user mode". What should we do? Use grub repair mode: 1: place the installation disk to the optical drive, and then restart the machine. In BOIS, use the optical drive to guide the system. 2: After the installation interface is installed, press f5, that is, enter linux rescue in boot Mode, and press Enter. sh #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.