How to revive Windows, and save the data using live-distribution Linux
Vindovs / / December 19, 2019
With your Windows that something is wrong. Perhaps you have forgotten your password, you picked up a virus, your hard drive errors or showering system simply refuses to boot. The easiest way to reinstall Windows. But what if the drive remains the most important information that you do not want to lose?
Before re-installing the system, give Linux a chance. With a boot disk with a live-way Linux distribution, you can try to recover forgotten Windows password, recover lost data, scan your computer for viruses, or even copy the files that you can still save.
This information can be used both for good and for evil. Be careful not to hurt yourself and others.
preparation of Linux
First of all, you need to download the ISO-image of the desired Linux-distribution that supports the live-loading. Live-mode - this mode when the system is booted from external media. It works with almost any distro. Take, for example Ubuntu.
Download ISO-imageSuitable for your computer. After loading the image it needs to burn to a USB flash drive with the help of
Rufus or on the optical disc using the standard Windows means for recording. If you record a disc under Linux, you can do this by running dd.When the disc, insert it into the faulty computer, select the BIOS to boot from external media. When Linux will offer installation options, select "Start without installation".
Connecting Windows partition
Typically, Linux mounts once all hard disk partitions. To do this, open the appropriate section in the file manager.
However, in some cases, Linux can not mount partitions. This occurs most often with the Windows partition with enabled hibernation feature in Windows 10 and hybrid hibernation is used every time you turn. There are several ways to fix it.
1. You can disable hibernation in Windows settings. Your computer will boot more slowly, but will disappear problems mounting sections.
2. You can mount the Windows partition directly from Linux. To do this, in a terminal, type the command sudo fdisk -l
. So you will see a list of drives on your computer.
Remember the name of the Windows-section, which has the form /dev/sd*And enter sudo mount -t ntfs-3g -o remove_hiberfile / dev / sd * / mnt
3. You can restart Windows, and then boot into Linux. The fact that the hybrid hibernation Windows 10 is not used when you reboot.
password reset
to reset Windows password, Do the following:
1. Log in to the terminal and add repository: sudo add-apt-repository universe
2. Update the list of packages: sudo apt-get update
3. Give the command to install chntpw: sudo apt-get install chntpw
4. Open the file manager and find the partition that hosts Windows. Locate the folder Windows / System32 / config and the SAM file in it.
5. Copy the address of the file. It should look something like this: /media/689G10259A0FF9B1/Windows/System32/config
6. enter the command cd / media / 689G10259A0FF9B1 / Windows / System32 / config
7. Then, run the utility chntpw to search for Windows users: sudo chntpw -l SAM
8. The console will display a list of Windows users. Select the user name that you want to reset the password and enter sudo chntpw -u username SAM
9. The console will offer options. Enter the desired number of steps:
1 - reset the password;
2 - set a new password;
3 - make the user an administrator;
4 - unlock the user (if the user stood value table dis / lock, The user has to first unlock).
10. After selecting the desired action of the console will ask for confirmation. Press the «y».
Checking equipment
RAM
If Windows can not start because of a hardware failure, it is necessary to check the serviceability of equipment. You can find out what is not working, and to replace this component.
To test the memory, use the utility Memtest86 +, which is in almost every Linux distribution. When Linux boots, it will offer to check the memory. Select this option.
Testing the memory can last long enough. If memory has some problem, Memtest86 + will report on this. If the problems are related to RAM, it should be replaced.
CPU
If you suspect that the reason for the frequent failure is the lack of CPU power or insufficient cooling can start cpuburn. This command line utility creates a maximum load on your CPU, forcing him to work and devote more and more heat. Set cpuburn the following command: apt-get install cpuburn
Then simply run it from the console: cpuburn
If the cooling system or the power that something was wrong, the computer shuts down after 10-20 minutes from overheating. This means that the time to replace the thermal paste.
Be careful with cpuburn and do not run it on a computer without the need of serviceable.
HDD
Check the hard disk can standard application "Disks", which is in Ubuntu. Its interface is very simple and straightforward.
If you use another live-image, type the following command in the terminal: sudo fdisk -l
Look at the name of the device. Then, enter the command sudo badblocks -v / dev / sd *
hard disk check takes some time. If the disc unreadable blocks appeared, it must be replaced immediately. There are programs that mark these blocks so that they do not write anything. But this is only a half measure.
Saving data
Running the live-image of Linux, you can easily copy important data from a damaged computer.
If you need to save any files on USB flash drive, External hard drive or network storage, this can be done using any Linux file manager.
Connect to the Internet, you can download important files to any cloud, simply by opening a browser. Or select "Network" in the file manager and copy the data in the shared folders on your local network.
If you want to copy the entire disk, use the terminal:
- enter the command
sudo fdisk -l
- Note the section names that you want to clone, and a section that will contain a copy.
- then type
sudo dd if = / dev / sda of = / dev / sdc
- Wait until the console notifies the completion of the copy.
copy content /dev/sda It will be transferred to /dev/sdc. Because you can clone entire disks. Data can be transferred from one section to another, or to an external hard disk. The copy will be identical so that you can restore a cloned disk files deleted before the original.
Recovery of deleted files
When a file is deleted only by its description in the system. The data itself remains in place until the top of them is not recorded anything yet. So, if you have deleted some important files or accidentally formatted the drive, you can try recover lost data.
In Linux, there are several tools for recovering deleted files. It Safecopy, TestDisk and PhotoRec. They all work in the console. To understand how to use them, refer to the direction.
Windows Virus Check
Windows can become a victim of viruses and stop run. But you can find them with the help of Linux. Should not fear that the virus will harm your computer: in the live-image of Linux, he simply will not be able to start.
To check the Windows for viruses, you can use the free ClamAV Antivirus. Set it with the command apt-get install clamav
Cleaning hard drive
So, you have copied all the data from hard drive, made all the necessary backups and now want to include a computer repair. As you already know, to recover deleted data even on a computer with a broken system is quite simple. If you have on your hard drive to keep confidential information, it is possible to clean it before repairing.
Make sure that the disc does not have anything valuable.
In Linux, the command permanently deletes files shred. To make certain unrecoverable file, type shred
This does not delete the file, but it will make it completely unreadable and useless.
Enter to permanently delete and delete the file shred -remove -iterations =
The number of overwrites effect on the number of times a file is overwritten with a random set of bytes. By default, the file is overwritten 25 times. Usually, this is enough to restore the data could not even advanced tools.
To destroy this way the whole disk, use the command wipe. First, install the appropriate utility: sudo apt-get install wipe
Then find the desired partition or disk name: sudo fdisk -l
Then enter the following command at the destruction and the disk name: sudo wipe / dev / sda1
Use these commands with caution. When the contents of the disc will be deleted, restore it will not work.
With live-Linux distributions is quite easy to get access to the Windows files. Even if you are not going to pass on Linux, it never hurts to have on hand a boot disk.
And also think about the confidentiality of their data. Even if your system is protected by a password, you can reset it or copy files to another drive, even without going into the account. Therefore, if your computer has really valuable data, use the utilities for encryption.