Hard Disk repair note (2)-Linux + windows disk repair and data recovery

Source: Internet
Author: User

Recently, I had to worry about it one by one. Even my laptop that never accompanied me all the time had a bad time with me. A plug-in QQ crashed my hard drive. In the past, I tried the software and tested the software with extra caution. I installed the software on the physical machine only after several attempts on the Virtual Machine and the video sub-system, no tests were conducted to download a QQ with an explicit IP address. As a result, the system was inexplicably unable to access the official website of anti-virus software in China, and the anti-virus software and Trojan horses could not detect any situations, recently, due to poor mood and long-time software Trial tests, the entire system is also bloated, so I want to restore the system, so the problem is ......

 

I installed a Linux + XP dual-system (If you want to try a dual-system in this mode, you must first install the Windows system and then install linux. Otherwise, you must fix the grub startup item in the Linux system to start Linux normally.), In this case, the computer normally runs from the LinuxGrubBoot, and then start to XP or Linux. Normally, if the Linux system cannot be started again after the Windows system is reinstalled or restored, you need to fix the LinuxGrub startup Item, Or when restoring windows, the startup Item or partition table is not modified (MBRAt this time, the system does not need to be modified. Everything is the same as before. The worst case is that after the system is restored, the hard disk partition table is damaged, and the system cannot enter windows or Linux, what's worse is that the system does not recognize the hard disk directly. This is the biggest headache, and I have encountered this situation. Because my laptop is mine, it is especially troublesome to disassemble and mount the hard disk during hard disk repair.

 

When talking about restoring the system, I encountered the worst problem after the system was restored. Neither Linux nor XP could be started, and the PE system and ghost tools, even the original windows disc cannot recognize the hard disk, and the hard disk cannot be read after the hard disk is removed (When connecting to a computer as a mobile hard disk, only the hard disk can be seen in the Device Manager, but cannot be identified in the disk manager.), But the motherboard can recognize the hard disk, that is, the BIOS can recognize the hard disk, and can feel the normal addressing of the hard disk, because the hard disk has not been touched, fell, so it is inferred that the disk partition table was damaged. Maybe you are happy. Now that you know the reason, you can fix the disk partition table.Fdisk,DMWait, it's easy to fix the MBR, but you're so happy too early. As mentioned earlier, the PE and ghost tools cannot recognize the hard disk. The current situation is dos, which cannot be identified like DM, connectionPc3000)This powerful tool is useless. I am in a hurry. I have saved my materials for several years. If I deliver the materials to the after-sales service, all the data is complete. If I get the hard disk repair center, younger brother, I don't have that much money (it is said that the data Repair Price is 100rmb/10 MB, But I have hundreds of GB). Besides, I am not physically damaged, the service must be slaughtered.

 

