I. System Fault Analysis Method and target judgment the nature of the problem repeat the error process to find further information. Starting with a simple method, back up the configuration file during modification to fix faults at different stages of the Linux system. to different operation levels to use rescue mode II. System Fault troubleshooting Example 4 common examples are provided below to illustrate the process of system fault troubleshooting, incorrect system password: mbr fault/etc/fstab file error/etc/inittab file error 3. Incorrect system password (forgot or
I. system fault analysis methods and objectives
Determine the nature of the problem
Repeat the error process
Search for further information
Start with a simple method
Back up the configuration file during Modification
Fix Linux faults at different stages
Direct the system to different running levels
Rescue Mode
Ii. System troubleshooting example
The following are four common examples to illustrate the system troubleshooting process:
Incorrect System Password
Mbr fault
/Etc/fstab file Error
/Etc/inittab file Error
3. Incorrect system password (forgot or want to steal and modify)
Forgot the root password for logging on to the system, and forgot the password of grub boot manager.
The following describes a grup guide Manager password. setting this password prevents you from editing the boot menu screen.
To edit, you must enter a password. To set the grub Password, follow these steps:
Root@www.linuxidc.com ~ # Vim/boot/grub. conf
// Edit this file
Root@www.linuxidc.com ~ # Cat/boot/grub. conf
# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:
You have a/boot partition.
This means that
#
All kernel and initrd paths are relative to/boot/, eg.
#
Root (hd0, 0)
#
Kernel/vmlinuz-version ro root =/dev/sda2
#
Initrd/initrd-version.img
# Boot =/dev/sda
Default = 0
Timeout = 5
Splashimage = (hd0, 0)/grub/splash.xpm.gz
# Hiddenmenu
Password = 123
// Add this line to the Linux system title
Title Red Hat Enterprise Linux Server (2.6.18-128. el5)
Root (hd0, 0)
Kernel/vmlinuz-2.6.18-128.el5 ro root = LABEL =/rhgb quiet
Initrd/initrd-2.6.18-128.el5.img
Save the file and exit ......
Then restart the system and you will find a message saying: directly press enter to start the system. If you want to set menu options, please
Enter "P ". If the grub Password is not set, you can directly edit the menu options:
Enter "P", and then enter the previously set password 123.
After the password is verified, you are prompted to enter "e" to edit the menu options.
Enter "e ":
In this way, you can set the Linux Startup level. Therefore, if you do not set the grub Password, even if you do not know the root
Account password. You can use level 1 to start the system and set the password through the edit menu.
Of course, the grub Password is usually set with MD5 encryption, as follows:
Root@www.linuxidc.com ~ # Grub-md5-crypt
Password:
// Enter 123
Retype password:
// Enter 123
$1 $ q5Ppn/$ MZr67rBdz6kIhk0lYDvFh0
// This line is the 123 MD5 encryption Password
Then edit the/boot/grub. conf file:
Root@www.linuxidc.com ~ # Vim/boot/grub. conf
Root@www.linuxidc.com ~ # Cat/boot/grub. conf
# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:
You have a/boot partition.
This means that
#
All kernel and initrd paths are relative to/boot/, eg.
#
Root (hd0, 0)
#
Kernel/vmlinuz-version ro root =/dev/sda2
#
Initrd/initrd-version.img
# Boot =/dev/sda
Default = 0
Timeout = 5
Splashimage = (hd0, 0)/grub/splash.xpm.gz
# Hiddenmenu
Password -- md5 $1 $ q5Ppn/$ MZr67rBdz6kIhk0lYDvFh0
// Change to MD5-encrypted
Title Red Hat Enterprise Linux Server (2.6.18-128. el5)
Root (hd0, 0)
Kernel/vmlinuz-2.6.18-128.el5 ro root = LABEL =/rhgb quiet
Initrd/initrd-2.6.18-128.el5.img
After the system is restarted, enter the encryption password 123 if you want to edit the menu options.