Linux Emergency Rescue Experiment

Source: Internet
Author: User

Simulation experiment of Linux emergency rescue mode


Rescue mode: Emergency rescue mode

Start a Linux system on the CD, which detects the local hard disk device during startup and looks for the original root file system to complete some repairs with this system

This system has its own rootfs, but the function is simple, if you can find the original root file system on the hard disk, you can use chroot to switch to this rootfs, complete the follow-up repair;


Experiment One

Fix grub (boot loader broken)

To destroy GRUB under the system:

DD If=/dev/zdro OF=/DEV/SDA bs=200 count=1 (note that the size must not be greater than 446, otherwise the partition table will be erased)

Enter rescue mode, Chroot/mnt/sysimage

Process slightly

To install Grub:

GRUB-INSTALL/DEV/SDA already chroot,--boot-directory=/mnt/sysimage/boot can omit



Experiment Two

Fix BASH,MV/BIN/BASH/TPM simulation bash broken down

Enter rescue

Method One:

Do not chroot to/mnt/sysimage under the file system directly with rescue mode

#mount/dev/cdrom/mnt/cdrom (directory does not exist and can be created by itself)

#rpm-IVH--replacepkgs/mnt/cdrom/packages/bash-4.1.2-33.el6.x86_64.rpm--root=/mnt/sysimage/



Method Two:

Chroot to/mnt/sysimage, with/BIN/TCSH

#chroot/mnt/sysimage/bin/tcsh

#mount/dev/cdrom/mnt

#rpm-IVH--replacepks/mnt/packages/bash-4.1.2-33.el6.x86_64.rpm


Linux Emergency Rescue Experiment

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.