Common system faults and recovery methods in RedHat

Source: Internet
Author: User
Critical situations of RedhatEnterprise5 system faults include grub configuration file loss, fstab partition mounting table loss, and/boot system boot directory deletion failure recovery. i. fault recovery for Grub configuration file loss: the Grub configuration file usually refers to/boot/grub. conf file...

The critical situations of Redhat Enterprise 5 system faults mainly include the loss of grub configuration files, the loss of fstab partition mount tables, and the recovery of faults in the/boot system boot directory being deleted.
I. fault recovery for Grub configuration file loss:
 
The Grub configuration file generally refers to the/boot/grub. conf file, which indicates which
Partitions are used to load the kernel and memory image (RAMDISK) files. the loss of this file will enable grub configuration during computer startup.
The interface is stuck.
To solve the file loss, the administrator needs to remember the basic configuration information of grub. conf, for example:
[Root @ localhost ~] # Cat/etc/grub. conf
Default = 0 # default number of systems loaded, starting from 0
Timeout = 5 # time on the Grub configuration page at startup
Splashimage = (hd0, 0)/grub/splash.xpm.gz # Grub background image
Hiddenmenu # hide a menu
Title Red Hat Enterprise Linux Server (2.6.18-8. el5) # Operating system title
Root (hd0, 0) # Operating system boot partition
Kernel/vmlinuz-2.6.18-8.el5 ro root = LABEL =/rhgb quiet # set the loaded kernel initrd/initrd-2.6.18-8.el5.img # set the load
Memory disk file
 
Solution:
1. input the following statements in the grub configuration environment that the system starts;
Root (hd0, 0)
Kernel/vmlinuz-2.6.18-8.el5 ro root = LABEL =/rhgb quiet
Initrd/initrd-2.6.18-8.el5.img
2. press boot to start the instance;
3. create a grub. conf file in/boot/grub/(the file content is the content shown just now ),
Or restore the backed up grub file to grub. conf. after the system is restarted, the system can be properly guided;
 
II. fault recovery for missing fstab partition mounting tables:
 
The fstab file is located at/etc/fstab, which indicates how the system loads system partitions after startup, such
Important system partitions such as/,/boot,/home, and swap must be mounted to the system through fstab. If this file is lost, the system

An error occurs during the mounting process. although fstab is missing in RedhatLinux Enterprise 5, the system can still be started

Interface (if installed), but an error occurs when you access the command line interface.

Solution:

If A has A system that can be started and can use commands, you can manually copy fstab to/etc, but fstab is difficult.

Note: it is best for the administrator to copy the backup file to/etc/fstab.

B. If the system cannot be started, the rescue mode of the system CD should be taken as follows:

1. put the Redhat system CD, set the boot from the CD, and enter the rescue mode (input the linux rescue );

2 findfs LABEL =/to find the partition name mounted to the original/directory;

3. go to the/mnt/sysimage/etc directory. if fstab has a backup, restore it (for example, mv fstab. bak fstab). If

No. please create a fstab by yourself. if you use chroot/mnt/sysimage to set the current root directory to the root directory on the disk

(Otherwise, the current root directory is in the CD). enter the/etc directory and restore it if fstab has a backup.

4. press reboot or exit twice and restart the light tray;

3. fault recovery when the boot system boot directory is deleted

The/boot directory contains grub. conf and kernel and memory disk files for system boot.

As a result, the grub configuration interface is not used and the error error15 is displayed. the solution can only rely on the rescue mode of the system disc.

The worst case is that the/boot directory is deleted while fstab is deleted. how can this problem be solved?

Replay?

Previous system environment:

The system assumes that linux and winxp are installed.

Mount/dev/sda8 to the/boot directory.

Mount/dev/sda9 to the/Directory

Mount/dev/sda12 to the/home directory

And/home directory backup has a kernel-2.6.18-8.el5.i686.rpm (this file is used to install the system kernel, very important, it is recommended that the administrator back up one, in the system disk also

Yes), fstab, grub. conf file

The configuration of grub. conf is as follows:

Default = 1

Timeout = 5

Splashimage = (hd0, 7)/grub/splash.xpm.gz

Hiddenmenu

Title Red Hat Enterprise Linux Server (2.6.18-8. el5)

Root (hd0, 7)

Kernel/vmlinuz-2.6.18-8.el5 ro root = LABEL =/rhgb quiet

Initrd/initrd-2.6.18-8.el5.img

Title Other

Rootnoverify (hd0, 0)

Chainloader 1

Solution:

1. enter the system disk, set the boot from the disc, and press linux rescue to enter the rescue mode;

2. at this time, the disc cannot be automatically mounted/partitioned to/mnt/sysimage. you need to manually mount the disc;

Use findfs LABEL =/to locate the partition to which the original/partition is attached, for example,/dev/sda9.

Original/home,/boot partition/dev/sda12,/dev/sda8

Mount/dev/sda9/mnt/sysimage mount/

Mount/dev/sda8/mnt/sysimage/boot mount/(note: do not attach)

Mount/dev/sda12/mnt/sysimage/home mount/home

3. switch chroot/mnt/sysimage to the root partition of the original system. Otherwise, it is the partition on the CD;

4. for example, if the administrator has a fstab backup under the/home directory, copy the fstab backup under/home to/etc/fstab. if not, configure it and restart it;

5. switch chroot/mnt/sysimage to the root partition of the original system,

6 Go to the/home directory and install kernel-2.6.18-8.el5.i686.rpm

Rpm-ivh kernel-2.6.18-8.el5.i686.rpm -- root =/-- force

7. now you can view the/boot directory and have installed the kernel file and file system file.

Vmlinuz-2.6.18-8.el5

Initrd-2.6.18-8.el5.img

8. install grub: grub-install/dev/sda.

9. copy grub. conf in/home to/boot/grub. conf. if not, configure it by yourself;

10 reboot or two exit restarts, and take out the disc to start;

This article is from the "Linux Study" blog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.