When the server is started, the hardware and software are automatically loaded. If a hardware or software error occurs, the service cannot be started. Next, let's talk about the errors. 1. MBR boot file error or loss of MBR = 512 byte = 446byte boot device information + 64byte partition table information + 2byte leading bit phenomenon: When the MBR of the server is lost or wrong, the system starts a black screen, the cursor in the upper left corner keeps flashing. We recommend that you back up the MBR file after the system is installed. The BACKUP command [root @ rootbug ~
When the server is started, the hardware and software are automatically loaded. If a hardware or software error occurs, the service cannot be started. Next, let's talk about the errors.
1. MBR boot file error or loss
MBR = 512 byte = 446byte boot device information + 64byte partition table information + 2byte partition bit
Phenomenon: When the MBR of the server is lost or wrong, the system starts the black screen and the cursor in the upper left corner keeps flashing.
We recommend that you back up the MBR file and Backup command after the system installation is complete.
[Root @ rootbug ~] # Dd if =/dev/sda of =/mbr. bak bs = 1 count = 512
Copy mbr. bak to another machine or another device and save it.
Solution:
(1) You can use USB Linux and other systems to boot into the system, and then re-mount the damaged system partition for repair.
(2) Use the rescue-free mode (linux rescue) for saving
(3) Remove the hard disk, load it on a good linux system, and use a good system to repair the damaged system.
The above three methods are similar-use other good systems to repair damaged systems
For specific repair methods, select the second method above and use the CD to repair the linux rescue:
(1) Place the CD to the server's optical drive and set the system to start from the CD
(2) Select Rescue intstalled system to log on to the Rescue-free system.
(3) After selecting the option, follow the steps for installing the system. We recommend that you set the IP address when setting the network. This may be useful. The next step is "Continue ", when "Read-only", "Skip" and "Advanced", we recommend that you select "Continue" to automatically mount the damaged hard disk to the/mnt/sysimage of the temporary system, if automatic mounting is not possible, it will not be affected. You can mount it after entering the temporary system. If you press "continue" in rhel6.3, the disk will not be found (due to the mbr loss, if it is another error, it is normal to select "continue"), and the command line mode in "Save mode" cannot be entered; you can press skip to enter the command line mode.
(4) If the MBR has been backed up by the system, you can copy the MBR backed up through the network or USB flash disk to the damaged system directory.
2. the superblock of the system has crashed.
Superblock records the innode node and idle disk information. When a super block is damaged, an error message is displayed when the drive letter is mounted. The following figure shows that the super block is damaged in partition/dev/sda13.
[Root @ rootbug ~] # Mount-t ext3/dev/sda13/quota/
Mount: wrong fs type, bad option, bad superblock on/dev/sda13,
Missing codepage or other error
In some cases useful info is found in syslog-try
Dmesg | tail or so
[Root @ rootbug ~] # Dumpe2fs/dev/sda13
Dumpe2fs 1.39 (29-may-2006)
Dumpe2fs: Bad magic number in super-block while trying to open/dev/sda13
Couldn't find valid filesystem superblock.
Solution:
E2fsck can be used for restoration.
[Root @ rootbug ~] # E2fsck/dev/sda13
3. grub file loss or damage
Symptom: When the grub file of the system is lost or damaged, go to the grub> prompt interface when the system is started.
Solution: manually build grub to enter the system and repair it. We recommend that you use the Tab key to complete the command.
Grub> initrd (hd0, 0) ------------ press ENTER
Grub> kernel/vmlinuz-2.6.32-279.el6.x86_64 roroot =/dev/sda1 --------- press enter to recommend the use of the Tab key, because each Server Installation of the kernel is not the same as the need for Tab to complete, the ro behind it indicates read-only root =/dev/sda1 indicates the partition where your heel partition is located. If the heel partition is in sda2, It is root =/dev/sda2.
Grub> initrd/initramfs-2.6.32-279.el6.x86_64.img -------- press enter it is recommended to use Tab, because the kernel installed on each server is not the same as the Tab to complete
Grub> boot ------- press enter to start the system
After entering the system, manually write the grub. conf file and put it under the/boot/grub/directory and/etc.
4. the/etc/fstab file is lost or damaged.
The fstab file records the partition of the entire hard disk. The system reads the file at startup and then loads the hard disk.
Symptom: When the fstab file is lost or damaged, an error is reported when the system starts and reaches the third step of the service.
When the third step is reached, you are prompted to enter the root password, and then enter the repair system # prompt interface.
(Repair system) # vim/etc/fstab -- this cannot be modified. It is readonly and cannot be modified by force writing.
(Repair system) # mount-o remount, rw/-- Re-mount your root in read/write mode, and modify/etc/fstab in vi to enter the system.
The above method can only fix the fstab error.
When fstab is lost, it cannot be repaired. Therefore, when fstab is lost, you can only enter the system in linuxrescue rescue mode, and then write fstab manually.
5. inittab
The inittan file defines whether the system starts to enter the character interface, graphical interface, or restart. When the graphical installation package has a problem or is not installed yet, And inittab defines 5, an error is reported when the system is started. Select the second option on the startup system selection page, press the letter "e", and then press the letter "e ", add 3 after the prompt that appears (enter a space before 3), press enter, and then press the letter "B" to start the system. At this time, the system is displayed on the Character interface, after entering the system, re-install the graphical interface data packet
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10