Linux system startup process
POST (This process mainly detects all hardware devices of the server hardware)-->bios (boot sequence, system boot order, from which device boot)-->mbr boot file storage space (contains Bootlocader file total size of about 446MB, Find system Boot file)-->kernel system kernel -->/INITRD--(ROOTFS)/sbin/init
Linux system operating level: 0-6
0:halt shut down the machine
1:single User mode single user, log in directly as Administrator (Maintenance mode)
2:multi user mode, no NFS multiuser, but no network file system enabled
3:multi User Mode,text Multi-user plain text mode
4:reseved schema not defined, temporary retention mode
5:multi user mode,graphic mode multiuser graphical interface
6:reboot restart
Detailed system start-up process
Bootloader (MBR)
Lilo:linux Loader
Grub:grand Unified Bootloader
STAGE1:MBR first stage, mainly to guide the second stage
Stage1_5: Phase 1.5, primarily used to identify commonly used file systems, located in the/boot/grub/directory
Stage2: The second stage is in the/boot/grub/directory
cat/etc/grub.conf the/boot/grub link file when the profile is configured:
# grub.conf generated by Anaconda
#
# Note that you don't have the to rerun grub after making changes to the This file
# notice:you has a/boot partition. This means
# all kernel and INITRD paths is relative to/boot/, eg.
# root (hd0,0)
# kernel/vmlinuz-version RO root=/dev/sda2
# initrd/initrd-[generic-]version.img
#boot =/DEV/SDA
Default=0 # Sets the title number of the default startup, starting at 0 and sorting from top to bottom.
Timeout=5 # waits for the user to select the timeout length, in seconds
Splashimage= (hd0,0)/grub/linux.xpm.gz # grub Background Image
Hiddenmenu # hidden Menu
Password--md5 $1$7yzf4/$Bo. 1rg8dzncimfomud6ed0 # makes it possible to enter single-user mode with a password
Title CentOS (2.6.32-431.el6.i686) # kernel header or operating system name, string, can be freely modified
Root (hd0,0) # kernel files are located on the device, for grub, all types of hard drives are HD;
the format is (hd#,n); hd#, #表示第几个磁盘, the last 0 indicates the partition of the corresponding disk
kernel/vmlinuz-2.6.32-431.el6.i686 ro root=uuid=47b74772-4295-493a-8aa6-8fc85ae0807d Rd_NO_LUKS KEYBOARDTYPE=pc Keytable=us rd_no_md Crashkernel=auto lang=zh_cn. UTF-8 RD_NO_LVM rd_no_dm rhgb quiet # Kernel file path/boot directory, and parameters passed to the kernel
Initrd/initramfs-2.6.32-431.el6.i686.img # RAMDisk file path in/boot directory
Kernel design style:
Redhat,suse
Core: Dynamic load kernel module
Kernel:/lib/modules/"kernel version number command directory"/
vmlinuxx-2.6.32
/lib/modules/2.6.32/
Single Core: Linux
Core: KO (Kernel object)
Micro-kernel: windows,solaris (thread)
Chroot:chroot/path/to/temproot [COMMAND ...] Switch root directory to switch root to/temproot temp directory
chroot/test/virrrot/bin/bash Switch the root directory while executing with/bin/bash
Ldd/path/to/binary_file: Shows the shared libraries on which the binaries depend
This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1880231
Linux command: chroot LDD init system START process, modify startup background map