Menu
Is free
check in
the main  /  Education / Hard disk boot sector. Restoring the boot sectors of NTFS partitions

Hard disk boot sector. Restoring the boot sectors of NTFS partitions

No matter how promoted by the operating system, its loading is not possible without the presence of two sectors on the hard disk that contain the code necessary to start any operating system. The first sector is called Master Boot Record (MBR); It is always located at the address: sector 1 / cylinder 0 / head1 and is the first sector hard disk. The second most important sector is Boot Sector (boot sector), located in the first sector of each volume.

Master Boot Record.

Master Boot Record is the most important structure of the disk; This sector is created when splitting the disk to the sections. In the MBR sector, there are a small code called Master Boot Code, as well as a disk signature and partition table. At the end of the MBR sector there is a two-byte structure indicating the end of the sector. It has a 0x55AA value. The disk signature is a unique number located on the offset 0x01b8 and allowing operating system Definitely identify this disk.

The code located in the MBR sector performs the following actions:

  • looking for an active partition in the partition table;
  • looking for the initial sector of the active partition;
  • loads a copy of the boot sector from the active partition into memory;
  • transfers the control of the executable code from the boot sector.
If these functions for some reason can not be completed, it is issued one of the following error message messages:
  • Invalid Partition Table;
  • Missing Operating System.
Note that for flexible disks There is no concept of MBR. The boot sector is the first sector on the disk. It should also be remembered that each hDD Contains the MBR sector, but the boot code is used only on disks having an active primary partition.

Table sections

The partition table is a 64-byte structure used to determine the type and location of partitions on the hard disk. The content of this structure is unified and does not depend on the operating system. Information about each section takes 16 bytes - thus, there may be no more than four sections on the disk.

Information about each section begins with a certain displacement from the beginning of the sector, as shown in table. one.

Displacement

| |

Meaning

|

Description

0x01be | 1 byte | 0x80 | Load Indicator (BOOT INDICATOR) indicates whether the active partition is. May have: 00 - not used to load; 80 - Active section
0x01bf | 1 byte | 0x01 | Starting Head (Starting Head)
0x01C0 | 6 bits | 0x01 | Starting Sector - Bits 0-5 are used. Bits 6 and 7 are used by the following field.
0x01c1 | 10 bits | 0x00 | Starting Cylinder - 10-bit number with a maximum value of 1023
0x01C2 | 1 byte | 0x07 | System ID (SYSTEM ID) - determines the type of volume
0x01C3 | 1 byte | 0xfe | Ultimate Head (Ending Head)
0x01C4 | 6 bits | 0xbf | Ending sector (Ending Sector) - bits 0-5 are used. Bits 6 and 7 are used by the following field.
0x01C5 | 10 bits | 0x09 | Ending Cylinder (Ending Cylinder) - 10-bit number with a maximum value of 1023
0x01c6 | Double word | 0x3f000000 | Relative sectors (Relative Sectors) - Displacement from the beginning of the disc before the start of Tom, expressed among the sectors
0x01ca | Double word | 0x4BF57F00 | The total number of sectors (Total Sectors) - the number of sectors in this volume


After we have familiarized yourself with the section of the section of the section, consider in more detail some of the fields of this entry.

BOOT INDICATOR field

The first element of the partition table, the Boot Indicator field indicates whether the active partition is. We remind you that only the primary disk section can be active. It is possible to install various operating systems and various file systems on different volumes. Using the FDISK type utilities (MS-DOS), Disk Management (Windows 2000) or third-party utilities, you can activate the primary partition and set the appropriate value. this field.

System ID field

This field contains system identifier and indicates which file system - FAT16, FAT32 or NTFS - used to format volumes, and also allows you to learn some characteristics. file System. In addition, this field shows if there is an extended partition on the disk (Extended Partition). Possible values \u200b\u200bof the System ID field are shown in table. 3..

Type of section

|

Explanations

0x01 | Primary section or logical disk FAT12. Tom has less than 32,680 sectors
0x04 | Section or logical disk FAT16. Tom has from 32,680 to 65,535 sectors, or size from 16 to 33 MB
0x05 | Advanced section
0x06 | Section or logical disk Bigdos Fat16. Size from 33 MB to 4 GB
0x07 | Section or logic disk NTFS. Installable File System
0x0b | FAT32 section or logical disk
0x0c | Section FAT32 or logical disk using BIOS INT 13H extensions
0x0E | Bigdos Fat16 section or logic disk using BIOS INT 13H extensions
0x0f | Advanced section using BIOS INT 13H extensions
0x12 | EISA section
0x42 | Tom dynamic disk (Windows 2000)


Note that only volumes with the System ID field are available running MS-DOS, which is 0x01, 0x04, 0x05 or 0x06. But volumes with another System ID ID can be removed using the FDISK utility.

