How to make a boot sector? Restoring the fat boot sector The simplest case. Only the Boot Sector is destroyed

If you have never encountered the problem of failures when loading your computer's operating system, this article may not be of interest to you. It is intended for those who want to learn how to independently (without calling specialists) eliminate occasional failures in the operating system and restore the boot sector with their own hands.

Possible causes of failure

As a rule, a failure appears unexpectedly. Just one day you can't turn on your computer because the operating system won't boot. This happens due to the fact that, for various reasons that are uninteresting to the vast majority of users, the master boot record (MBR), or as it is also called, the boot sector, is damaged. The reasons for the failure may be software damage to the MBR due to a virus attack or damage to the physical sectors of the hard drive. You can fix the problem by restoring the boot sector. As a result, the program will reassign areas of the hard drive, and another sector of the disk will perform MBR functions.

Solution

Restoring the boot sector is quite simple. Most often, rebooting the system helps. You may be offered several options. Inexperienced users are advised to choose the option to boot the system with the latest working parameters. If this doesn't help, try booting it into Safe Mode. In this case, you will not see the background image. In addition, the majority of programs will not work, but files stored on the desktop can be copied to another medium or to a local drive. This option needs to be tried, because the only way to restore the system can only be to reinstall it and format the system disk. And if you do not want to lose any important documents, do not neglect this action.

Recovering the Windows 7 boot sector

You need to find the Windows 7 installation disk. If one is missing by definition or lost, then you need to look for a boot disk. Before restoring the system, do not forget to check your hard drive for viruses, or rather, make sure they are absent. To do this, install it on another computer or use a CD with an antivirus. If you ignore such a check, there is a risk of repeated disruption of the bootloader due to the fact that the hidden virus becomes active again.

Sequencing

You should begin restoring the Windows 7 boot sector by pressing the "Delete" button when you turn on the computer. In the "Advanced" (or "Boot") section, find the device boot order. Set the BIOS to CD/DVD as the first device, save the change and exit.

The next step is to select “Restore Windows using the Recovery Console.” Then, from the list provided, select the system to restore and enter its number. Press "Enter". Then enter the command "fixmbr" to repair the MBR, or the command "fixboot" specifying the drive letter to restore, confirm it (Y) and press "Enter" again. Restart your computer. If it was not possible to restore the boot sector in this way, the only thing left is to reinstall the system.

Each Windows operating system on a personal computer has special tools that are responsible for an action or operation. But there is a tool with which you can change errors and problems, as well as restore Windows from the command line.
If loading the OS fails, you need to use the Bootrec.exe utility.

With its help, computer problems are resolved, data is corrected, including Windows downloads or download configuration files.

Bootrec.exe - help with fixing Windows boot

If you have problems starting your computer and find problems with it, you should use the method for fixing Windows boot errors. It doesn’t matter which Windows is installed, the problem must be solved so that you can continue to perform the tasks assigned to you.

When working with a tool like Butrek.exe, they use commands for, but if a problematic situation arose in the OS itself, the tool must be launched inside it.

If this happened in Windows 7, you will need installation media or a disk that is capable of restoring the boot sector of the hard drive. You can boot from USB or DVD disks, it depends on the OS version.

Fig.1. When you see such a picture on the monitor, click on the highlighted function

Then you need to decide on the choice of operating system that needs to be updated. This is a serious task, since among many systems there is only one that requires fixing. To continue, click the “Next” button.

Fig.2. A new window will open with recovery properties, but only the boot command line is needed here

If you do not have a disk for installation on Windows 7 or a disk responsible for restoring the boot sector, you will need access to tools. They are using recovery hidden partitions. Windows 7 will be able to set them automatically when the OS is installed.

Follow a specific sequence: you need access to Recovery Systems, Diagnostics, Advanced Options and Command Line

Writing new boot sectors

The bootrec function with the /FixBoot parameter will make it possible to write to the boot sector inside the system partition on hard drives. When performing this procedure, you need to use boot partitions, but only those that are compatible with Windows OS versions 7 and 8.

The following parameters can be used:

  • If there is damage on the boot sectors, and their structure and size do not meet the requirements of the hard drive.
  • When recording boot sectors that are not compatible with the Windows system.
  • When the old Windows OS was installed in place of the new version.
In order to write a new boot sector, you need to run bootrec.exe as in the picture

Or another disk storage device. (For a floppy disk, this is the first physical sector, for a hard disk, the first physical sector for each partition) When the computer boots from a floppy disk, it is loaded into memory by the POST program (in IBM PC architecture computers, usually from address 0000:7c00), control is transferred to it with the long command jump.

The boot sector, sometimes called stage1, that is, the first stage of booting the operating system, loads the program of the second stage of booting the operating system, stage2 ( secondary loader, sometimes a boot manager or an authorization and access protection program is loaded as stage2). (In some OSes, the role of stage1 is played by the MBR and when loading the OS from a hard drive, the boot sector is not used. On non-bootable hard drive partitions, the boot sectors may also not contain the boot program)

see also

Links

  • - example of creating a boot sector

Wikimedia Foundation. 2010.

