How to solve hard disk damage when Linux cropping system

Source: Internet
Author: User

How to solve hard disk damage when Linux cropping system


In the system cropping, in order to reduce the waiting time, generally choose to hang the host and directly run the target system, but too frequent operation, often causes the hard disk can not be synchronized in time, causing the hard disk partition damage, resulting in the target system can not start normally. In this case, it would be too cumbersome to reformat the partition again.


This paper solves the problem by means of archive packing, and avoids the tedious repairing process effectively.


First, go to the root directory of the target system package compressed files to the specified location (assuming the host's/mnt/sysroot directory)

Find. | Cpio-h NEWC--quiet-o | gzip >/root/sysroot.2.gz

Second, uninstall the damaged partition

Fuser-km/mnt/sysroot

umount/mnt/sysroot/

Third, reformat and mount the partition

Mke2fs-j/dev/hda2

mount/dev/hda2/mnt/sysroot/

Iv. return to the root of the target system again, restore the files and perform the synchronization

cd/mnt/sysroot/

zcat/root/sysroot.2.gz | Cpio-id

Sync

Five, hang the host, open the target system of the virtual machine, the general will be able to run normally


This article from "Not Daze" blog, please make sure to keep this source http://tobeys.blog.51cto.com/10620284/1775170

How to solve hard disk damage when Linux cropping system

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.