Cylinder, Head and Sector fields

Starting Cylinder, Ending Cylinder, Starting Head, Ending Head, Starting Sector and Ending Sector (CHS) are optional partition table elements. The boot code uses the values \u200b\u200bof these fields to find the boot sector and activate it. Starting CHS fields inactive sections indicate the loading sectors of the primary sections and on the advanced boot sector of the first logical disk In the advanced section.

On the fig. 2. Showing Master Boot Record (containing code, partition table and signature) and loading sectors for a disk with four partitions.


fig. 2.
The ending Cylinder field in the partition table has a size of 10 bits and allows you to describe the cylinders with numbers from 0 to 1023. Starting Head and Ending Head fields have 1 bit and may contain head numbers from 0 to 255. Since Starting Sector and Ending Sector fields occupy 6 bits, they may contain values \u200b\u200bfrom 0 to 63. Since the numbering of sectors begins with 1 (and not from 0, as for other fields), then the maximum number of sectors on the track is 63.

With low-level formatting for all disks, the standard sector size is set 512 bytes, so maximum size The disk described in the partition table can be calculated as follows:

The code:

Maximum size \u003d Size sector X Number of cylinders X Number of heads X x The number of sectors on the track.

Using the maximum allowable values \u200b\u200bof these values, we get:

The code:

512 x 1024 x 256 x 63 (or 512 x 224) \u003d 8 455 716 864 bytes, or 7.8 GB.

Thus, without using the INT 13H extensions, known as Logical Block Addressing (LBA), the size of the active primary partition cannot exceed 7.8 GB regardless of the file system used.

The maximum volume size under FAT16 depends on the disk geometry and maximum values \u200b\u200bin the partition table. Possible values \u200b\u200bwhen used and absence of LBA are shown in table. four. The number of cylinders in both cases is 1024 (0-1023). In the case when the primary partition or logical device occupies the region further than the 1023rd cylinder, all fields of the partition table will have the most allowable values.

LBA mode

|

Number of heads

|

Sectors / track

|

Max. section size

Forbidden | 64 | 32 | 1 GB
Allowed | 255 | 63 | 4 GB


To circumvent the 7.8 GB restriction described above, the Starting Sector and Ending Sector fields are ignored in Windows 2000 - instead of the values \u200b\u200bof the Relative Sectors and Total Sectors fields.

Relative Sectors and Total Sectors fields

The relative sectors field contains a shift from the start of the disc before the start of the volume, expressed among the sectors. The Total Sectors field indicates the total number of sectors in the volume.

Using the values \u200b\u200bof the two these fields (which together are a 32-bit number), we obtain an additional 8 bits to store the total number of sectors compared to the CHS scheme described above. In this case, the number of sectors can be represented as 232. When used standard size Sectors (512 bytes) and 32-bit representations of the number of sectors The maximum volume of the partition is limited by the number 2 TB (or 2 199 023 255 552 bytes). This scheme is used only in Windows 2000 with NTFS and FAT32 file systems.

Note that when creating partitions under windows control 2000 The correct data is entered into the Starting Cylinder field, ending Cylinder, Starting Head, Ending Head, Starting Sector and Ending Sector. This allows you to ensure compatibility with MS-DOS, Windows 95 and Windows 98, as well as with INT 13H functions used by the BIOS when the computer is loaded.

Extended boot record

Extended boot record (Extended Boot Record, EBR) consists of an extended partition table and a signature - a two-byte structure having a value of 0x55AA. Extended boot record exists for each logical device in an extended section. It contains information about the first side of the first cylinder for each logical device. The boot sector of the logic disk is usually located in the relative sectors with the number 32 or 63. If there is no extended partition on the disk, then there is no extended boot record and there are no logical devices.

The first element of the extended partition table for the first logical device indicates its boot sector, the second element - on the EBR of the next logical device. If the next logical device does not exist, then the second item is not used - it contains a set of zeros. The third and fourth elements of the extended partition table are not used.

On the fig. 3. It is shown how the extended boot record is arranged. Three logical devices are shown in the extended section.


fig. 3.
With the exception of the last logical device in the Extended section (see fig. 3.), the format of the extended partition table, described in table. fiveRepeated for each logical device: the first element describes the boot sector of the logic device, the second element indicates the following extended boot record. For the last logical device, elements from the second on the fourth are not used.

Element extended partition table

|

Content

First element | Information about the current logical device in the Extended section, including the initial address for the data
Second element | Information about the next logical device in an extended section, including the sector address containing EBR for the next logical device. This field is not used if there are no following logic devices
Third element | Not used
Fourth element | Not used


The fields of each element in the extended partition table are similar to the fields of the usual table of the partitions described above.

