Trouble shouting system repair should start with the linux system startup process. I have previously written an article about the linux Startup Process: http://blog.csdn.net/avilifans/article/details/12059447.
After the boot, first load the bios program, obtain the boot sequence, and find the first boot device. Then, read the mbr sector information of the first startup device.
Normally, the Mbr displays the grub (GRand UnifiedBootloader is a program that installs the boot loader to the Master Boot Record) menu. If not, grub is faulty, you need to use the grub-install/dev/sda command to fix it. Prerequisites: You must log on to the linux system. (method: log on to the shell environment in rescue mode and use chroot, mnt, and sysimage to enter the cage environment, that is, the real system environment.
After entering the system, I did not check the grub menu, and reported an error that failed to find the boot device. The mbr is the first sector that must be read after the computer is started, therefore, an mbr error occurs.
Boot through the network (or boot through a CD to enter the rescue mode ):
Enter the rescue mode [generally enter the following interface and enter (linux rescue )]:
Enter the shell Environment
View the partition information.
The failure cannot be switched to the cage environment. cause: the partition problem is related to the file/etc/fastb (file system is automatically mounted after startup). Solution: Identify the partition, and mount it (restart the system after completion)
Mount the boot partition and create the etc/fstab file
Mkdir test; mount/dev/sda1 test
Vi test/etc/fstab
If you can access the cage environment after the restart, it indicates that the/etc/fstab file is correctly modified.
Use the command to fix grub. conf
After the instance is restarted, the grub menu is still not displayed. When the instance is started, no mount point is displayed, and the instance enters the rescue mode again (you can also boot with a CD) install the mount package in the shell cage environment. Use
Run the following command to install:
Rpm-ivh -- force -- replacefiles + package name. When you run the mount command, you can check the mounting of the partitions in/etc/fstab /.
After restarting, you will find that grub is successfully repaired and the grub menu is displayed.