Linux Boot process parsing

Source: Internet
Author: User

Three: Linux boot process parsing date current system hardware clock Hwclock firmware (between hardware and software) clock----> general system clock and firmware clock is synchronous hwclock--hctosys Synchronous Clock Manual modification system Current time: Date 040617032015.38 (2015-04-06 17:03:38) manually modify firmware time: (man Hwclock can view) hwclock--set--date= "4/6/15 17:06:40" Linux PC server One Cmos/bios parsing: System boot process firmware firmware (Cmos/bios) post power-on self-test and bootloader bootloader (GRUB, viewing in vi/etc/grub.conf) load the kernel- Load kernel kernel (drive hardware)--Start Process init--Read execution profile/etc/inittablinux kernel file: Ls/usr/src/linux (kernel only: 1, drive Referral 2, start inittab process VI/ Etc/inittab) a:linux boot process b:linux Run level c:linux start service Management D:grub Configuration and Application (vi/boot/grub/grub.conf) E: Start failure Analysis and solution case: Single user mode application 1:root password forgot to enter the single user mode to reset the root password, as follows: Boot into the Grub interface, press E to enter edit mode, select Kernel line, press E again, enter L or S in the last line of the new interface, To enter single-user mode. Add: Grub command (function key) E: Edit the current boot menu item C: Enter the command line mode for Grub B: Start the current menu item D: Delete the current line ESC: Return to the Grub boot menu interface and cancel any modifications to the current item: Reboot into the countdown for 5 seconds, Press ESC to enter the grub interface--and then select the edits you want to edit by e--To change the RunLevel: Grub edit> kernel/vmlinuz-2.6.18-194.e15 ro root=label=/rhgb Quiet 1 (Enter save, 1 is run level)---> Press B----You can use this--and change password for the graphical interface: password root But the above method is unsafe: "Set grub plus password" to prevent others from entering. One: The wayThe following (2 ways can be obtained ciphertext): 1: Use the Grub-md5-crypt command to bring your own #grub-md5-cryptpassword:123456&wwefefwes*&%dssdsdsadfag^$ Gtuhtgguu (encrypted password) 2: Use the Md5crypt command in the Grub Interactive command line interface #grubgrub>md5cryptpassword:[email protected]$%sdgr*sdfgs*^ % $DGRG (password after MD5) Two: Copy the ciphertext, put it in the Grub configuration file vi/etc/grub.conf Add a password setting to the title: Password--md5 [email protected]$% s encryption OK, next to enter "single user mode" will enter password Grub repair: When booting into the Grub interface but no menu, only one grub> prompt, solution: Enter the interface press c---> enter the GRUB command State grub>cat/boot /grub/grub.conf (for View 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 (image file) grub>boot (The system can boot properly) if the error is not able to enter the single-user mode at all? That is, disc Repair mode! Simulation: Cp/etc/inittab/etc/inittab.bak Backup second: Rm/etc/inittab (this file is the system running and starting some important files, the file deletion is not normal boot) This situation we can not enter the "single-user mode" to do? Use GRUB Repair mode: 1: Put the installation disk into the optical drive, can restart the machine after the Bois, the system light drive to guide. 2: After the installation interface comes out, press "F5" key, that is, the Linux rescue mode can be entered after the boot Linux rescue can enter the sh#

Linux Boot process parsing

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.