The Relative Sectors field in the extended partition table indicates in bytes offset from the beginning of the extended partition to the first logical device sector. The number in the Total Sectors field allows you to find out the number of sectors allocated for a logical device. The value of the Total Sectors field is equal to the number of sectors from the start of the boot sector to the end of the logical partition.

In view of the exceptional importance of information stored in the MBR and EBR sectors, it is recommended to periodically check the disk using the appropriate utilities and create backup copies of the data.

Boot Sector

The boot sector located in the sector 1 of each volume is a structure that ensures the launch of the computer. This sector contains executable code and data that requires this code, including information about the file system used on this volume. The boot sector is created when formatting volume. At the end of the boot sector placed a two-byte structure, called the marker of the end of the sector. This structure always contains the value of 0x55aa.

On computers running Windows 2000, the boot sector of the active partition is loaded into memory and causes the operating system bootloader - NTLDR, which performs all the necessary operations on Windows 2000.

In Windows 2000, the boot sector contains the following items:

  • jMP assembler instruction;
  • manufacturer identifier (OEM ID);
  • data structure called BIOS PARAMETER BLOCK (BPB);
  • extended BPB structure;
  • executable code that runs the operating system.
Note that the loading sectors for NTFS, FAT16 and FAT32 are formatted in a different way.

The BPB structure contains the physical parameters of the volume, the extended BPB structure begins immediately after standard BPB. The length of the BPB structure and the information contained in it depends on the type of boot sector - NTFS, FAT16 or FAT32.

Information, stored in the BPB and the extended BPB structure, is used by drivers for reading and configuring volumes.

Immediately the extended BPB structure follows the boot code.

Download process

The process of loading a computer consists of the following main steps:

  1. When you turn on the power, the BIOS test and processor test is performed - POST.
  2. BIOS is looking for a boot device (usually disc).
  3. BIOS downloads the first physical sector with boot disk In memory and transfers the management to the address where this sector is loaded.
If the boot device is a hard disk, the BIOS loads the MBR. Located in the MBR code loads the boot sector of the active partition and transfers control to the address where this sector is loaded. On computers with Windows 2000, the executable code in the boot sector finds the NTLDR file, loads it into memory and transmits it to control.

If the disk is in the drive, the BIOS loads the first sector (boot sector) of this disk into memory. If the disk is bootable (contains the basic operating system files), the boot sector is loaded into memory and uses the code to transfer the IO.sys file management - basic file MS-DOS operating system. If the disk is not bootable, the executable code in the boot sector issues the following message:

  • NON-SYSTEM DISK OR DISK ERROR
  • Replace and Press Any Key WHEN READY
The initial boot process does not depend on the disk format and from the operating system. The unique characteristics of the operating and file systems are used after the code from the boot sector begins.

Types of boot sectors

As we already know, the MBR transfers the control of the boot sector. Therefore, the first three bytes of this sector must contain a permissible instruction for central processor. This manual is a transition instruction that redirects the execution of code. The JMP instruction follows the 8-byte manufacturer identifier (OEM ID) - a string describing the name and number of the operating system version used to format volumes.

To preserve compatibility with MS-DOS Windows 2000 records the "MSDOS5.0" identifier for FAT16 and FAT32 file systems. For File nTFS systems The identifier contains "NTFS" characters.

Windows 95 uses the "MSWIN4.0" identifier, and Windows 95 OSR2 and Windows 98 is the "MSWIN4.1" identifier.

Immediately, the data identifier follows the data structure called the BIOS Parameter Block (BPB). It contains the information required to detect file ntldr.. Since BPB is usually located in the same displacement, then the standard parameters are easily detected. Since the JMP instruction is bypassing the BPB structure, its size can be increased in the future if it takes any additional information here.
Now let's look at how the boot sectors look like for three main file systems - FAT16, FAT32 and NTFS.

FAT16 boot sector

IN table. 6. A description of the boot sector for the FAT16 file system is given.

Displacement

| |

0x00 | 3 bytes | JMP instruction
0x03 | 2 x long | OEM ID
0x0b | 25 bytes | BPB.
0x24 | 26 bytes | Advanced BPB.
0x3e | 448 byte | Boot code
0x01fe | 2 bytes | Start sector marker (0x55AA)


On the specific example The contents of the FAT16 boot sector are shown. Here are three sections:
  • 0x00-0x0A bytes contain the JMP and OEM ID instruction (highlighted in font);
  • 0x0B-0x3D bytes contain BPB and extended BPB;
  • the remaining bytes contain the download code and the sector end marker (highlighted in the font).
In the following two tables, the contents of BPB ( table. 7.) and extended BPB ( table. eight) For FAT16. The values \u200b\u200bcorrespond to the boot sector shown in Fig. four.

