Hello dear blog visitors.

The launch of operating systems from Microsoft Corporation consists of several main stages, arranged in strict sequence. And if at least one of the elements is out of order, most likely it will not work. There are many reasons why situations like this happen. In general, to solve the problem, the Windows XP bootloader is restored. Later in the article I will tell you how this can be done quickly and easily.

The boot record (aka MBR) stores some code that is needed to start the operating system. So, after turning on the power, the BIOS checks all the main systems. It then transfers control to just the aforementioned area.

And if, after installing Ubuntu or other OS, you suddenly saw one of the inscriptions on the monitor: “ no boot device», « ntldr is missing"- you need to restore the bootloader.

The reasons( )

There are several main reasons why such problems appear:

    Incorrect installation of Windows 7, after which there may not be any inscriptions on the monitor.

    Removing Linux or the manager responsible for launching.

  1. Mechanical damage to the hard drive.

    Power supply problems.

MBR( )

In general, the process of “resurrecting” a computer in the event that the above problems are detected is carried out in several stages, and at each of them it is worth checking the device’s performance. So, the first thing to do is to restore the MBR. To do this, we perform several actions:


The MBR has now been restored. You can restart the device and check if it works.

boot sector( )

In most cases, the message NTLDR is missing' indicates problems with the boot record. In some cases, this happens as a result of a hard drive failure.

In general, in general terms, this case is similar to the one described above, so it is better to use two commands:

As you can see, without a boot disk (flash drive), it will not work to “resurrect” the system.

Boot.ini( )

In the case when the previous version did not change the situation, we correct the file Boot.ini. To do this, we perform a few simple steps:


During execution, the program will scan all drives for Windows. The user will be prompted to change the configuration file. As a result, the OS should now start correctly.

Bootmgr and ntldr are standard bootloaders, but they are designed for different operating systems. Bootmgr- This is a more recent version of the bootloader, which has been used since Windows 7. It characteristic faster data processing and the ability to load the maximum version of the operating system. In addition, is new generation implementation of the interface between computer hardware and operating systems, and in the near future, will completely replace the BIOS model that has existed for several decades.

In its turn, ntld used on old OS versions (Vista and XP). This bootloader different slow data processing and the ability to handle simple tasks.

New bootmgr boot manager oriented to use a special BCD (Boot Configuration Data) boot configuration store, as well as specially developed applications and specification data EFI. For compatibility with versions of Windows prior to Windows Vista, the new BOOTMGR manager provides support for booting operating systems from previous generation BIOS-based computers.

Restoring the bootloader in Windows XP

To date, many users still use Windows XP on their personal computers, and due to the fact that this version of the OS is already outdated, there may be failures in the bootloader, to correct which can be as follows:

If, when restarting Windows, it displays a message NTLDR is missing, then the cause of the problem is due to the fact that the boot record was completely deleted. To solve this problem would need:

If such problems occur on Windows Vista, the actions are similar, since the same type of bootloader is used.

Fixing the bootloader in Windows 7

Windows 7 uses a new type of bootloader, which is why there is several ways its recovery.

We use boot from disk or flash drives:


But, this method can only help if the damage to the bootloader is minimal. At more serious problems, you should use the boot.ini editing process.

Usage bootrec:

Troubleshooting Windows 8, 10

Windows 8 and 10 use the same type of bootloader (however, in Windows 10, it has increased the speed of processing various operations). Therefore, the restoration of this element occurs in a similar way.

Automatic recovery

As a rule, automatic recovery is enough to normalize the operation of the entire operating system.

Sometimes unforeseen situations occur when the operating system refuses to boot normally. At such moments, we can observe the endless loading of Windows XP, when the OS logo is displayed on the screen, or, in general, the system gives a boot error, as the boot sector is damaged. This may be the result of a virus attack, inept configuration and optimization of the system by the user himself. This can happen due to improper installation of drivers or any utilities. A failure may occur during an incorrect shutdown of the computer when the plug is removed from the outlet without first turning off the computer through the Start menu. Or an unexpected power outage.

