Linux troubleshooting case (1): linux troubleshooting
Running Environment: CentOS6.7
Fault Cause:
Yesterday, the command yum-y update was executed online. The command was forcibly interrupted and the poweroff command was run to shut down. If a fault occurs during reboot:
According to the prompt information analysis, the system kernel information may be disordered due to the incomplete execution of the update command.
Fault solution:
Insert the system disk, modify the BIOS of the motherboard and boot from the optical drive to the Linux rescue mode for system repair.
After "OK" is selected, the system will mount it to the/mnt/sysimage path. In rescure mode, # chroot/mnt/sysimage can be used to switch to this path, which is the actual file of the system. The rescure mode system is actually a pseudo system.
# Exit --- return to rescure mode ---
# Mount-t iso9660/dev/cdrom/mnt/cdrom --- mount the cdrom to the/mnt/cdrom path ---
Because the files required to repair the kernel are under the Packages directory of the mounted disc, you must first mount the optical drive to repair the kernel.
Repair the system kernel. After the repair is completed, repair the grub program.
# Chroot/mnt/sysimage --- enter the damaged Linux system ---
# Grub-install/dev/sda --- install the grub program to/dev/sda ---
# Ls/boot/grub --- check whether the grub. conf file is contained in the grub directory
After the grub file is fixed, reboot restarts the system.
Fortunately, according to the English prompt, wait a few minutes. After * The progress bar is filled up, the system restarts again to solve the problem.