Displacement

| |

Meaning

|

Description


0x0d | 1 byte | 0x40 | The number of sectors in the cluster. Since FAT16 supports a limited number of clusters (up to 65,536), volumes of larger volume require use more sectors in a cluster. The default value depends on the size of the volume. The following values \u200b\u200bare allowed: 1, 2, 4, 8, 16, 32, 64 and 128. The values \u200b\u200bresulting in an increase in the size of the cluster more than 32 KB (the number of bytes in the sector multiplied by the number of sectors in the cluster) can be the source of errors
0x0e | 2 bytes | 0x0100 | Reserved sectors - the number of sectors before the first FAT table, including the boot sector. The value of this field is always equal to 1

0x11 | 2 bytes | 0x0002 | The total number of 32-byte file names and directories that can be stored in the root catalog of the volume. Typically, the value of this field is 512. One item is always used to storing the volume tag, so the maximum number of files and directories does not exceed 511
0x13 | 2 bytes | 0x0000 | The number of sectors in a volume expressed by a 16-bit meaning. For volumes with more than 65,536 sectors, this field is not used and its value is 0

0x16 | 2 bytes | 0xFC00 | The number of sectors in each copy of the FAT. The value of this field, the number of FAT copies and the number of reserved sectors are used to calculate the location of the root directory. Knowing the maximum number of root directory elements, you can also find out where custom data begins

0x1a | 2 bytes | 0x4000 | Number of heads. Used for low-level disk formatting
0x1c | 4 bytes | 0x3F000000 | The number of "hidden" sectors is the number of sectors before the boot sector. Used during download to calculate the absolute offset of the root directory and data
0x20 | 4 bytes | 0x01F03E00 | The number of sectors in a volume expressed by a 32-bit value. Used for volumes with more than 65,536 sectors


Displacement

| |

Meaning

|

Description

0x24 | 1 byte | 0x80 | Physical device number. Contains 0x00 for floppy disks and 0x80 for hard disks. Used int 13h to access the disk. The value of this field makes sense only for the boot device.
0x25 | 1 byte | 0x00 | Reserved. For FAT16 The value of this field is always equal to 0
0x26 | 1 byte | 0x29 | Signature of the extended boot sector. For Windows 2000, this field should matter 0x28 or 0x29
0x27 | 4 bytes | 0xA88B3652 | Serial number Toma Random number generated when formatting disk
0x2B | 11 bytes | NO NAME | Tom label. In Windows 2000, TOMA label is stored in a special file
0x36 | 2 x long | Fat16 | File system type. Depending on the disk format, this field may contain FAT, FAT12 or FAT16 characters.



fig. four
Fat32 boot sector

The FAT32 boot sector has a lot in common with the FAT16 boot sector, but BPB contains additional fields, and those fields that are used in FAT16 are in other addresses. Thus, disks formatted under FAT32 cannot be read by operating systems that are incompatible with FAT32.

IN table. nine The contents of the boot sector for the FAT32 file system are shown.

Displacement

| |

Meaning

|

Description

0x0b | 2 bytes | 0x0002 | The number of bytes in the sector is the size of the sector. The following values \u200b\u200bare allowed: 512, 1024, 2048 and 4096. For most disks, the value of this field is 512
0x0d | 1 byte | 0x40 | The number of sectors in the cluster. Since FAT32 supports a limited number of clusters (up to 4 294 967 296), volumes of a very large volume require the use of a larger number of sectors in the cluster. The default value depends on the size of the volume. The following values \u200b\u200bare valid: 1, 2, 4, 8, 16, 32, 64 and 128. In Windows 2000, the volume of up to 32 GB is maintained for FAT32. Tom of larger volume created with using windows 95 OSR2 and Windows 98, available from Windows 2000
0x0e | 2 byte | 0x0200 | Reserved sectors - the number of sectors before the first FAT table, including the boot sector. The value of this field for FAT32 is usually 32
0x10 | 1 byte | 0x02 | The number of copies of FAT tables for this volume. The value of this field is always equal to 2
0x11 | 2 bytes | 0x0000 | The total number of 32-byte file names and directories that can be stored in the root of the volume directory (only for FAT12 / FAT16). For FAT32 volumes, the value of this field should be 0
0x13 | 2 bytes | 0x0000 | The number of sectors in a volume expressed by a 16-bit value (only for FAT12 / FAT16). For FAT32 volumes, the value of this field should be 0
0x15 | 1 byte | 0xf8 | Type of media. The 0xF8 value indicates a hard disk, 0xF0 on a high density floppy disk. This field is not used in Windows 2000
0x16 | 2 bytes | 0x0000 | The number of sectors in each copy of FAT (FAT12 / FAT16 only). For FAT32 volumes, the value of this field should be 0
0x18 | 2 bytes | 0x3f00 | The number of sectors in the track. Used for low-level disk formatting
0x1a | 2 bytes | 0xFF00 | Number of heads. Used for low-level disk formatting
0x1c | 4 bytes | 0xee39d700 | The number of "hidden" sectors is the number of sectors before the boot sector. Used during download to calculate the absolute offset of the root directory and data
0x20 | 4 bytes | 0x7F324E00 | The number of sectors in a volume expressed by a 32-bit value. Used for volumes with more than 65,536 sectors
0x24 | 4 bytes | 0x83130000 | Number of sectors in FAT (FAT32 only)
0x28 | 2 bytes | 0x0000 | Extended flags (for FAT32 only). Separate bits of this word have the following purpose: Bits 0-3 - the number of active FAT; bits 4-6 - reserved; Bit 7 - equal to 0 if "Mirroring" FAT is performed; equal to 1 if only one FAT is active; Bits 8-15 - reserved
0x2a | 2 bytes | 0x0000 | File System version (FAT32 only)
0x2c | 4 bytes | 0x02000000 | Cluster number for the first root catalog cluster (FAT32 only). Typically, the value of this field is 2
0x34 | 2 bytes | 0x0600 | Sector Sector Number backup boot sector (for FAT32 only). Typically, the value of this field is equal to 6
0x36 | 12 bytes | 0x00000000000000000000| Reserved (only for FAT32)

