How to Use the Linux rescue mode

Source: Internet
Author: User

What do you do when a problem occurs in your Linux system? reinstall it directly or use the Linux rescue mode. Maybe you are unfamiliar with this model, but it does not prevent him from providing great help to you. It can help you to save a lot of important data. You don't have to worry about your superiors.

Now I will explain how to go to the rescue example system: RHEL 3)

1. Use the installation CD or hard disk installation method to enter the installation interface, and enter Linux rescue in shell.

2. Select the language and keyboard format as prompted.

3. select whether to configure the NIC. Generally, when the system reaches rescue, the network does not need to be configured. Therefore, you can choose whether to skip the NIC configuration. You can also choose yes if needed, the specific setting process is the same as that during installation.

4. Select whether to allow the system to search for the RHEL system on the hard disk and choose to continue.

5. The system on the hard disk has been found and mounted to/mnt/sysimage.

6. Press the prompt chroot/mnt/sysimage

After chroot, you can already be in your system to be saved.

Grub is down. grub-install/dev/hdxx

If the configuration file is incorrect, vi/etc/fstab vi/etc/inittab ......

Rpm-F xxx. rpm where the software package is destroyed

After the repair is completed, exit the command to exit chroot and exit the rescue shell system to restart.

Note:

If the system on your hard disk is a non-rhel system, such as debian, the rescue program cannot find the system on the hard disk in step 3, so we chose to "Skip ", directly go to shell. suppose there is one

Debian system/dev/hda1 is/boot partition/dev/hda5 is/partition/dev/hda6 is swap. So we will do this now.

# Fdisk-l view partition information)

# Mkdir/mnt/Linux

# Mkdir/mnt/Linux/boot create a directory based on the information obtained by fdisk-l)

# Mount-t ext3/dev/hda5/mnt/Linux

# Mount-t ext3/dev/hda1/mnt/Linux/boot mount the file system on the hard disk)

# Chroot/mnt/Linux chroot change the working system)

Since then, we have successfully moved into the debian system on the hard disk, and the rest has been the same as before.

In addition:

If your system is corrupted, you do not need to mount the chroot system.

Directly fsck/dev/hdxx.

In fact, if we think about this rescue, we will find that the so-called rescue mode is just a Linux operating environment with shell, and then mount and chroot to access the system to be repaired.

Therefore, without a rescue disk, I can use Linux livecd or Linux on a floppy disk to enter the shell environment and redo it.

# Fdisk-l view partition information)

# Mkdir/mnt/Linux

# Mkdir/mnt/Linux/boot create a directory based on the information obtained by fdisk-l)

# Mount-t ext3/dev/hda5/mnt/Linux

# Mount-t ext3/dev/hda1/mnt/Linux/boot mount the file system on the hard disk)

# Chroot/mnt/Linux chroot change the working system)

You can simply enter a Linux rescue mode.

  1. Describes the Problems and Solutions of Linux system calls.
  2. Detailed introduction to Linux USB flash drive boot and installation I) self-guided mode
  3. Briefly introduces how to install Twitter on Linux
  4. Roles of seven Linux Command destruction
  5. Comprehensive Analysis of Linux system management command w

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.