Now I can only work out a soft solution. Now I suddenly think of the above mentioned. When the XP + linuxs dual system is started, it starts from grub in Linux. The problem may be found here, maybe the disk partition table is not completely updated or there is no update to replace the Linux Startup information at all. Then I will use Linux to fix the startup Item and repair MBR, so I will use the Linux installation CD to enter the system rescue mode, inputGrubAnd then enterRoot (hd0, 7)(Adding 0 indicates the first disk, and 7 indicates the seventh partition), and thenSetup (hd0)But the command directly reported an error and could not find the disk. Alas, I was always disappointed after Hope. Haha, but I can't do anything else. I still have some problems, but I can't fix them manually, try again to overwrite the installation and repair. If you don't try it, you don't know. It turns out that not only the startup Item is damaged, but the LINUX partition of the entire disk is messy. (a large number of disk errors were detected later, the disk will be automatically repaired during detection. It took two whole hours (most of the time was a false death, which challenged my patience) and finally completed. Linux can be started, but it cannot be started to X-Windows. It can only be in the command line state (similar to DoS). At this time, I started to try to start the PE system, failed to start, and then tried to install windows, the hard disk cannot be detected. If the disk fails, data can only be restored in Linux. First, check whether the Windows partition is normal. It is so excited that the windows partition has not been damaged. The following may involve many Linux commands:

 

First, enter the Super User administrator (Root) status in the Linux Command Line status: EnterSuAnd then enter the root password to enter the root state;

View System partitions:Fdisk-lTo list all valid partitions of the current disk. You can see the following:

/Dev/sda1*1 ***** (this indicates end data) ***** +(BlocksData) 83HPFs/NTFS// Indicates the primary partition (* 1) of the disk, which is the NTFS partition of windows, that is, the C disk of windows.

/Dev/sda2 ***** 5 Extended partitions.

/Dev/sda5***** ******* 83 HPFs/NTFS: At this time, my computer represents a d disk in NTFS format.

/Dev/sda6***** ******* + 83 Linux indicates the first partition of Linux.

/Dev/sda7***** ******* 83 HPFs/NTFS: At this time, an edisk in NTFS format is displayed on my computer.
/Dev/sda8***** ******* 83 HPFs/NTFS: At this time, a f disk in NTFS format is displayed on my computer.

......

 

In order to copy data to the mobile hard disk, we need to connect to the mobile hard disk via USB. The partition information of the mobile hard disk is listed here.

/Dev/sdb1***** ******* 83 HPFs/NTFS move the first partition of the hard disk

/Dev/sdb2***** ******* 83 HPFs/NTFS mobile hard drive second partition

 

Now that you know the partition information, you can mount these partitions in Linux and then restore the copy data.

Mount the hard disk now:

First, you need to create a directory to be mounted in Linux (using a mobile disk or USB flash disk in Linux is different from that in Windows, you need to create a directory and then mount the disk, generally, the External Device directory is under/mnt)

Create the directory to be mounted:

Mkdir/mnt/d (note that the root directory can be changed to MNT/D)

Mkdir/mnt/E

Mkdir/mnt/F

Mkdir/mnt/hdd1/mnt/hdd2 // create a directory for attaching a mobile hard disk

 

Now mount the partition :(The following are all/mnt/d in the root directory:Replace with MNT/d)

Mount-t ntfs (if the fat format needs to be changed to vfat)/dev/sda5/mnt/d // Mount disk D of Windows partition to Directory D

Mount-t ntfs/dev/sda7/mnt/E

Mount-t ntfs/dev/sda8/mnt/F

 

Mount-t ntfs/dev/sdb1/mnt/hdd1 // mount the first partition of the mobile hard disk

Mount-t ntfs/dev/sdb2/mnt/hdd2

(Remember to unmount the hard disk umount/mnt/d ......)

 

Then CD/mnt/d and found that all data on the d disk in Windows was still there. Haha, I finally succeeded. Now I started to copy the data to the mobile hard disk.

You can copy the entire disk:

CP-r/mnt/D/mnt/hdd1/c_backup (the Linux Copy command is different from Dos, CP rather than copy, and the-R parameter is used to copy the entire directory)

......

In Linux, you can run the fsck command: fsck-A/dev/sda1 to fix the disk.

The Linux Startup item file is saved inIn the/boot/GRUB/menu. LST file, you can useVI/boot/GRUB/menu. lstOpen the file and modify

Create a directory in Linux using mkdir and delete the directory using Rd

The common user enters the root user mode. Enter Su on the terminal. If there are multiple other users, enter the root user and then the password.

Disk mounting must be performed by the root user or administrator.

 

Haha, I am not clear about it. Here I am only talking about my solution process. I have seen many similar issues on the Internet. The motherboard can recognize the disk, that is, the system won't recognize it, however, there is not much useful information. Maybe this example is rare. I only hope that if there is such a problem, there will be a general solution, so it will not be confused and anxious, it's really uncomfortable. I 've been tossing me for several days.

 

(In fact, when I mount a hard disk to copy data, I always report an error when I mount an e disk of windows. Therefore, I cannot copy data, which leads to a lot of data loss and is very depressing, but I finally recovered most of the data, I am considering fixing the e-disk information ......)

 

 

 

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.