28.02.2021

The boot sector of the disk is damaged. Boot sector recovery


No matter how advanced an operating system is, it cannot be loaded without two sectors on the hard disk that contain the code required to start any operating system. The first sector is called the Master Boot Record (MBR); it is always located at the address: sector 1 / cylinder 0 / head1 and is the very first sector hard disk... The second most important sector is the Boot Sector ( boot sector) located in the first sector of each volume.

Master Boot Record

The Master Boot Record is the most important disk structure; this sector is created when the disk is partitioned. The MBR sector contains a small code called the Master Boot Code, as well as the disk signature and partition table. At the end of the MBR sector, there is a two-byte structure pointing to the end of the sector. It has the value 0x55AA. A disk signature is a unique number located at offset 0x01B8 that allows the operating system to uniquely identify a given disk.

The code in the MBR sector does the following:

  • looks for the active partition in the partition table;
  • looks for the starting sector of the active partition;
  • loads a copy of the boot sector from the active partition into memory;
  • transfers control to the executable code from the boot sector.

If these functions fail to complete for some reason, one of the following system error messages is generated:

  • Invalid partition table;
  • Missing operating system.

Note that there is no concept of MBR for floppy disks. The boot sector is the first sector on the disk. It should also be remembered that each HDD contains an MBR sector, but the boot code is used only on disks that have an active primary partition.

Partition table

A partition table is a 64-byte structure used to determine the type and location of partitions on a hard drive. The content of this structure is unified and does not depend on the operating system. Each partition occupies 16 bytes, so there can be no more than four partitions on a disk.

Information about each section starts at a certain offset from the beginning of the sector, as shown in table. 1 .

Note that under MS-DOS, only volumes with a System ID field of 0x01, 0x04, 0x05, or 0x06 are available. However, volumes with a different System ID of this field can be deleted using the FDISK utility.

Cylinder, Head and Sector fields

The fields Starting Cylinder, Ending Cylinder, Starting Head, Ending Head, Starting Sector, and Ending Sector (collectively called CHS) are additional elements of the partition table. The boot code uses the values ​​of these fields to find the boot sector and activate it. The Starting CHS fields of inactive partitions indicate the boot sectors of the primary partitions and the extended boot sector of the first logical drive in the extended section.

How to repair hdd boot sector

Almost every computer user faces the problem of hdd sector corruption. There can be a number of reasons for this, from improper shutdown to deep penetration of the virus. There are many possible ways how to recover the hdd boot sector and data on it (in some cases, information may be lost forever). Some options will be too complex for ordinary users PC, and the worst thing is that incorrect actions can lead to this very process of irrecoverable data loss or global damage common system... Therefore, the first rule before starting the restoration work is to try to reduce the number of impacts and especially incomprehensible and unverified manipulations. It is not recommended to delete, cut or copy anything. Each problem is individual, so you will need to check the sector using different software. There are many different programs, the most popular are:

HDDScan;
Active File Recovery;
R-Studio;
Norton Partitionmagic;
Raxco;
EASEUS Partition Master.

And this, of course, is not all, but these programs most often cope with the task at hand, and use good reviews among users. Alas, and this is not always able to restore the hdd boot sector as soon as possible, there may be problems with the type determination file system or the presence of this sector will not be visible.

Formatting the media

This method is suitable for those who do not care about the information on the media and it is important to restore the hdd boot sector as soon as possible. After this procedure, in 80% of cases, work is fully restored. But this method is often resorted to in the most extreme cases, because data on the disk still plays for almost everyone important role especially if it's a work computer.

Testdisk
If the user encounters a problem for the first time and absolutely does not know how to restore the hdd2 boot sector, this utility can very quickly cope with the task. However, not without the participation of the user himself, it will be necessary to understand some points. The special complexity of the program is the English interface. With knowledge of technical words, the system will be understandable.