Sometimes a harbinger of a boot sector failure can be the so-called blue screen of death, after which the system may not boot.

But not everything is so sad, in Win XP OS, restoring the bootloader is a simple matter, as it might seem at first glance. To carry out manipulations to restore the Windows XP bootloader, we need a system image recorded on a disk or USB flash drive. The version and bit depth of the Windows XP operating system distribution kit must be the same as the one installed for recovery.

  • We burn the image and boot from a disk or flash drive. To do this, you need to get into boot menu- depending on the model of the motherboard of the computer or laptop, to get to the OS boot menu, you need to press one of the keys: Esc, F1, F2, F8, F9, F11, F12 etc. Here select our removable media.

  • Next, you should wait until the installation disk is fully loaded and in the installation window you need to press the key ( R ). This action is needed in order to open the recovery console.

  • Then you need to select the operating system (if it is one, then press the number ( 1 )).

  • In the recovery console we write the command fixmbr - this action will write a new Windows XP bootloader, confirm your choice with the key ( y ) which means Yes - that is, "Yes".

  • Now you need to write the boot code to the system disk partition of the hard drive. To do this, we write the command again, only now it will be a command ( fixboot ) and again ( y ) and Enter for final confirmation.

One of the most important system files of the Windows XP operating system with critical settings for booting the Windows XP system and known to everyone as the boot.ini file. Let's break it down for parts.

In case anyone else hasn't figured it out, this is one of the very first files that XP talks to when it boots up. Stored in plain text in the root directory of the system. His address is unshakable: C:\boot.ini. And since the file is a system file, it automatically (as well as other brothers) is assigned special attributes like Hidden, Systemic and Only for reading. So if you want to edit it, you'll have to change some of the Folder properties– without them, Windows XP Explorer hides such files:

How does boot.ini work?

Boot.ini contains information about the location of XP on your computer. If there are several operating systems, information about them is also displayed in the file (if, of course, only versions up to Windows XP, inclusive, take part in the download - downloading versions from Windows Vista goes in a completely different order).

REFERENCE

In versions of Windows Vista and later, the boot.ini file does not exist. Boot information is stored in a registry file named Boot Configuration Data(BCD) and the utility is used to edit boot parameters. bcdedit.com from the command line.

During the system startup process, the functions of another file are responsible for the correct choice of the operating system - Ntldr, which “looks” into the boot.ini currently being considered, which tells the Ntldr file where the system or systems actually need to be looked for. The boot.ini file is also designed to tell if you need to show some kind of menu with a choice of startup options and the time to choose them. In addition, it was in this file that the ability to load the operating system into or launch the system recovery console was located.

Windows XP Boot Menu

If the MORE THAN ONE option is stored in the boot.ini file, XP will automatically boot with the characteristic menu.

The structure and content of the boot.ini file

The file contains two main categories. The first - boot loader. It contains two settings. Timeout before booting a highlighted system by default “timeout=( XX sec.)”- you are free to set from 30 to 0. And the operating system loaded by default is displayed in the line “default =(operating system address). And for most users, this entry is the same:

"default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS"

The following parameters mean:

  • multi(X)- used by the disk's ATA controller to find the boot partition. Parameter always precedes parameter disk (X) if the SCSI controller not activated in the BIOS appears
  • rdisk(X)– physical hard drive; X- the number of hard drives - 0, 1, 2, etc. The countdown starts from 0!
  • disk (X)- logical disk (it is also a volume of a physical disk); X– number of volumes – 0, 1, 2, etc. The countdown starts from 0!
  • partition(X)– this parameter is linked to the parameter rdisk(X)– means a partition of this physical hard disk; X- number of sections - 1, 2, 3, etc. The countdown starts from 1!
  • \WINDOWS- a form of the parameter for the location of system files that is characteristic of Windows XP (XP-ha stores files in this folder).