table. 10.


Displacement

| |

Meaning

|

Description

0x40 | 1 byte | 0x80 | Physical device number. Contains 0x00 values \u200b\u200bfor floppy disks and 0x80 for hard drives. Used int 13h to access the disk. The value of this field makes sense only for the boot device. 12 0x0d | 1 byte | 0x08 | The number of sectors in the cluster
0x0e | 2 bytes | 0x0000 | Reserved sectors
0x10 | 3 bytes | 0x000000 | Always 0
0x13 | 2 bytes | 0x0000 | Not used in NTFS
0x15 | 1 byte | 0xf8 | Type of media
0x16 | 2 bytes | 0x0000 | Always 0
0x18 | 2 bytes | 0x3f00 | Number of sectors on the track
0x1a | 2 bytes | 0xFF00 | Number of heads
0x1c | 3 bytes | 0x3f000000 | The number of "hidden" sectors
0x20 | 4 bytes | 0x00000000 | Not used in NTFS
0x24 | 4 bytes | 0x80008000 | Not used in NTFS
0x28 | 2 x long | 0x4AF57F0000000000 | Total number of sectors
0x30 | 2 x long | 0x04000000000000 | Logic cluster number for $ MFT file
0x38 | 2 x long | 0x54FF070000000000 | Logic cluster number for $ MFTMirr file
0x40 | 4 bytes | 0xF6000000 | The number of sectors in the file entry segment
0x44 | 4 bytes | 0x01000000 | Number of clusters in the index block
0x48 | 2 x long | 0x14A51B74C91B741C | Serial number Toma
0x50 | 4 bytes | 0x00000000 | Check sum

How to restore the boot sector HDD

Almost every user working with a computer faces the problem of damage to the HDD sector. This may have a number of reasons, starting by incorrect completion of the work and ending with a deep penetration of the virus. There are many possible methodsHow to restore the HDD boot sector and data on it (in some cases, information may be lost irretrievably). Some options will be too complicated for ordinary users PC, and the worst thing that the incomprehensibility of actions can lead to this very process of irrevocable data loss or global damage common system. Therefore, the first rule before the start of restoration work, try to reduce the number of impacts and especially incomprehensible and unverified manipulations. It is not recommended to delete anything, cut or copy. Each problem is individual, so you will need to check the sector on various software. There are plenty of all kinds of programs, the most popular are:

HDDScan;
Active File Recovery;
R-Studio;
Norton PartitionMagic;
RAXCO;
Easeus Partition Master.

And this is definitely not all, but these programs most often cope with the task, and enjoys good reviews Among users. Alas and it is not always able to restore the HDD boot sector as soon as possible, problems may occur with the definition of the type of file system or the presence of this sector will not be visible.

Formatting media

This method is suitable for those who are not important information on the media and it is important to restore the HDD boot sector as quickly as possible. After this procedure, in 80% of cases, work is completely restored. But this method is more often resorted in the most extreme cases, because Discourse on the disk is still almost everyone playing an important role, especially if this is a working computer.

Testdisk.
If the user first faces the problem and absolutely does not know how to restore the HDD2 boot sector, this utility It can very quickly cope with the task. However, not without the participation of the user itself, it will be necessary to figure out in some points. Special complexity of the program, this is an English interface. With knowledge of technical words, the system will understand.