Consider this way the points:
1) Find Create a new log file, if necessary, enter the log.
2) Next, you need to find the damaged media by describing its characteristics, for example: Disk / dev / sds - 160 GB, select it.
3) Next step, select the partition type among Intel, Sun, Mac, etc.
4) After that, possible operations are opened that can be done with the disk. We choose Analyse.
5) Next comes the analysis of possible losses and general structure.
6) Selecting geometry on disk
7) The final steps in the "Master Boot Record" section are responsible for rebooting the sector. You need to select the damaged disk, then check the sectors, rewrite the MBD.

With the correct course of action, after a reboot, the disk should function again and at the same time have all its data as it was.

Second way to use on Windows
For various reasons, the first option may not work, and the question of how to restore your boot sector hdd3 remains open. To understand the recovery process itself, let's take a closer look at what MBR is.

MBR is the very first sector that occurs on the disk, it has a special table with partitions, and boot program, it reads the data and its path, starting from the hard disk and ending with the partition of the installed operating system.

Course of action:
1) First you need to turn on the computer and choose to boot from the installation disk or USB drive, press any key and in the window Windows installations select "System Restore", if a problem is found, press the fix and reboot.
2) If this did not help the boot sector, reopen the "system restore" and select the item "next", in command line write bootrec / fixmbr. This command will make the master boot record compatible and solve the problem of its corruption. But nothing will change in the partition table.
3) We knock out the following command bootrec / fixboot, this action writes a new boot sector, which will be compatible with Windows. We press "exit" and restart the computer.

All in all, this should work! But as practice shows, it is not so easy to restore the hdd boot sector, and in this case there are more methods and commands:
1) The bootrec / ScanOs command, does a full scan and search operating systems, if found, it will be visible on the screen.
2) bootrec / RebuildBcd is used to add the found Windows to the general boot menu, the combination of Y and enter will complete the add process.

If this does not have the desired effect, a command like bootsect / NT60 SYS can individually restore the hdd boot sector by updating the main boot code. Then you need to click "exit" and restart your computer.
Of course, these are far from all existing methods and programs, so if these options did not help, it is reasonable to contact the computer forum, because many users are faced with this problem and tell each other how to act in order to reasonably restore the hdd boot sector, and not inflict it yet more harm. Boot sectors are quite a popular topic, if you google it becomes clear that situations with a broken bootloader can be very different, but almost always there is opposition to any action. Here are some more good and effective hard drive recovery programs:
MBRFix
Paragon hard disk
Hirlen's Boot

Boot from the emergency system floppy disk and run the SYS C: command, which will create a Boot Sector on the system disk and copy the system files there. Make sure that the operating system versions on the floppy disk and on the disk being restored are the same.

Boot Sector recovery is easier to perform in an "automatic" way, but this does not exclude the possibility of "manual" recovery using a pencil, paper and the disk editor. As mentioned above, if the restored disk contains intact (or at least partially damaged) elements of the logical structure, save them as files on the spare disk.

Not an easy case. Not only Boot Sector destroyed

However, there is a copy of the required system areas in the form of files or disk areas.

Perform a standard formatting of the main disk partition, i.e. with the format C: command. At the same time, the file structure of the formatted disk partition is formed with the recreation of the Boot Sector, clean FAT and Root Directory, the data area is not affected, i.e. the information in the Data Area does not change.

Check if the location of the root directory is correct. To do this, DiskEditor, in the cluster view mode of the newly created partition, by searching for the "Subdirectory" object, check the coincidence of the physical cluster numbers and the cluster number in the first record of the found subdirectories. If the numbers do not match, it is necessary to correct the value of the number of FAT sectors in the Boot Sector boot record. The adjustment is carried out by increasing the sectors by a multiple of half the number of sectors in the cluster. As a rule, such adjustment is necessary in cases of non-standard disk partitioning or after artificial resizing of partitions.

If you are lucky and you have the surviving FAT and / or Root Directory images backed up as files, you should use DiskEditor to restore them to the disk. If you have a second copy of FAT, but the first one does not, you should copy the second copy and replace the first copy.

If you have survived one of the FAT copies and the root directory, after completing all the points above, full access to information on the disk will be restored.

How to restore Boot Sector manually