The entry point is used by the file Ntldr in order to find the place where the system lies. But there are default lines of the boot.ini file that are more difficult to write the path, which, however, you almost never see on home machines, and they have not yet decided on the standards, so such systems have gone into oblivion. But what interests the average user is the ability to change the boot order in a multiboot computer configuration. Usually, the installation of several operating systems that takes place in an ordinary order prescribes the correct paths by default, with which you can play with the methods described below.

However, this happens until the moment when the performance of one of the systems ceases to suit the user, or after an unsuccessful installation, the entry appears, and the system ... is gone.

But let's continue.

The second section of our file is operating systems- includes a list of operating systems and boot programs, as well as their location. It may also contain keys that configure the system specified in the list. But actually the line from the parameter boot loader duplicated. If there are several systems, their names (description) are simply indicated through the “ = “. Parameter /fastdetect forces another critical file NTDETECT walk past, for example, a device installed in parallel in the same loop (for example, a DVDROM optical disc reader), but also having a serial number assigned to it. The keyboard, the mouse, and the card reader have such numbers ... Thus, the user is given the opportunity to specify as a boot device not the volume itself, but a DVDROM, flash drive or hard disk partition that contains only installation files, but does not have the system itself . However, it is better to carry out such an operation on a formatted disk without the files you need - get ready for the inevitable errors and reinstallations. The process is extremely cumbersome and requires knowledge and skills. And most importantly, none of the boot.ini file editing tools will allow you to display and perform operations on the entries of those operating systems that are loaded using other bootloaders.

What are boot.ini files?

Here is the most typical example of text inside the file you are looking for - everything is simple, the system is the same:

timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS multi(0)disk(0)rdisk(0)partition Professional" /fastdetect

Here is an example with the recovery console option enabled:

timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS multi(0)disk(0) rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect C:\CMDCONS\BOOTSECT.DAT="Microsoft Windows Recovery Console" /cmdcons

And this is an example of a dual boot with two different versions of Windows XP ( Home and professional):

timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS multi(0)disk(0) rdisk(0)partition(1)WINDOWS=”Microsoft Windows XP Professional RU” /noexecute=optin /fastdetect multi(0)disk(0) rdisk(1)partition(1)WINDOWS="Microsoft Windows XP Home" /noexecute=optin /fastdetect

And here is almost the same file, but the user decided to install 2 operating systems on one logical drive - this is often simply unacceptable (pay attention to the parameters partition(X)–Windows system folders have names Windows and Windows.0):

timeout=3 default disk(0) rdisk(0)partition(1)\WINDOWS.0="Microsoft Windows XP Professional RU" /execute /fastdetect multi(0)disk(0) rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition

An example when the user changed the time for reflection to 5 seconds and added an option safe mode:

timeout=5 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS multi(0)disk(0) rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect multi(0)disk(0) rdisk(0)partition(1)\WINDOWS="Safe Mode" /safeboot:minimal /sos /bootlog

How to edit the boot.ini file manually?

Since this is a text file, it means that it can be corrected. Let's change the attributes first. This is done right in the settings of the file itself after you have made it visible in the directory of the system drive. Yes ... copy the contents of the file into a document and place it in a known place, because just one mistake - and the system will not boot, or the menu will change not in your favor.

What are the options?

Reduce the time for reflection, for example, to 10 seconds. Run the configuration utility msconfig and adjust the time in the window part Time-out:

In this window, we will not be able to do anything else with the contents of the file. But you can work with the text of the file either by finding it through the explorer:

... or through the Windows XP control panel (or through My Computer):

Either way, Notepad will display its contents:

REFERENCE

And now a little secret about what happens when you open this window. It is this tab. In Windows of the NT family, this is a very cool thing - every time you open this particular tab, Windows accesses the MBR partition of the hard disk DIRECTLY (yes, bypassing memory) with only one purpose: to find out which disk is actually bootable now? So, if you have 2 different volumes on your hard drive with 2 Windows XP operating systems, change the assignment of disks for a moment in the Disk Management Console by swapping the boot volumes. And check again the contents of the file boot.ini- it has changed (unless, of course, the contents of the files themselves are the same, without additional options, you will not see the difference). And this is one of the things that can greatly facilitate the process of installing several copies of Windows XP in special conditions (for example, from a hard disk) without programs like EasyBCD.

