CentOS 6 startup process:
POST--Boot Sequence (BIOS)--BootLoader (MBR)--Kernel (RAMDisk)--Rootfs Switchroot /init---/etc/inittab,/etc/init/*.conf--Set the default run level--system initialization script--shut down or start the service under the corresponding level-boot terminal grub (boot Loa Der):
Grub:grand Unifiedbootloader
Grub 0.x:grub Legacy
Grub 1.X:GRUB2 Grub Legacy:
Stage1:mbr
STAGE1_5:MBR after the sector, so that the stage1 in the bootloader can identify the Stage2 partition on the file system;
Stage2: Disk Partitioning (/boot/grub/) Profile:/boot/grub/grub.conf <--/etc/grub.confstage2 and kernels are typically placed on a basic disk partition;
Function:
(1) menu and interactive interface available
E: Edit mode, for editing menus;
C: Command mode, interactive interface;
(2) Loading the user-selected kernel or operating system
Allow parameters to be passed to the kernel
To hide this menu
(3) provides a protection mechanism for the menu
Certification for the Edit menu
To enable the kernel or operating system for authentication how to identify the device:
Linux Kernel:
CentOS Boot process: POST--Bootloader (BIOS, MBR)--Kernel (INITRD)--rootfs---Switch_root
Kernel Design System: Single core, micro core
Linux: Single-core design, but fully learn the advantages of micro-kernel system design, the introduction of the kernel of the modular mechanism;
Components of the kernel:
Kernel: Kernel core, generally bzimage, usually located in the/boot directory, named Vmlinuz-version-release;
Kernel object: Kernel objects, kernel modules, typically placed in/lib/modules/version-release/
components of the kernel:kernel, kernel object, RAMDisk
Kernel:uname
Kernel object:lsmod, Modinfo, Modprobe,insmod, Rmmod, Depmod
Ramdisk:mkinitrd,dracut START Process: POST--Bootsequence (BIOS)--Bootloader (MBR)--Kernel (ramdisk)--Rootfs (switch_root)-/sbin/init (/etc/inittab,/etc/init/*.conf,/usr/lib/systemd/system/)--default RunLevel, System initialization, Shut down and start the service, start the terminal (graphics terminal)
Grub:
1st STAGE:MBR
1_5 the sector after STAGE:MBR
2nd stage:/boot/grub/Encryption: Edit, kernel
(hd#,#)
hd#: Disk number, expressed as a number; numbering starting from 0
#: Partition number, expressed in numbers; Numbering starting from 0 (hd0,0) Grub command-line interface
Help: Get assistance list
Help KEYWORD: More information
Find (hd#,#)/path/to/somefile:
Root (hd#,#)
Kernel/path/to/kernel_file: Set the kernel file used in this boot, and add many cmdline parameters which the kernel supports.
Example: Init=/path/to/init, selinux=0
Initrd/path/to/initramfs_file: Set the RAMDisk to provide additional files for the selected kernel;
Boot: Booting the selected kernel, manually booting the system on the GRUB Command line interface:
grub> Root (hd#,#)
Grub> Kernel/vmlinuz-version-release Roroot=/dev/device
Grub> initrd/initramfs-version-release.img
grub> Boot configuration file:/boot/grub/grub.conf
Configuration items:
default=#: Sets the default Start menu item, and the entry (title) number starts at 0;
timeout=#: Specifies the length of time the menu item waits for an option to be selected;
Splashimage= (hd#,#)/path/to/xpm_pic_file: Indicates the menu background picture file path;
Hiddenmenu: Hide menu;
Password [--MD5] STRING: Menu Editor authentication;
Title Title: Define the menu item "title", can appear multiple times;
Root (hd#,#): Grub finds the device partition where the Stage2 and kernel files are located; "root" for grub;
Kernel/path/to/vmlinuz_file [PARAMETERS]: Boot kernel
Initrd/path/to/initramfs_file: Kernel-matched Ramfs file;
Password [--MD5] STRING: Authentication when the selected kernel or operating system is started; Grub-md5-crypt command enters single-user mode:
(1) Edit the Grub menu (select the title to edit, then use the e command);
(2) attach after selected kernel
1, S, s or single can be;
(3) In the kernel line, type "b" command; Install Grub:
(1) Grub-install
Grub-install--root-directory=root/dev/disk (2) Grub
grub> Root (hd#,#)
grub> Setup (hd#) Exercise:
1, new hard drive, to provide direct operation of the bash system alone;
2, the destruction of the native grub Stage1, and then in the rescue mode repair;
3. Set up protection function for grub; blog job: Grub Application;
Kernel module and kernel Core version must be strictly matched; []:n
[M]:module
[*]:y, compiled into kernel core kernel: dynamic loading and unloading; RAMDisk: Auxiliary files, not required, depending on whether the kernel can directly drive the device Rootfs;
Target device drivers, such as SCSI device drivers;
Logical device drivers, such as those of LVM devices;
File systems, such as XFS file systems; RAMDisk: is a lite version of the root file system; Kernel Information acquisition:
This article is from the "Perfect World" blog, so be sure to keep this source http://angelababy.blog.51cto.com/6326130/1755127
CentOS system Start-up process