The content of this section:
First, the Linux boot process
Second, the common start troubleshooting
Third, rescue mode
1, the system paralyzed the rescue mode copy data
2. Grub Re-installation
3. System cannot start--disk resource exhaustion
4, file deletion space does not release the problem (expand)
One: The Linux boot process is detailed
load the BIOS hardware information. because the BIOS contains a variety of hardware information (hard disk information, CPU, memory, clock, device boot order), and so on, according to the Set boot startup item first boot boot, if first boot to hardware, then go to the next step
read the MBR in the hard disk, which is the master boot recoder (master boot record). the first sector of the No. 0 track on the hard disk is called the MBR, which is 512 bytes in size and consists of 3 parts, the master bootstrapper, the partition table, and the end identifier magic number, respectively, of 446, 64 (hard disk partitions up to 4 partitions) and 2 (0xaa55 or 0X55AA) bytes. After the MBR is read by the first boot device in the BIOS, the boot loader is loaded into memory, either LILO or Grub
boot boot Loader----grub. the boot loader runs outside of the operating system kernel, which is equivalent to initializing the hardware device, which will match the hardware and software environment and prepare for the kernel of the operating system. As mentioned earlier, the most common type of boot Loader is grub, which means that this step is to read the grub information in memory and start the operating system based on the GRUB configuration information.
load the kernel. the path to the kernel exists in the configuration information for grub, and the system reads the memory to extract the image, place it in memory, and invoke the function to initiate the driver initialization hardware device to complete the establishment of the Linux core environment. The Linux program will work as expected.
get started with the appropriate runlevel according to the Inittab file. after the kernel is loaded, the first program to be run is/sbin/init, which reads the Inittab file. Note: This does not start the service at the appropriate level, but first prepare the job's environment, which is the next step.
# Default RunLevel. The runlevels used is:
# 0-halt (do not set Initdefault to this) #关机
# 1-single User mode# Single user mode
# 2-multiuser, without NFS (the same as 3, if you don't have networking) multi-user mode no NFS network support
# 3-full multiuser mode# Multi-user mode with network support
# 4 Unused #保留未用
# 5-x11## X-window Mode
# 6-reboot (do not set Initdefault to this) #重启
#
Id:5:initdefault: #设定形式, indicating a run level of 5
Init executes the/etc/rc.d/rc.sysinit. prepare the job environment for application execution (external device initialization, setting up network, Mount/proc, boot swap partition, Mount root device, terminal font, TIME HDD function, disk detection, according to/etc/modules.conf or/etc/ MODULES.D file boot kernel module, boot status record to/VAR/LOG/DMESG)
execute the script at different levels /etc/rc.d/rc0.d~rc6.d/start the corresponding initialization work and launch the corresponding service, here the service s start all boot execution, K start the boot does not execute
Perform/etc/rc.d/rc.local to set personalized boot entry and settings
Execute/bin/login program Enter login status
Second, the common start troubleshooting
1. Encrypt grub to prevent root password from being cracked
[Email protected] ~]# Grub-md5-crypt #加密grub密码
Password:
Retype Password:
$1$yr8im$ri0etbadp9l80jb2bdxpk1
[Email protected] ~]# sed-i '/hiddenmenu/a password--md5 $1$yr8im$ri0etbadp9l80jb2bdxpk1 '/boot/grub/grub.conf #添加加密行
[Email protected] ~]# tail-n 5!$ #验证操作的正确性
Tail-n 5/boot/grub/grub.conf
Password--md5 $1$YR8IM$RI0ETBADP9L80JB2BDXPK1
Title Red Hat Enterprise Linux (2.6.32-279.el6.x86_64)
Root (hd0,0)
kernel/vmlinuz-2.6.32-279.el6.x86_64 ro root=uuid=ddc013d0-48ef-4dfb-991d-891c171cd2e1 Rd_NO_LUKS rd_NO_LVM LANG=en _us. UTF-8 rd_no_md sysfont=latarcyrheb-sun16 crashkernel=auto keyboardtype=pc keytable=us Rd_NO_DM rhgb quiet
Initrd/initramfs-2.6.32-279.el6.x86_64.img
[Email protected] ~]#
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/F2/wKioL1XBzqriZVznAACaouOVyjU097.jpg "/>
After restarting, edit grub needs to press the P key to enter the password to operate then press the A key to enter 1 as shown
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/F5/wKiom1XBzLLjCeHYAABsZWGGlZU143.jpg "/>
Modify the first line of/etc/passwd as shown in: Restart
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/F2/wKioL1XBzqrBbg3OAABHnALyWLs913.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/F2/wKioL1XBzquS-WMGAACy_W90WEo723.jpg "/>
So far, the root password has been changed! If you encrypt grub in the middle, it's not easy to change the root password, which is the role of encryption.
Third, rescue mode
1, the system paralyzed the rescue mode copy data
First step: Adjust boot first boot to CD-ROM save exit load Linuxiso Mirror
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/F5/wKiom1XBzLLgQGxaAACwYe0hAbE300.jpg "/>
Step two: Reboot into rescue mode boot system
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/F2/wKioL1XBzqvwUyGsAAENjMpRbnc391.jpg "/>
Step three: Basic Options settings
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/F5/wKiom1XBzLKD0kijAADFlLxb0RU826.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/F2/wKioL1XBzrLwS_1rAACTcOpMVAA639.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/F5/wKiom1XBzLnDbAVKAABvrftyKF0853.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/F5/wKiom1XBzLnhlTVsAAIj6eTTQ-o846.jpg "/>
Continue
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/F2/wKioL1XBzrKwGJdvAADFEzMy-00018.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/F5/wKiom1XBzLqCzA0BAABY1132PwQ952.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/F2/wKioL1XBzrKBRtW-AAB19EWfwXk605.jpg "/>
After OK
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/F2/wKioL1XBzrPh6eVeAADhxlETAGI502.jpg "/>
Here you can insert a removable hard disk or a USB drive to copy data!
This article is from the "Tree bag Wandering" blog, please be sure to keep this source http://shudaipiaoling.blog.51cto.com/454831/1681963
1-10-rhel6.3-linux start-up principle and various fault case analysis (Red Hat Enterprise Linux Server6.3) @ Tree Bag Wandering