Consider this method the points:
1) Find Create A New Log File if you need to enter a log.
2) Next, you need to find a damaged medium by describing its characteristics, for example: disk / dev / sds - 160 GB, select it.
3) Next action, selection of a section type among Intel, Sun, Mac, etc.
4) After that, there are possible operations that can be done with the disk. Choosenalyse.
5) Next, the analysis of possible losses and the overall structure is.
6) Selection of geometry on disk
7) Final steps in the "Master Boot Record" section, is responsible for rebooting the sector. You need to select a damaged disk, after checking sectors, rewrite MBD.

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

Second way to apply on windows
For various reasons, the first option may not work, and the question is how to restore your boot sector HDD3 remains open. To understand the recovery process itself, consider it more detailed what MBR is.

MBR is the very first sector that is found on the disk, there is a special table with sections, and boot programIt reads the data and their path, starting from the hard disk, and ending with the section of the installed operating system.

Procedure:
1) First you need to turn on the computer and select the download from the installation disk or the USB drive, press any key and in the window windows installations Select "System Restore", in the event of a problem detection, press the correction and reboot.
2) If it did not help the boot sector, re-open the "system restore" and select the "Next" item, on the command line we write bootrec / fixmbr. This command will hold the compatibility of the main boot record and solve the problem of its damage. But the partition table will not change.
3) I knock out the following BOOTREC / FixBoot command, this action records a new boot sector, which will be compatible with Windows. Press "output" and reboot the computer.

In general, it should work! But as practice shows, the HDD boot sector is not so simple, and this case has more ways and teams:
1) BOOTREC / SCANOS command, makes a full scan and search for operating systems, in cases of finding, on the screen it will be visible.
2) BOOTREC / RebuildBCD is used to add to the total download menu of the Windows found, the y and ENTER combination will complete the additive process.

If it did not produce the desired effect, the command, like BootSect / NT60 SYS, can in an individual case can restore the HDD boot sector, using the update of the main boot code. After that, you need to click "Exit" and restart the computer.
Of course, this is not all existing methods Both programs, so if these options did not help, reasonably contact the computer forum, because many users face this problem and prompt each other how to act in order to reasonably restore the HDD boot sector, and do not apply more harm to it. Boot sectors pretty popular topicIf the google becomes clear that the situations with the loader breakdown are the most different, but almost always any action is opposition. Here are some more good and effective programs for restoring a hard disk:
MBRFIX.
Paragon. Hard Disk.
Hirlen's Boot

In the case when the device fails to start and constantly occur errors during the download, you should try to use standard means recovery. If it does not help or not available, then you can try to correct the boot records using the command line. How to do this will be told in this article. This method will be able to help, in the case when it does not reach the launch of the OS itself.

BootRec EXE utility

The first thing the standard utility will be used to restore the system, which will have to be caused from the console.

Unfortunately, in order to launch the console, additional steps will be required. It will be necessary create a recovery disk Or a version with a version for installation windows. A good idea will have them always at hand, and not to record urgently on another device or friends.

For the seven it will be necessary to choose the item " System Restore", And then make the start of the console. For the eight, the first point will remain unchanged, but further will have to go into diagnostic, From there call extra optionsand only then run the console.

In the window that appears, you should enter the command BootRec.exe., after which a list of available actions with all the necessary explanations will appear. Read more each item will be disassembled further.

We write down a new boot sector

The second command in this list will overwrite the current loading sector under the Operation, which is available in this moment. Failures in the sector can occur for several reasons:


To fix it all just enter the FixBoot command as shown in the picture.

Correct MBR

This command that runs the first string will correct the corresponding records on the system hard disk. In fact, they are they are responsible for order Loading the system, of which the BIOS finds out that and in which sequence to download. This operation will be able to help in case ensuring errors:

You need to enter the FixMBr command as shown in the picture, and all these problems must disappear.

How to find all installed systems

May occur situations at which not all systems installed Available for download. Performing an appropriate operation will allow check the devicefor other installed Operations, and using the next section of the article, you can add them to this list. The required command is displayed in the picture.

Re-excide BCD.

Enter the appropriate operation / RebuildBCD. After the initial command, will allow you to record all the operating systems found and recovery tools to the configuration file. loading windowsThat will allow you to display them at the next download.

It is clear from the article that many problems with the launch system can be solved on their own, using the command line and only one utility. So it is worth trying this option before starting to panic, rearrange OS or carry a computer to repair.

At the logical formatting stage of each section (logical disk), four logical areas are created: · The boot sector (Boot Sector); · File placement table (EKG1 and FAT2); · Catalog; · Data area.

The boot sector on any logical disk (section) is located first. Its data block (512 byte) begins with the JMP command, which transmits control to the IPL2 program, contains the name of the operating system and its version, contains the parameter block BIOS Disc (VRV), IPL 2 program, downloading the operating system and ends with a signature 55aa .. Below in Table.5 are explained by some of its most important records.