Okay ... Let's look at the code of our file again:

timeout=3 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS.0 multi(0) disk(0)rdisk(0)partition(1)\WINDOWS.0="RU" / execute/fastdetect multi(0)disk(0) rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition EN" /noexecute=optin /fastdetect

In this file tells the file Ntldr what are we waiting for 3 seconds (timeout=3) so that from the hard drive - a physical hard disk - ( rdisk(0)) logical volume 0 section 1 (disk(0) partition(1)) loaded Windows XP Professional, whose system files are located in the folder Windows.0. The second of the systems ( Home Edition) will wait for the user to select. I repeat that such multi-boot settings of two systems on one volume are the height of user carelessness.

How else can I edit boot.ini ?

Of course, there is a program that allows you to relatively safely adjust the download file. It's already programmed into the system.

Utility bootcfg.exe.

Created specifically to work with a damaged boot.ini file or to edit file entry paths. The command includes several keys. Here's what the file looks like in the utility:

And here are the utility commands with arguments for it:


But what about EasyBCD? Not this time…

This program can do much more than just edit menus. It is designed for a comprehensive “reworking” of the boot menu with selection, renaming, changing the boot order and installation options for operating systems of various types. One of the methods is described in the article of the same name.

However, gentlemen, this is not our case - in part of the very name of the program, the abbreviation BCD already means that initially the program needs a boot loader of at least Vista, which, as I already mentioned, works in a COMPLETELY different way. So don't bother looking for earlier versions of the program for Windows XP (in which the program works great, by the way). There are only more errors in them than in modern ones, but the condition since the appearance of the program is the same - for correct operation directly from the menu of the EasyBCD program, you will need a version of Windows not lower than Vista. However, even in a Windows XP environment, EasyBCD can be extremely useful.

Errors in working with editing multiboot mode.

Probably, this problem should be taken out in a separate topic. Do not blame the inoperability of programs and utilities if something does not work out. The fact is that a huge number of errors are associated precisely with the user's ignorance of the basic principles of the operation of the operating system itself. Before starting work on installing several operating systems, the user needs to understand a few points. To some, they will seem childish, but even a superficial survey of users shows that users almost do not really know:

  • what is the difference between physical and logical drives
  • what is the difference between active and logical partitions of a hard drive
  • what is a system volume (disk)
  • what is and where is the boot sector of the disk
  • what is formatting and what is it for
  • how to read the system boot file correctly (you already know everything about boot.ini)
  • what is the difference between the boot process of Windows XP and Vista (and higher)

Consider the most typical examples of vinaigrette, which the user himself can get into.

EXAMPLE ONE

  • Imagine that to the existing copy of the operating system (let's take both Windows XP to simplify the OS of one generation - with different systems it's still worse), the user adds another one. Let's take it as a rule - the user is not a fool and prudently split the hard drive into 2 volumes and installed the 2nd on a separate partition. Now he has 2 OS Windows XP. And here is our file:
timeout=3 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS.0 multi(0) disk(0)rdisk(0)partition(1)\WINDOWS.0="Microsoft Windows XP Professional EN" / execute/fastdetect multi(0)disk(0) rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition EN" /noexecute=optin /fastdetect

And here is the menu:

  • However, as often happens, one of them becomes unusable. The one installed first. And the decision was made: to remove. What can be done? Of course, take advantage of the knowledge gained and erase the information from the menu so that there is no longer an entry. Let's remove the line about a non-working system (for example, XP Professional versions):

