A, Linux run level
0: system downtime (shutdown) mode, the system default run level can not be set to 0 or does not start, a boot automatically shut down.
1: single-user mode, root privileges for system maintenance, prohibits remote login, login as safe mode under Windows.
2: multi-user mode without NFS network support.
3: Full multi-user text mode, there are NFS, after landing into the console command line mode.
4: The system is not used, reserved generally do not, in some special cases you can use it to do something. For example, when the laptop battery exhaustion, this mode can be switched to do some settings.
5: Graphical mode, after landing into the graphical GUI mode or GNOME, KDE graphical interface, such as the X Window System.
6: restart mode, the default operating level can not be set to 6, or can not start properly, it would have been switched to restart the power-on reset.
init switching level
configuration file
/ etc / inittab
the runlevel See run level
N 3
level on a current level
/etc/rc.d/rc.local
This configuration file reads in the boot before the user logs on, the file write what command, the system will be executed once at each boot
Second, the boot program (boot loader)
Early lilo
profile /boot/grub.conf
default = 0 # default boot the first system, which is the first title
timeout # = wait time of 5 seconds. 5
splashimage = (hd0,0) /grub/splash.xpm. gz # background graphics position, where the (hd0,0) is first partition on a hard drive, which is the / boot partition
hiddenmenu hide the selection screen
title CentOS 6 (2.6.32-573.el6.x86_64) # title
root (hd0,0) # save the partition boot program, the same as before
kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root = UUID = 0bfd1837 -ed7e-4f2c-a3d1-8349e43a8b43 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 information
initrd /initramfs-2.6.32-573.el6.x86_64.img specifies the location of the file system image memory initramfs file
Encryption grub
[the root @ localhost ~] # grub-MD5 crypt-
Password:
the Retype password:
$ $ 9ynpU0 $ BxAssGHs0cO.9oZ.jCzAD. 1.
Add the encrypted string of characters to which the configuration file
is added after the password timeout field - md5 $ 1 $ 9ynpU0 $ BxAssGHs0cO.9oZ.jCzAD.
Third, the system repair mode
1, single-user mode
When Centos6 forget the root password can be used to reset the single-user mode root password do the following:
When selecting the second boot by e, then e, a space, a carriage return after the restart b passwd Change password
2, disc repair mode
After adjusting the BIOS boot sequence in the disc and let the system boot from the CD
Loss of important documents in the system can not start, can be repaired by the disc mode (the file is missing or premise know those problems arise)