The Boot Sector address can be found in the physical sector with coordinates 0/0/1 (Track / Head / Sector) in the corresponding section of the Partition Table element. Next, you need to go to this sector and view it in the Boot Record format (the F7 key in the Disk Editor program). If there is "garbage" in the fields of the root sector, then this sector must be manually restored. You need to fill in the rest of the boot sector with zeros or copy the boot sector of the system floppy to this place if the disk partition is active (C :) Then you need to manually fill in the control fields of this sector:

Boot Record field

Correct value

You can write your name here

Bytes per sector

Sectors per cluster

We calculate later

Reserved sectors at beginning

Root directory entries

Total sectors on disk

This value is taken from the Partition Table (field + 0Ch in the corresponding element)

Media descriptor byte

Sectors per FAT

We calculate later

Sectors per track

The value is taken from Drive info

Special hidden sectors

This value is equal to the Relative Sectors value (field + 08h in the corresponding Partition Table element) If the disk is not bootable, then the number 8388608 (800000h) is added to this value

In this table, the Sectors per FAT and Sectors per Claster fields are left blank. They need to be calculated additionally:

Sectors per FAT: Look at the disk sectors following the Boot Record until we find the beginning of the root directory. We remember the coordinates of the directory sector. Then we calculate the relative number of this sector relative to the Boot Record, assuming that the Number of Sides on the disk, the Number of Sectors per Track and the Relative address of the Boot Record = 1 are known. Then we find the required S / F field:

S / F: = (<Относ. сектор каталога>-1) div 2.

Sectors per Claster: This value should be chosen on the basis that it can take on the values ​​8 sect / clast or 4 sect / clast.

Note. The description above is for FAT 16. If your disk uses FAT 32, refer to it. the description

But with her there are problems. When a computer running this OS refuses to boot, it may be necessary to restore the CDM boot sector, from which the entire system is initialized and started.

If the problem is not related to user actions, as a rule, the built-in diagnostic tools of Windows 7 will be able to solve the problem on their own, just wait for the restart after an unsuccessful start, in which you will be prompted to boot into the system restore tool and select the option to fix it yourself.

So, if you encounter the problems described at the beginning of this material, first of all, calm down, nothing terrible happened and everything can be fixed, since restoring the boot sector for a modern operating system is a regular procedure.

Your actions will differ depending on what exactly led to the inability to boot into the "seven".

If you have installed the WinXP operating system on top of Win7, then you should download the EasyBCD program. By running it in XP, you can restore the bootloader in a few simple steps and return it to the list Windows boot 7.

If, for example, you installed Windows XP on top of Windows 7 and booted through EasyBCD, and then, for some reason, decided to demolish the XP partition on the CDM, then you have a more difficult situation. By removing XP, you also removed EasyBCD, which means that now the computer does not know how to load at least some OS.

To restore the Windows 7 boot sector, you will have to remember where you have the Win7 recovery disk (you created it, of course, right?) Or, if the answer is no, then we are looking for a disk It does not matter what you find that is, then insert it into the drive ... Now you need to boot from the disk and enter the "System Restore" section. Using the Bootrec.exe utility available on installation disk and the recovery disk "seven", the recovery of the Win7 boot sector will not take much time.

When you select "System Restore", after a short wait, you will have options, most likely, it will be possible to restore only one OS - Windows 7. On the next screen below, you will see the "Command Prompt" option, click on it and a window will open in which will need to type several commands.

First, you need to check if everything is in order with the Bootrec utility by typing in bootrec and pressing the Enter key. Further, each command will need to be completed by pressing this key. A text describing the utility's capabilities appears.

In order to start recovering the boot sector, we will type the command

If in response the computer writes that "Operation completed successfully" then everything is in order and the bootloader has been rewritten. You can go to the second part, we type the command

bootrec / fixboot

After you press enter, the computer will form a new boot sector, you can now type the command

After all these manipulations, you can and enjoy normal work your OS.

As you have seen, restoring the Windows 7 boot sector is really a very simple procedure.

If Windows does not start when you turn on your computer, the process freezes on a black screen, then the hard disk boot record (MBR) may be damaged.

External manifestations

When an error appears on the screen, doubts disappear.

Other information about a malfunction of the HDD bootloader may also be displayed.