Changes in the boot sector Number of reserved sectors

The number of reserved sectors now before the first FAT is 32.

New BIOS parameter block

The BIOS parameter block in EA32 takes more space than the standard, and is called Big Fat BIOS Parameter Block (BF_BPB). Because of this, the boot sector now takes not one, but three physical sectors, and there is even additional and placed through three physical sectors in the seventh, eighth and ninth physical sector. BF_BPB is an extended VRV version present in 12- and 16-bit FAT. It contains the same structures as standard BPB, but includes several additional fields that are needed for FAT32. Changes made in BPB to support FAT32 are described below.

Table 5. Essential entries in the boot sector

Length (in bytes)

Content

JMP and NOP commands

Name I. windows version

Number of bytes on the sector

The number of sectors on the cluster (always multiple to two to the degree n)

Number of reserved sectors before the first FAT

Number of FAT tables

Number of elements in the root directory (maximum limit)

Total number of sectors (00 00 - if the disk size is more than 32 MB)

Wednesday descriptor; In this case, F8, which identifies the disk as hard with any container

Number of sectors on the element of the FAT table

Number of sectors on the track

Number of heads

Number of hidden sectors

Total number of sectors if the size of the disk is greater than 32 MB

Disk number; In this case, 80, which identifies the main section

Reserved

Extended signature (always 29h)

Serial number Toma

Tag Toma

File System Type (12- or 16-bit)

Note.This part of the boot sector is known as the BIOS PARAMETER BLOCK (BPB) (BIOS parameters unit). It contains physical disk characteristics that MS-DOS and Windows are used when searching for a specific area. Folding or multiplying the values \u200b\u200bof these parameters, the operating system learns where the FAT table is located, the root directory where the data area begins and ends.

Field of root catalog.

This element reports the number of sectors in the root directory. For hard drives, this value has always been equal to 512 (0200H) and meant the number of rows of the directory of placed in thirty-two sectors. Now it is changed to 0 (0000h) and on FAT32 disks is ignored.

The number of sectors on the FAT table element.

This element is replaced by zero and now acts as a pointer to the appropriate element in BF_BPB, when it comes to BF_BPB during the boot process.

Description of the disc.

The new double-byte field used as a flag indicating the number of FAT tables on the disk is one or two. If the flag is set, only one FAT is on the disk if you are reset - two. FAT32 created by the format command always forms 2 FAT tables.

First root catalog cluster.

The maximum number of elements in the root directory is now extended to 65535, and the root directory itself can be located anywhere. This value indicates the number of the first cluster occupied by the root catalog on the EA32 disk.

File information sector.

Indicates the second boot sector. It contains information on how much on the disk all the clusters, how many of them are free and which cluster has been allocated the latest. Thus, to get this frequently used information, no longer need to read the entire FAT table.

Backup of the boot sector.

Another important innovation in EA32. In previous versions of the FAT file system, damage to the boot sector led to the full loss of the entire contents of the disk. FAT32 removes the sharpness of this problem. By recording changes to the FAT32 boot volume, the FDISK program creates a backup of the boot sector and places it in the logical sector 6 of this volume. If the new MBR when accessing the boot sector detects a read error or incorrect signature, it searches sector 6 and reads the rest of the boot code already from it.

The new Windows 10 from Microsoft has already gained popularity among millions of PC users worldwide. But, like all new products, Windows 10 is not devoid of flaws. Many users of this OS are observed problems with loader. Most often, such a problem occurs due to the new operating system update policy.

Now in Windows 10 you can not disable updates, as it was in Windows 7 and XP.

The problem with the loader itself manifests itself when the user does not wait for the end of the system update and turns it off Power button.

After the user turns on the computer again, it encounters such a message on the screen of his monitor.

This message suggests that your bootloader is damaged and it should be restored. It is also worth noting that the turning off of the computer during the update is not the only reason for breakage. Damage the loader can still viruses and various malware. Still quite common causes of his breakdowns are defective HDD inwhich is bied sectors , that is, the boot record will be located on these sectors. Also the cause of the loader breakdown may be installing the younger OS over Windows 10. To help our readers restore the loader below, we prepared examples in which we describe the ways to restore it in detail.

The easiest way to restore

Seeing the downloader's fault message, the first thing the PC user has a question - how to restore the Windows 10 bootloader. In this example, we describe the easiest way to restore it. For this example, we will need.

If you do not have this disk and internet access, you can make it on another computer from the same OS.

Also for this task you can use the original installation disk With Windows 10. Well, let's start. Insert the recovery disk In the drive and boot from it when the computer starts.