See what “Boot sector” is in other dictionaries:

    Wiktionary has an article “sector” Sector: A sector in geometry is a part of a circle bounded by two parts ... Wikipedia

    Sector: Sector (Mortal Kombat. A sector in geometry is a part of a circle bounded by an arc and two radii connecting the ends of the arc to the center of the circle. A sector is a structural unit, department and some public or industrial organizations... ... Wikipedia

    This term has other meanings, see Sector. A disk sector is the minimum addressable unit of information storage on disk storage devices (HDD, floppy disk, CD). It is part of a disc track. Most devices... ... Wikipedia

    - (English Boot viruses) a computer virus that is written to the first sector of a floppy or hard disk and is executed when the computer boots. When you turn on or restart your computer, the Boot virus replaces the boot code, and so... ... Wikipedia

    A computer virus that writes to the first sector of a floppy or hard disk and executes when the computer boots. In English: Boot sector virus See also: Computer viruses Financial Dictionary Finam... Financial Dictionary

    - (English master boot record, MBR) code and data necessary for the subsequent boot of the operating system and located in the first physical sectors (most often in the very first) on a hard drive or other storage device ... Wikipedia

    This article should be Wikified. Please format it according to the rules for formatting articles... Wikipedia

    Windows XP starts in an Internet phone machine In computer science, booting is a complex and multi-step process of starting a computer. The boot sequence is the sequence of actions that the computer must perform to ... Wikipedia

    Here is a chronological list of the appearance of some well-known computer viruses and worms, as well as the events that had a major impact on their development. Contents 1 2012 2 2011 3 2010 4 2009 ... Wikipedia

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 the disk being restored are the same.

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

Not an easy case. Not only the Boot Sector was destroyed

But at the same time there is a copy of the necessary system areas in the form of files or disk areas.

Perform standard formatting of the main disk partition, i.e. format C: command. In this case, the file structure of the formatted disk partition is formed with the reconstruction 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 that the root directory location is correct. To do this, DiskEditor, in the cluster viewing 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 entry of the found subdirectories. If the numbers do not match, you need to adjust 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 number that is a multiple of half the number of sectors in the cluster. As a rule, such an adjustment is necessary in cases of non-standard disk partitioning or after artificially resizing partitions.

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

If you still have one of the copies of FAT and the root directory, after completing all the steps above, full access to the 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 Partition Table element corresponding to the section. Next, you need to go to this sector and view it in Boot Record format (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 the rest of the boot sector with zeros or copy the boot sector of the system floppy disk 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'll calculate later

Reserved sectors at beginning

Root directory entries

Total sectors on disk

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

Media descriptor byte

Sectors per FAT

We'll 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 Cluster fields were left blank. They need to be calculated additionally:

Sectors per FAT: We look through the disk sectors following the Boot Record until we find the beginning of the root directory. We remember the coordinates of the catalog sector. Then we calculate the relative number of this sector relative to the Boot Record on the basis 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 Cluster: This value must be selected based on the fact that it can take the values ​​8 sect/clast or 4 sect/clast.

Note. This description applies to FAT 16. If the drive uses FAT 32, please refer to its description

, floppy disk or other disk storage device. (For a floppy disk, this is the first physical sector; for a hard disk, this is the first physical sector for each partition.) When the computer boots from a floppy disk, it is loaded into memory by the POST program (in IBM PC architecture computers, usually from address 0000:7c00), command control is transferred to it long jump.

The boot sector, sometimes called stage1 (that is, the first stage of booting the operating system), loads the program of the second stage of booting the operating system, stage2 ( secondary loader, sometimes a boot manager or an authorization and access protection program is loaded as stage2). In some OSes, the role of stage1 is played by the MBR, and when loading the OS from a hard drive, the boot sector is not used.

see also

  • en:NTFS#Partition Boot Sector (English)

Write a review about the article "Boot sector"

Links

  • (machine translation; original - (English))
  • (English)
  • - example of creating a boot sector

An excerpt characterizing the Boot sector

In St. Petersburg at this time, in the highest circles, with greater fervor than ever, there was a complex struggle between the parties of Rumyantsev, the French, Maria Feodorovna, the Tsarevich and others, drowned out, as always, by the trumpeting of the court drones. But calm, luxurious, concerned only with ghosts, reflections of life, St. Petersburg life went on as before; and because of the course of this life, it was necessary to make great efforts to recognize the danger and the difficult situation in which the Russian people found themselves. There were the same exits, balls, the same French theater, the same interests of the courts, the same interests of service and intrigue. Only in the highest circles were efforts made to recall the difficulty of the present situation. It was told in whispers how the two empresses acted opposite to each other in such difficult circumstances. Empress Maria Feodorovna, concerned about the welfare of the charitable and educational institutions under her jurisdiction, made an order to send all institutions to Kazan, and the things of these institutions were already packed. Empress Elizaveta Alekseevna, when asked what orders she wanted to make, with her characteristic Russian patriotism, deigned to answer that she could not make orders about state institutions, since this concerned the sovereign; about the same thing that personally depends on her, she deigned to say that she will be the last to leave St. Petersburg.
Anna Pavlovna had an evening on August 26, the very day of the Battle of Borodino, the flower of which was to be the reading of the letter from the Eminence, written when sending the image of the venerable saint Sergius to the sovereign. This letter was revered as an example of patriotic spiritual eloquence. It was to be read by Prince Vasily himself, famous for his art of reading. (He also read for the Empress.) The art of reading was considered to consist in pouring out words loudly, melodiously, between a desperate howl and a gentle murmur, completely regardless of their meaning, so that, quite by chance, a howl would fall on one word, and a murmur on others. This reading, like all Anna Pavlovna’s evenings, had political significance. At this evening there were to be several important persons who had to be shamed for their trips to the French theater and encouraged into a patriotic mood. Quite a lot of people had already gathered, but Anna Pavlovna had not yet seen all the people she needed in the living room, and therefore, without starting to read yet, she started general conversations.