The text information can be different depending on the classification of the error. But when the word boot is mentioned, it is clear that there is a problem with the boot.

How to recover the MBR is reported on this page.

Causes

Pay attention to the common causes of HDD boot sector failures.

Two types of bootloader

Older systems prior to Windows XP used the NT Loader (NTLDR). In Windows 7, Vista and subsequent versions of the OS, UEFI and EFI began to be used. Therefore, old and new systems are usually not installed on the same PC. Otherwise NTLDR overwrites UEFI.

Third party software

Errors in the HDD boot sector can occur when using even popular programs for the hard drive partition. I've had this happen with Acronis. This happens because such software replaces the disk boot drivers with its own. This can corrupt the original MBR. Therefore, it is better to use the built-in hard disk partitioning methods from Windows.

Viruses

Viruses sometimes introduce their "order" in the MBR. Therefore, after restoring the HDD boot, check the computer with anti-virus programs.

If you are sure that the cause is viruses, then clean the PC of them before repairing the MBR. For this, there are utilities of well-known antivirus companies, for example - Kaspersky Rescue Disk. They are provided free of charge on official websites with instructions for use.

Any of these programs is included in the set of software for CD or DVD, which allows you to boot from a CD, find and remove viruses on the HDD.

Windows 7 Boot Repair

Sector repair is performed from a CD or from a USB flash drive with the operating system installation package.

  1. First, insert the DVD into the floppy drive or flash drive into the USB connector with the Windows distribution.
  2. Then you need to allow launching from these devices. This is done in the BIOS settings.

Changing download sources

Technology of the following order:


Be sure to press F10 when you exit, otherwise the changes will not be saved!

Working from a CD or flash drive

Proceed in the following order:

  1. After rebooting, an inscription will appear at the bottom: "Press any key ...". It is asked to press any key. Click. Otherwise it will not work. If the inscription has already disappeared, repeat all over again. To do this, press three keys at once: Ctrl + Alt + Del. This will cause the computer to restart.
  2. When you boot from DVD or USB stick, the Windows installation window will appear. At the bottom left, select "System Restore".
  3. They will offer to connect network capabilities, select languages ​​or a drive letter. Do not change anything and come to the choice of systems.
  4. Highlight the required Windows and check the box next to "Use recovery tools ...".
  5. If the required system is not there, then it should appear when you click "Download drivers".
  6. Continue with the "Next" button.
  7. In the next window, select "Startup recovery", and the MBR can be reanimated in automatic mode.
  8. If the sector does not work, then press "Command line".
  9. On the command line, call the Bootrec utility and write for it to repair the MBR: bootrec / fixmbr... End each command with the Enter key.
  10. Then you create a new boot sector: bootrec / fixboot... To exit the program, type exit and remember to press Enter.

If the fixes didn't help

There is one more MBR resuscitation team - bootsect / NT60 SYS... After that, try to boot again.

In case of an unsuccessful attempt, write on the command line like this: bootsect / rebuildbcd. This will search for operating systems installed on your PC.

Now try to log into Windows again. Please note that there will be one more systems in the list now. Try to go to each of them. It should work!

Non-standard way

If you have not saved all the options for recovering the sector, then it is recommended to reinstall Windows. And no matter how much you want to do it sometimes! Isn't it true?

I also thought so and decided to put another small system next to it. What does "small" mean? This is a bootloader system. It is empty: I did not install drivers and my programs on it, because I do not work in it. But it loads!

What I needed, I achieved: a working boot area appeared on the hard drive. Now I can log into the old system normally. The downside is that it lost about 14 GB of disk space. If you are not afraid of this, you can take this method into service.!

How to fix a sector in Windows 8-10 and Vista?

For Vista and later Windows versions the same methods are suitable as for the "seven", only the design is different. For example, in the G8 he is like that.

But the points remain the same. Therefore, we will not describe them. Use the instructions above for Windows 7.

On Windows XP

In the "expish", the principle of reanimating the sector is similar. But the entrance is a little different. Now you will see it:

  1. After booting from the CD, the system files are copied to the hard drive.
  2. Then the action selection window appears.

2021
maccase.ru - Android. Brands. Iron. news