In the first window of the recovery disk wizard, you must specify keyboard layoutAfter which the Master menu opens.

In this window, we will choose the second tab " Troubleshooting"And we will immediately go to the next" ".

IN additional parameters We are interested in the tab "". After the transition to this link, the master will ask to select OS to restore its startup.

On the computer under study installed one operating windows system 10, so in the wizard only one selection. After selecting the OS, the system will start the procedure for finding a computer malfunction and should restore a damaged loader.

If using this method you will not be able to return the performance of Windows 10, then in the following examples, we describe a detailed process of restoring the boot sector using system utilities Diskpart. and BCDBoot.

Restoring Windows 10 bootloader using the command line

For this method, we will also need disk windows restoration 10 . Load from the disk, as in the previous example to the item ". In this menu, we are interested in the tab "", on which we move.

First of all, we will run the console utility on the command line Diskpart.. To do this, enter the DiskPart command in the console

This utility needs us for withdrawing information about all local disks in system. Now we need to find the download number section number. Usually this hidden section, occupying 500 MB. This section is created automatically installer Windows 10. Next to search for it in DiskPart We will enter the List Volume command

From the image it is clear that the boot record section is in the first volume on the C drive. Also in the image it is clear that Windows 10 itself is installed on the D disc. Now we have to get out of disk program. Make it can be the EXIT command

After exiting DiskPart, I will enter the bcdboot.exe d command: \\ Windows also note that the command is used in the command, since it is the ten installed on it.

This command fully restored tens of boot files. The principle of operation of this team is to use the utility BCDBoot. Developers specifically created this utility for work. with loading windows files . It is also worth noting that thanks to the same utility Windows installer creates a hidden partition and copies boot files to it..

Restoring Windows 10 bootloader using the command line (second method)

In the second way, we will also use utilities Diskpart. and BCDBoot And try to overwrite the bootloader. To do this, launch DiskPart and find out what disk is our hidden partition and the section on which Windows 10 is installed. Starting this utility is described above.

Now we need to format the hidden section that is in the first volume. To do this, dial the Select Volume 1 command which will select our hidden encrypted 500 MB sections.

Further action will format the selected partition. This is done in order to erase all the files from it. For this operation, we enter the command in the console Format FS \u003d FAT32

After formatting our section, we will come out of disc utility and introduce new team BCDBoot.exe D: \\ Windows that was introduced in the previous example.

This command will not fix the bootloader files, as in the previous example, and create new. As you already understood, this method is used if the first did not work.

Another way to restore Windows 10 download using the command line

For this method you need a utility BootRec. In contrast to the previous utility, this utility does not restore the bootloader files, and restores boot record. That is, she restores MBR - First sector on HDD. For the operating system it is very important for the MBR to be safe and preservation. When the computer starts its BIOS, the first thing is looking for the MBR to implement the operating system startup from it. For this example, launch as in previous examples, command line. In the utility under consideration there are two main commands / FixMBR and / fixBoot first team needed to correct MBR, and the second creates new. First of all, consider the situation when we are damaged by the MBR. To do this, we introduce the first command in the console.

In the image, it is clear that the operation has passed successfully, which means that the MBR is restored.

Now consider the situation when the first way does not work, that is, we will create new sector MBR. To do this, we use the second team.

From the image, it is clear that the new MBR sector was created successfully.

Examples can be seen how it is easy to restore the MBR sector using the BootRec Console Utility. If you have problem with Startom Windows 10, we advise you to take advantage of this example in the first place.

Clean the system from malicious software until the bootloader is restored

If the cause of the loader failure is a malicious program, then this malicious code need to be removed before recovery. In this situation will help you. This is an emergency disk that has a multitude of means to restore computer, as well as treating it from viruses. You can download Dr.Web LiveDisk on its official website www.drweb.ru. This Live CD is based on Linux and is free. This disk is distributed as iSO imagewhich can be written like on optical diskand on a USB flash drive. After writing an image to disk, run Dr.Web LiveDisk.

In the start menu, select the first paragraph and continue the download of Dr.Web LiveDisk. After a few seconds, the OS based on Linux, which actually represents Dr.Web LiveDisk.

In this operating system you can completely clean your computer from viruses and even make backup all information.

Also useful will be the fact that there is full support Internet and built-in browser Firefox..

Summarize

In conclusion, I want to say if you know all the subtleties of the bootloader recovery, you can quickly repair your computer. It is also worth paying attention to the situation when it is impossible to restore the boot sector and the loader itself. In this case, it is necessary to be reinforced and use the means full recovery Systems. Such means are full image of the systemcreated by the means of Windows 10 itself, as well as such a program as Acronis True Image. . We hope that our material will help you restore the loader with the MBR, and the computer will function as before.

Video on the topic