Restore the xp bootloader after installing windows 7. How to restore the windows xp bootloader? Step-by-step instruction

Hello, dear blog visitors.

Launching operating systems from Microsoft Corporation consists of several main stages, arranged in a strict sequence. And if at least one of the elements fails, you most likely will not be able to boot. There are many reasons why situations like this happen. In general, to solve the problem, the Windows XP boot loader 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 major systems. Then it transfers control to just the above-mentioned area.

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

Causes( )

There are several main reasons why such problems arise:

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

    Removing Linux or the launch manager.

  1. Mechanical damage to the hard drive.

    Power problems.

MBR( )

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

The MBR has now been restored. You can restart the device and check its functionality.

Boot sector( )

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

In general, in terms of general indicators, 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 be possible to “resurrect” the system.

Boot.ini( )

If the previous option did not change the situation, we correct the file Boot.ini. To do this, perform a few simple movements:

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.

The article is intended for users who are familiar with concepts such 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 of installing Windows XP after Windows 7 is desirable. The article does not pretend to be universal, that is, it examines 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 there is a need to reinstall one of them. They are located on the same hard drive, during reinstallation will not change partition configuration, installation will be carried out to the same section, on which it was located, formatting will be performed using the installer program.

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 selecting 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 little theory

The operating system boots from the active partition of the hard drive. In Disk Manager, this partition is called system. This section contains operating system boot files. You can also determine the activity of a partition using third-party programs such as Acronis Disk Director Suite (the active partition will be marked with the so-called “activity flag”), or use the program available in Windows DiskPart. Launch the command line and then execute the commands sequentially: Diskpart sel disk 0 sel part 1 detail part The result of executing the commands will be a report indicating the activity status. 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 successful downloading you must:

  • 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 of other download files in the root directory of the active section: for Windows XP - files ntdetect.com And boot.ini, for Windows 7/Vista - boot storage - Boot Configuration Data ( BCD), which is located in a hidden system folder BOOT;
  • in the case when two operating systems are installed on the computer (Windows XP and Windows 7), the active partition must contain the boot files for both of them.

Failure to comply at least one these conditions will make the boot of one or more operating systemsimpossible!

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

Red Windows 7 download files are underlined, blue- Windows XP download 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 located in the folder BOOT on the distribution disk with Windows 7. If you don’t have one, you can get it here bootsect.zip.

Part 1. Reinstalling the operating system located on an inactive partition

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

  1. utility bootsect.exe place it 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. To return this feature, run on the command line:
  4. X:\bootsect /nt60 All where X- letter of the partition with Windows 7, or X:\BOOT\bootsect /nt60 All where X- drive letter of the DVD-ROM with the Windows 7 distribution disk installed in it;
  5. Reboot

Configuration 2: Windows XP on the 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 this command can be executed in Windows XP: Y:\Windows\System32\bcdedit /export X:\BCDREZ\bcd where Y- letter of the partition with Windows 7, X- with Windows XP;
  3. Install Windows 7 and, if necessary, format the partition where the installation will be performed.
  4. After installation, a new boot entry will appear in the boot menu. You can adjust the menu by various means, but we will use one: return the saved entry.
  5. On Windows 7, in a command prompt with administrator rights, run:
  6. bcdedit /import X:\BCDREZ\BCD
Where X- letter of the partition with Windows XP. After rebooting you will get the same 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 partition

There are two options:

First: when installing Windows 7, a 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, since 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 show hidden and system files, copy XP download files: ntldr, ntdetect.com, boot.ini, it is advisable to additionally copy the file bootfont.bin to correctly display the Cyrillic alphabet in the boot menu;
  3. Export BCD command:
  4. bcdedit /export X:\BOOTREZ\bcd where X
  5. Install Windows 7;
  6. After installation, open the display of hidden and system files, copy from the created folder BOOTREZ XP download files: ntldr, ntdetect.com, boot.ini, bootfont.bin to the active section;
  7. Import the saved download 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 - proposal 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 after a reboot nothing will be lost. The only action you have to perform is using the utility bcdedit change the name of the "Early version of the operating system", and even then at will: bcdedit /set (ntldr) description "Write what you want"

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