As you understand, the Windows menu will change, but the system will continue to boot. Who understood, well done. Who is not, I explain. Boot.ini tells the file Ntldr that you need to boot Windows from the folder Windows.0. The partitions, the disk number itself match, but there is no information about the folder - we just deleted it. But the folder itself is alive and well, and its settings allow the system to boot. As a result, the boot menu will change (this is the very case when the user's ignorance of the basics of the OS saves from incorrect correction of the boot.ini file and allows you to save data, but not the order in the files!):

sorry for the quality - recording Windows (default) illuminated

How should it have been done?

In this case, an example of a new boot file should look like this:

Timeout=3 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition RU" /noexecute=optin /fastdetect

As you can see, we deleted not only the information about the existing folder Windows.0, but also changed its name in the parameter defaults by specifying the desired Windows with a “live” system (by the way, since the system is left alone, timeout you can specify 0 - what's the point of looking at the choice, if there is no choice).

EXAMPLE TWO

Nothing is loading at all. If so, then you have corrupted one of these:

  • BOOT.INI
  • NTLDR
  • NTDETECT.COM

Well, by the way, I forcibly deleted boot.ini more than once, and the system booted. If this trick does not work for you, you will have to use the DOS programs from the LiveDVD package from to restore the bootloader.

P.S. You can't write an article for every mistake. While writing, the article, as I noticed, has grown to almost unreadable. So ask questions in the comments.

Good luck to all of us.

Read: 1 244

The article is intended for users who are familiar with such concepts as, for example, working on the command line with administrator rights and who can enable the display of hidden and system files and folders. Knowledge of the installation process and features is desirable. The article does not claim to be universal, that is, it covers Microsoft operating systems: from Windows XP to Windows 7.

Initial conditions, or "And a few more restrictions." It goes without saying that you already have two systems installed and need to reinstall one of them. They are located on the same hard drive, during the reinstallation will not change partition configuration, installation will be done to the same section, on which it was located, formatting will be performed using the installer.

Introduction

As practice shows, users face significant difficulties when reinstalling one of the operating systems when there are several on the same computer. This article will be of interest primarily to those whose boot is implemented in the form of a boot menu (and not by choosing a boot device in the BIOS). The goal is to talk about the necessary preliminary steps to facilitate the process of recreating the multiboot menu after reinstalling one of the operating systems.

A bit of theory

The operating system is loaded from the active partition of the hard disk. In the disk manager, such a partition is called system. This section contains files for loading operating systems. You can also determine the activity of a partition using third-party programs such as (the active partition will be marked with the so-called "activity flag"), or use the program available in Windows diskpart.

diskpart
sel disk 0
sel part 1
detail part

The result of the execution of the commands will be a report, which will indicate the status of activity. If the selected section is not active, you need to execute the last two commands in the list, but select the next section - 2

Figure 1 - working with the DiskPart program

In addition, for a successful download, you must:

  • the presence of a Master Boot Record (Master Boot Record - MBR) and boot sector compatible with operating system boot files ( ntldr- for Windows XP and bootmgr- for Windows 7/Vista);
  • the presence in the root directory of the active partition of other boot files: for Windows XP - files ntdetect.com and boot.ini, for Windows 7/Vista - Boot Stores - Boot Configuration Data ( BCD), which is located in a hidden system folder BOOT;
  • in the case when two operating systems (Windows XP and Windows 7) are installed on the computer, the boot files of both of them must be on the active partition.

Failure at least one from these conditions
will boot one or more operating systems
impossible!

Figure 2 - Windows XP and Windows 7 boot files on active partition

red windows 7 boot files are underlined, blue- Windows XP Boot Files

Required Tools

  1. Installation disk with Windows XP operating system;
  2. Installation disk with Windows 7 operating system;
  3. Utility bootsect.exe which is in the folder BOOT on the distribution disk with Windows 7. If you don't have one, you can get it here.

Part 1. Reinstalling an operating system that is on an inactive partition

Configuration 1: Windows 7 on active partition, reinstall Windows XP

  1. utility bootsect.exe place on the partition with Windows 7;
  2. Boot from the Windows XP installation disc. After the prompt to install the system appears, select the one on which it was previously located, format and install it;
  3. After installation, the ability to select operating systems to boot will disappear. In order to return this feature, on the command line, run:
  4. X:\bootsect /nt60 All

    where X- partition letter with Windows 7, or

    X:\BOOT\bootsect /nt60 All

    where X- the letter of the DVD-ROM drive with the Windows 7 distribution disk installed in it;

  5. Reboot

Configuration 2: Windows XP on active partition, reinstall Windows 7

  1. Create a folder on the Windows XP partition BCDREZ
  2. bcdedit /export X:\BCDREZ\bcd

    where X- partition letter with Windows XP

    If you cannot boot into Windows 7, then you can run this command in Windows XP:

    Y:\Windows\System32\bcdedit /export X:\BCDREZ\bcd

    where Y- partition letter with Windows 7, X- with Windows XP;

  3. Perform the installation of Windows 7, if necessary, format the partition into which the installation will be performed.
  4. Once installed, a new boot entry will appear in the boot menu. You can correct the menu in various ways, but we will use one: we will return the saved entry.

  5. On Windows 7, at an administrator command prompt, run:
  6. bcdedit /import X:\BCDREZ\BCD

where X- partition letter with Windows XP.

After the reboot, you will get the old boot menu.

Part 2. Reinstalling the operating system located on the active partition

Configuration 1: reinstall Windows 7 on the active partition, Windows XP - on the inactive one

There are two options:

First: when installing Windows 7 hidden partition System Reserved not formed.

After formatting the active partition in this case, you will no longer be able to boot into Windows XP, as the boot files will be deleted. To avoid complications, in Windows 7, follow a few simple steps:

  1. On the Windows XP partition, create a folder BOOTREZ;
  2. Open the display of hidden and system files, copy the XP boot files: ntldr, ntdetect.com, boot.ini, it is desirable to additionally copy the file bootfont.bin for correct display of Cyrillic in the boot menu;
  3. Export BCD command:
  4. bcdedit /export X:\BOOTREZ\bcd

    where X- partition letter with Windows XP

  5. Install Windows 7;
  6. After installation, open the display of hidden and system files, copy from the created folder BOOTREZ XP Boot Files: ntldr, ntdetect.com, boot.ini, bootfont.bin to the active partition;
  7. Import the saved boot data with the command:
bcdedit /import X:\BOOTREZ\bcd

where X- partition letter with Windows XP

Second, when installing Windows 7, a hidden System Reserved partition was created.

Figure 3 - offer to select the second partition for installation

In this case, the active section is System Reserved, so if you limit yourself to formatting the disk space previously occupied by Windows 7, then nothing will be lost after the reboot. The only action that you have to perform is using the utility bcdedit change the name of the "Early version of the operating system", and then optionally:

Bcdedit /set (ntldr) description "Write what you want"

Configuration 2: Windows XP on active partition, Windows 7 on inactive

After formatting the active partition, you will lose not only the boot menu of operating systems, but also the very ability to boot into Windows 7 even after changing MBR using the utility bootsect.exe, since the download file bootmgr and BCD will be removed. However, there is a simple way to avoid difficulties.

  1. Create a folder on the partition with Windows 7 to store copies of download files BCDREZ
  2. In Windows XP (this circumstance is especially important, since in Windows 7 you will not be able to perform a similar procedure), copy the file bootmgr and folder BOOT(do not forget that they are hidden and systemic)
  3. Reinstall Windows XP
  4. Open the display of hidden and system files, copy from the folder BCDREZ folder BOOT and file bootmgr to the root directory of the active partition
  5. Overwrite the MBR and boot sector:
X:\bootsect /nt60 All

where X- partition letter with Windows 7 or

X:\BOOT\bootsect /nt60 All

where X- letter of the DVD-ROM drive with the Windows 7 distribution disk installed in it

After the reboot, you will again be able to boot into both operating systems.

Conclusion

If you read this article after having problems, use the Windows 7 distribution disk, or the Windows 7 recovery disk. How to create it, read the article. After booting from one of them, in the window prompting you to install the system, select the "System Restore" link, and then - "Startup Repair". After that, if there are no other boot problems, you will be able to boot into Windows 7 and then dual boot. If you have any more questions, welcome to .