Post (power on Self Test)-->bios (Boot Sequence)-->mbr (bootloader,446)-->kernel-->initrd--> (ROOTFS)/sbin/init (/ Etc/inittab)
Kernel design style:
Redhat,suse Core: Dynamic load kernel module kernel:/lib/modules/"kernel version number command directory"/
vmlinuz-2.6.32/lib/modules/2.6.32/
Single core: Linux (LWP) Core: KO (kernel object) so micro-core: Windows,solaris
chroot:chroot/path/to/temproot [command ...] Chroot/test/virroot/bin/bash
Ldd/path/to/binary_file: Shows the shared libraries on which the binaries depend
Service started differently: runlevel: 0-6 0:halt shutdown 1:single user mode, direct login Administrator 2:multi user mode,no NFS 3:multi user model:text mode 4:resere d 5:multi user mode,graphic mode 6:reboot
Bootloader (MBR) Two ways to start LILO grub:grand Unified bootloader stage1:mbr stage2:/boot/grub/
Grub.conf
Default=0 #设定默认启动的title的编号, starting from 0 timeout=5 #等待用户选择的超时时长, Unit is seconds splashimage= #grub的背景图片 hiddenmenu #隐藏菜单 password Redhat ( Directly specify the text password) or password--md5 ******** (MD5 encrypted password)
Title # Kernel title or operating system name can freely modify root (hd0,0) #内核文件所在的设备: For grub, all types of hard drives are hd:hd#, #标识第几个磁盘, and the last 0 represents the partition kernel #内核文件路径 of the corresponding disk, And the parameters passed to the kernel initrd #ramdisk文件路径
View Run level RunLevel Run level who-r run level
View kernel: uname-r
Install grub STAGE1: # grub grub> Root (hd0,0) grub> set (hd0)
Install grub The second way: # Grub-install--root-directory=/
Grub>find grub>root (hd#,n) grub>kernel/path/to/kernel_file grub>initrd/path/to/initrd_file grub> Boot
Kernel initial process: 1, device detection 2, driver initialization (may be re-initrd (INITRAMFS) files reproduced in the driver module) 3, to read-only mount the root file system 4, load the first process (PID:1)
/sbin/init: (/etc/inittab) Upstart:ubuntu,d-bus,event-driven systemd:
Id:runlevels:action:process ID: identifier runlevels: at which level this row is run
Si::sysinit:/etc/rc.d/rc.sysinit
Action:initdefault: Set default Run Level Sysinit: System initialization wait: The wait level switches to this level when the respawn is executed: Once the program terminates, it restarts
/etc/rc.d/rc.sysinit completed task 1, activating udev and SELinux; 2, according to the/etc/sysct1.conf file, to set the kernel parameter 3, set the clock clock 4, load the keyboard mapping 5, enable swap partition 6, set the hostname 7, root file system detection, and read and write to Mount 8, activate RAID and LVM device 9, enable disk quota 10, according to/ Etc/fstab, check and mount other file system 11, clean out outdated locks and PID files
Linux system startup process