After formatting the active partition, you will lose not only the operating system boot menu, but also the ability to boot into Windows 7 even after the change MBR using the utility bootsect.exe, since the download file bootmgr And BCD will be deleted. However, there is a simple way to avoid difficulties.
  1. Create a folder on the Windows 7 partition to store copies of download files BCDREZ
  2. In Windows XP (this circumstance is especially important, since in Windows 7 you cannot perform a similar procedure), copy the file to the created folder from the root directory of the active partition bootmgr and folder BOOT(don't forget that they are hidden and systemic)
  3. Reinstall Windows XP
  4. Open display hidden and system files, copy from folder BCDREZ folder BOOT and file bootmgr to the root directory of the active partition
  5. Perform a rewrite of the MBR and boot sector:
X:\bootsect /nt60 All where X- letter of the partition with Windows 7 or X:\BOOT\bootsect /nt60 All where X- drive letter of the DVD-ROM with the Windows 7 distribution disk installed in it. After rebooting, you will again be able to boot into both operating systems.

Conclusion

If you read this article after having encountered problems, use a Windows 7 distribution disk or a Windows 7 recovery disk. How to create one, read the article Creating a system recovery disk and booting from it. After booting from one of them, in the window asking you to install the system, select the “System Restore” link, and then “Startup Repair”. After this, if there are no other boot problems, you will be able to boot into Windows 7, and then organize a dual boot. If you still have questions, welcome to the forum. The article was published as part of the competition

Skills that will help the user restore the Windows 7 bootloader are necessary if the operating system does not start at all or a number of problems arise during the process of turning it on.

The operating system loader is a system program that is designed to start the OS. In simple terms, this is a utility with which you turn on your computer.

With the advent of new versions of operating systems, bootloaders also improve. For example, Windows XP boots using UEFI. Newer versions of the OS (starting from the seventh) use the BOOTMGR system utility during their boot process.

Types of bootloader problems

The most common cause for concern is the following errors:

  • When you try to start the system, messages called “Bootmgr is missing” and/or “Non system disk” appear. They occur as a result of damage to the bootloader or master boot record;
  • The operating system may also be blocked by a virus.
    In this case, it is necessary to restore the bootloader if a message from a hacker asking to send money to destroy the virus appears immediately after the user presses the start button on the personal computer or laptop;

Remember! If the operating system has already begun the startup process and errors began to appear only later, this does not indicate a problem with the bootloader. Try turning on the OS in safe mode and troubleshooting any problems (for example, virus software).

Before attempting to set up the boot loader, go to the BIOS and make sure that the system has the correct boot order for all hard drives.

If you have two hard drives installed on your computer at once and their startup order is incorrect, problems with the bootloader may occur.

The first in line should be the disk on which the operating system to be launched is installed.

Automatic recovery using USB drive

You need to solve the problem starting with the easiest method. If you are unable to fix the bootloader using the method below, try the following solution to the problem presented in the article.

To begin the process of solving the problem, take the disk from which the OS was installed. If you don’t have one, you can restore without a disk - in this case, you need to create a bootable external USB drive.

The version of the operating system located on the media must fully match that installed on the computer.

To perform automatic recovery from a flash drive or disk, follow these steps:

  • Insert the disk into the drive or flash drive into the slot. Start the computer and in the first few seconds press the F button on the keyboard. This way you will instantly launch the BIOS menu before a problem occurs.
    In the BIOS, change the boot order of the OS components - the disk or flash drive should come first (depending on which device with the OS image you connected to the computer).
    After the boot queue has been set, save all changes and exit the BIOS settings. The OS startup process will begin again, however, now it will boot directly from the image media. The following window will appear;
  • At the bottom of the window (Figure 2), find the OS recovery item and click on it. Now you need to select the OS that needs to be restored (if several systems are installed on the computer at the same time);
  • After you have decided on the name of the OS whose operation you want to fix, a window will appear with all the available operating system recovery options. To get started, select automatic troubleshooting.
    This method may help, but not in all cases. If the system still does not turn on after such an automatic fix, repeat steps 1-3 again and now select the second option (enabling a previously saved OS state).
    Wait until all the necessary actions are carried out automatically by the program. If the system boots successfully, the problem is resolved. If not, you should restore it manually.

Restoring OS boot configuration data

OS startup configuration information contains detailed information about the order in which data should be loaded when the computer's operating system is turned on.

Often the OS bootloader fails to complete due to corrupted items in the Boot Configuration Data. To fix the problem, you need to add new configuration data to the OS bootloader:

A complete configuration update can be performed using the rebuildbcd command. To perform it, you need to open a command line window in the system recovery options (as in the figure above).

In the line, enter the text “bootrec.exe /rebuildbcd” (without quotes) and press the Enter button to execute the command. The update process may take several minutes. After its completion, a line about the result of the command will appear in the utility window.

After restoring the data, you should turn off the computer, remove the disk with the OS image from it, configure the standard boot order in the BIOS and turn on the device again. If all actions were done correctly, the system will start in standard mode.

If after executing the command you receive a system notification that the configuration could not be restored, you must boot into safe mode.

To do this, enter the command bootrec.exe/safeboot at the command line - it allows you to start the operating system using a minimum number of drivers and third-party utilities that can cause an OS bootloader error.

To view and edit bootloader configuration parameters, run the BCDEdit.exe command:

Recovery using Bootrec utility

If the above methods for restoring the OS do not work, you need to try to fix the bootloader using a system utility called bootrec. Go to the command line (second instruction of the article) and enter the following command in it:

bootrec/fixmbr– this command allows you to instantly rewrite the bootloader data in the corresponding partition on the hard drive.

Now enter the command bootrec /fixboot to write a new partition for later booting. The command line window after successfully entering and executing the commands should look like this:

Close the command line, exit the recovery environment, return the boot queue to the BIOS and turn on the OS in the usual way, everything should work fine.

Restarting Windows 7 boot after installing XP

If two versions of Windows OS are installed on your PC at the same time: XP and version seven, in most cases a failure will occur when you try to run a newer version of the system.

This happens because the XP boot loader does not assume that there are any other boot loaders in the system, so it does not allow you to select and run another OS installed on the computer.

To fix the problem, just return the boot selection using the MultiBoot utility - this is a small program that effectively eliminates the problem of bootloader conflict. Install the application on your computer and follow the instructions:

  1. Check all the necessary boxes in the main window of the utility;
  2. Click on the “Run” button;
  3. Once the process is complete, restart your computer.

Thematic video:

Restoring the windows bootloader.

In this video you will learn about restoring the windows bootloader. If you installed windows 7 on a computer where windows xp was already installed, then xp will stop loading.

Skills that will help the user restore the Windows 7 bootloader are necessary if the operating system does not start at all or a number of problems arise during the process of turning it on.

The operating system loader is a system program that is designed to start the OS.

In simple terms, this is a utility with which you turn on your computer.

With the advent of new versions of operating systems, bootloaders also improve. For example, Windows XP boots using UEFI.

Newer versions of the OS (starting from the seventh) use the BOOTMGR system utility during their boot process.

Types of bootloader problems

The most common cause for concern is the following errors:

  • When you try to start the system, messages called “Bootmgr is missing” and/or “Non system disk” appear. They occur as a result of damage to the bootloader or master boot record;
  • .
    In this case, it is necessary to restore the bootloader if a message from a hacker asking to send money to destroy the virus appears immediately after the user presses the start button on the personal computer or laptop;

Remember! If the operating system has already begun the startup process and errors began to appear only later, this does not indicate a problem with the bootloader. Try turning on the OS in safe mode and troubleshooting any problems (for example, virus software).

Before attempting to set up the boot loader, go to the BIOS and make sure that the system is set to the correct boot order for all hard drives.

If you have two hard drives installed on your computer at once and their startup order is incorrect, problems with the bootloader may occur.

The first in line should be the disk on which the operating system to be launched is installed.

Automatic recovery using USB drive

You need to solve the problem starting with the easiest method.

If you are unable to fix the bootloader using the method below, try the following solution to the problem presented in the article.

To begin the process of solving the problem, take the disk from which the OS was installed.

If you don’t have one, you can restore without a disk - in this case, you need to create a bootable external usb media.

The version of the operating system located on the media must fully match that installed on the computer.

To perform automatic recovery from a flash drive or disk, follow these steps:

  • Insert the disk into the drive or flash drive into the slot. Start the computer and in the first few seconds press the F button on the keyboard. This way you will instantly launch the BIOS menu before a problem occurs.
    In the BIOS, change the boot order of the OS components - the disk or flash drive should come first (depending on which device with the OS image you connected to the computer).
    After the boot queue has been set, save all changes and exit the BIOS settings. The OS startup process will begin again, however, now it will boot directly from the image media. The following window will appear;

  • At the bottom of the window (Figure 2), find the OS recovery item and click on it. Now you need to select the OS that needs to be restored (if several systems are installed on the computer at the same time);

  • After you have decided on the name of the OS whose operation you want to fix, a window will appear with all the available operating system recovery options. To get started, select automatic troubleshooting.
    This method may help, but not in all cases. If the system still does not turn on after such an automatic fix, repeat steps 1-3 again and now select the second option (enabling a previously saved OS state).
    Wait until all the necessary actions are carried out automatically by the program. If the system boots successfully, the problem is resolved. If not, you should restore it manually.

Restoring OS boot configuration data

OS startup configuration information contains detailed information about the order in which data should be loaded when the computer's operating system is turned on.

Often the OS bootloader fails to complete due to corrupted items in the Boot Configuration Data.

To fix the problem, you need to add new configuration data to the OS bootloader:

A complete configuration update can be performed using the rebuildbcd command.

To perform it, you need to open a command line window in the system recovery options (as in the figure above).

In the line, enter the text “bootrec.exe /rebuildbcd” (without quotes) and press the Enter button to execute the command. The update process may take several minutes.

After its completion, a line about the result of the command will appear in the utility window.

After restoring the data, you should turn off the computer, remove the disk with the OS image from it, configure the standard boot order in the BIOS and turn on the device again.

If all actions were done correctly, the system will start in standard mode.

If after executing the command you receive a system notification that the configuration could not be restored, you must boot into safe mode.

To do this, enter the command bootrec.exe/safeboot at the command line - it allows you to start the operating system using a minimum number of drivers and third-party utilities that can cause an OS bootloader error.

To view and edit bootloader configuration parameters, run the BCDEdit.exe command:

Recovery using Bootrec utility

If the above methods for restoring the OS do not work, you need to try to fix the bootloader using a system utility called bootrec.

Go to the command line (second instruction of the article) and enter the following command in it:

bootrec/fixmbr– this command allows you to instantly rewrite the bootloader data in the corresponding partition on the hard drive.

Now enter the command bootrec /fixboot to write a new partition for later booting.

The command line window after successfully entering and executing the commands should look like this:

Close the command line, exit the recovery environment, return the boot queue to the BIOS and turn on the OS in the usual way, everything should work fine.

Restarting Windows 7 boot after installing XP

If two versions of Windows OS are installed on your PC at the same time: XP and version seven, in most cases a failure will occur when you try to run a newer version of the system.

This happens because the XP boot loader does not assume that there are any other boot loaders in the system, so it does not allow you to select and run another OS installed on the computer.

To fix the problem, just return the boot selection using the MultiBoot utility - this is a small program that effectively eliminates the problem of bootloader conflict.

Install the application on your computer and follow the instructions:

  1. Check all the necessary boxes in the main window of the utility;
  2. Click on the “Run” button;
  3. Once the process is complete, restart your computer.

Restoring the windows bootloader.

In this video you will learn about restoring the windows bootloader. If you installed windows 7 on a computer where windows xp was already installed, then xp will stop loading.

mob_info