Introduction to the liunx Startup Process

Source: Internet
Author: User

Hello everyone, this time I will introduce you to the liunx system startup process, including what scripts are started, what is the role, and I hope you can take a good look at the problem if the system is faulty and fix it as needed.



Startup Process

1Power-on: boot item disc, hard disk, floppy disk, U disk, network ),

2The first 446 bytes of MBR are the Master Boot Program, and the last 64 bytes are the partition table, 2 bytes, magic, numer magic number 55aa ))

The process is stage1 ----- (fs) stage1.5 ---- stage2

3Load the kernel grub)/boot/grub/

Cd/boot/grub/splash.xpm.gz

Title Red Hat Enterprise Linux Server (2.6.18-308. el5)

20 root partitions) (hd0, 0) first partition of the first hard disk

21 kernel)/vmlinuz-2.6.18-308.el5 ro read-only) root = LABEL =/rhgb blue bars) quiet vga = 792

22 initrd/initrd-2.6.18-308.el5.img loading module)


--------------------------------------------

If the pilot program is deleted, the system will display the one that is always flashing-

Grub> Yes/boot/grub. conf deleted

Then write

Grub> root (hd0, 0)

Kernel/vmlinuz-2.6.18-308.el5 ro root =/dev/sda2 kernel

Initrd/initrd-2.6.18-308.e15.img loading Module

Boot Guide



--------------------------------------

Entry from grub but user mode second read kernel boot)

Root (hd0, 0)

Kernel/vmlinuz-2.6.18-308.el5 ro root = LABEL =/rhgb quit 1

Initrd/initrd-2.6.18-308.e15.img loading Module

Boot Guide




-----------------------------------------

Dd if =/dev/sda of = yindao bs = 446 count = 1 backup boot System

-------------------------------------

First put into the CD

Linux rescue in Repair Mode

No network required

Repair?

Choose the first File System

Select Hard Disk

Select OK

------------------


Clear the screen in a single user clear

Chroot/mnt/sysimage/switch the Home Directory of the cost Machine

Exit to log out to a single Cd user



--------

In the CD repair mode, read the MBR boot first)

Grub directly enters grub

Roothd0, 0) tell them where the Bootstrap program is

Setup hd0) set to install the boot program on the first hard disk

Boot Guide




--------------------------------------------

Boot Process


Configuration File started by vim/etc/inittab

4. Init (inittab)

0 Shutdown

1 single user mode

2 multi-user mode without network replacement

3. Complete normal user mode with network

The four-digit mode is not configured.

5 graphic interface

6. Reboot Mode


The k file indicates that S is disabled.

Vim/etc/rc. d/rc0.d/no service required

Vim/etc/rc. d/rc1.d/

Vim/etc/rc. d/rc2.d/

Vim/etc/rc. d/rc3.d/

Vim/etc/rc. d/rc4.d/

Vim/etc/rc. d/rc5.d/

Vim/etc/rc. d/rc6.d/



---------------------------

5./Etc/modprobe. conf (modprobe. d /)

6./Etc/rc. d/rc. sysinit (SCRIPT) contains a host name and the like. It loads fstab.

7./Etc/rc. d/rc #. d start scripts in different directories at different levels

8./Etc/rc. local start the last script

9Load file mode resources --> graphical mode Resources

10Login loads the environment variables of each user



------------------------

Startx enable graphic interface in text


This article is from the "history_xcy" blog, please be sure to keep this http://historys.blog.51cto.com/7903899/1296636

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.