Use of rescue in Linux rescue mode

Source: Internet
Author: User
Use of the Linux rescue mode rescue-general Linux technology-Linux technology and application information. The following is a detailed description. Many people do not know that Linux has a rescue mode. Now let's go to rescue (the example system is 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 a debian system on the hard disk./dev/hda1 is/boot partition/dev/hda5 is/partition/dev/hda6 is swap. so now we are doing this.

# 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 changes 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 changes the working system)

You can simply enter a rescue environment.
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.