1. Formatting and setting boot sector codes. To format a flash drive, use the utilityUSB Disk Storage Format.(HP USB Disk Storage Format Tool) -hpusbfw.exe. Attempts to use standard formatting in Windows environment usually ends up with boot sector codes not being set, so it's better to use this utility. After launching in the main program window you needselect a flash drive to format .



Be careful, as the disk for formatting you need to select exactly the flash drive that will be used as a multiboot one. The file system can be selected FAT32 or NTFS. Check mark quick formatting(Quick Format). After formatting is completed, a window with the results will be displayed



To set boot sector codes (main boot entry MBR and PB partition boot sector code) you can use either the console (grubinst.exe) or graphical version (grubinst_gui.exe) of the GRUB installer. Version with graphical interface simpler, and when using it there is less chance of error.



Be careful when choosing a disk! The Grub4Dos installer uses the GRUB disk naming convention. Therefore, the selected disk cannot under any circumstances be(hd0)(This boot disk your system) and its volume should be approximately equal to what the flash drive formatting program produced. After selecting the disk, pressInstallOnce the installation is complete, you will receive a message about the results:




Click ENTERand close the installer.


2. Copy necessary files and menu settings. Now all that remains is to copy the bootloader to the USB flash drivegrldr, menu file and .iso image files. For ease of use, I collected all this in an archive,Download ~530 MB.
After unzipping, you need to write all the files to the USB flash drive.
For those who already have ERD iso image files, you can copy them to a flash drive (observing the image names - erd50.iso, erd60.iso, erd65.iso) and add the following files from the previous archive:

grldr - bootloader.
menu.lst - bootloader menu file
erdall - graphical menu shell.

The multiboot flash drive is ready. You can boot.
Please note that unpacking the images takes some time and the screen may remain blank after selecting a menu item. Depending on file size ISO image, the performance of the flash drive, and the system as a whole, this can last from several seconds to several minutes.

The composition of the image files and the contents of the bootloader menu file can be changed according to your wishes.

Contents of the menu.lst file:

default 0
gfxmenu /erdall
root(hd0,0)

title ERD Commander 5.0 for Windows XP/Windows 2003
map --mem /erd50.iso (0xff)
map --hook
chainloader (0xff)
boot

title ERD Commander 6.0 for Windows Vista / Windows 2008
map --mem /erd60.iso (0xff)
map --hook
chainloader (0xff)
boot

title ERD Commander 6.5 for Windows 7 / Windows 2008 RC2
map --mem /erd65.iso (0xff)
map --hook
chainloader (0xff)
boot

Explanations of the GRUB commands used in the file: default 0- select the first menu item by default (default 1 - second, etc.)

gfxmenu /erdall- use the erdall file as the graphic style of the menu

root(hd0,0)- the first partition of the first disk will be used as the root partition, i.e. the first section of the flash drive from which the boot was performed.

title ERD Commander 5.0 for Windows XP / Windows 2003 - This is a boot menu item. The sequence of commands in each item specified title is the same, only the names of the items and the names of the image files differ.

map --mem /erd50.iso (0xff) Team map in this case it is used to emulate a CD in RAM (parameter --mem from image file erd50.iso to download device 0xFF. Team map used for booting from images and for replacing disks when, for example, it is necessary to boot Windows from the GRUB menu of a bootable flash drive. In this case, if you do not swap the drive, the boot will end with a message that the hal.dll file was not found, due to the fact that the Windows boot loader could not find the system directory, which should have been on (hd0). System location data contained in the boot.ini file, bootloader ntldr Windows will look for (hd0), which will be your flash drive. Therefore, to ensure normal loading Windows installed on a hard drive usually maps the disks so that the Windows disk becomes (hd0)

map-hook- perform mapping immediately. Map commands are not executed immediately, but are queued for execution. To undo changes to disk device emulation, use map -unhook

Parameter --mem not required, but recommended. If it is absent, the download will be performed without mapping the image to RAM, and will look the same as booting from a CD. However, GRUB has an important limitation when creating a virtual device from a disk image without mapping it into memory - the image file must be contiguous (not fragmented). This condition is usually met when CD/DVD is used as the storage medium. In the case of using a flash drive, when removing and adding separate files, it is quite possible that the image file may consist of several fragments and the download will end with an error message:

File for drive emulation must be in one contiguous disk area(The disk emulation file must be contiguous.)

In this case, you need to either defragment the file, for example, using the utility contig, or use image emulation in RAM, which does not require placing the file in the form of a single fragment. You just need to take into account that the computer’s RAM must be sufficient to accommodate the image file. Usually, images small size are used with the -mem parameter, and direct mapping is used for files whose size does not allow them to be fully read into the computer's RAM. The pause, in the form of a blank screen, during the loading of large images and the use of mapping into memory, is caused by the relatively long time it takes to read data from the flash drive into RAM when emulating a boot device.

chainloader (0xff)- GRUB will use the device obtained during mapping 0xff as a boot device.

boot- execute the loading procedure prepared by the previous commands.

As an additional menu item, you can add the option Windows boot installed on your hard drive.

title Boot from first Hard Disk
map (hd1,0) (hd0,0)
map-hook
chainloader (hd0.0)+1
boot

The commands used in this paragraph are slightly different from those discussed above. As already noted, to boot Windows, the boot device must be the first HDD(hd0). Team map (hd1,0) (hd0,0) assigns a match to the first partition of the first disk (hd0,0) to the first partition of the second disk (hd1,0), i.e. Instead of the flash drive from which the initial boot was performed, the hard drive will become the device (hd0). Team chainloader (hd0.0)+1 means that the first sector (+1) from the first partition of the first disk will be loaded.

In conclusion, I will add that this technique allows you to create your own edition of the resuscitation flash drive, for example, by adding the ability to download Acronis products, Alkid CD, Ruslive CD assemblies, etc.

It is a software product designed to restore the functionality of Windows OS. Key Function program comes down to disaster recovery of the system. The abbreviation ERD and translates as “disk disaster recovery"(Emergency Repair Disk). The program allows you to restore the functionality of the system in cases of significant disruption, in particular in cases where the PC is blocked by viruses. This happens not only by removing malware, but also by restoring registry files from recovery point data. Microsoft Windows distributes ERD Commander as part of Microsoft package Desktop Optimization Pack.

Advantages and disadvantages of ERD Commander

Extensive capabilities for restoring a damaged operating system;
+ ease of use;
+ general availability;
- long loading times on individual PCs;
- possible problems compatible on 32 and 64 bit systems;
- the need to boot from a CD or other removable media.

Key Features

  • restoring a damaged system;
  • displaying tasks that automatically start during the OS boot process;
  • disk management (including formatting disks and deleting individual partitions)
  • viewing the OS event log;
  • editing the registry;
  • installation and configuration network drivers and services;
  • managing drivers and OS system services;
  • sets of network, system tools and connected OS administration tools.

Hello again!
Assuming that the information will be useful to someone...

So: Introductory.
My computer is puny (by today's standards), but it has a lot of HDD. Historically, the OS was installed on three of them. 2 XP installed at different times and the latest installed WIN7 OS on the third one.
Somehow, in the settings of the latter defragmentation program there were active checkboxes for all disks. This is where I assume that the problem started with the inability to boot from under the other 2.
The trouble is so-so, but I really wanted to finish off the recovery.
What happens or happened during defragmentation, I hope, is already clear.
Result: Not a single system booted.
I first started with the smallest HDD, 40G.
Maximum - reached the command line. I tried all the more or less common methods on the Internet. And, after selecting from the menu obtained either through F8 or in another way, I had either a black screen or a hang on a certain dll or driver (I don’t remember). And that's it...

About ERD.
I learned about it and how not to try it.
Again, after all conceivable and inconceivable tests, I had the HDD I needed with some OS in the ERD menu. Somehow because: 1, what was determined was not exactly the OS that should have been (some kind of Win200 server instead of XP3) and 2. As I wrote above, the OK button is inactive.

BUT!
By default, the system still turns out to be confusing rollback points. This is where ERD helped.
Let's boot from it.
We go to our HDD, on which the system should be.
Looking for: x:\System Volume Information\_restore...\RP...\snapshot
RP - probably from Restore Point. We are looking for the RP that best matches the date.
There are files there: _REGISTRY_MACHINE_SAM; _REGISTRY_MACHINE_SECURITY; _REGISTRY_MACHINE_SOFTWARE; _REGISTRY_MACHINE_SYSTEM; _REGISTRY_USER_.DEFAULT.
Copy them to: C:\WINDOWS\system32\config.
NATURALLY, don’t forget to copy the files of the same name from there, just in case, for example, to the TEMP folder.
Rename to: SAM; SECURITY; SOFTWARE; SYSTEM; DEFAULT.
By the way, there you can find (and try to use) the same files with the *.bak extension. I haven't tried it. I didn't realize it.

After that I rebooted from the ERD and... Oh! Miracle! ERD sees my OS!!!
Next, I inserted the distribution CD (installation disk). I start the computer. And if earlier, when choosing from the menu: update or restore, I was thrown out and the machine didn’t listen at all, but now the Update has worked. Well, after 30-40 minutes a desktop appeared with everything that was on it.

WARNING. After this, not all previously installed programs work or work correctly, fully. This can be used if there are no other options or in the hope of saving something important which, according to the law of meanness, was on the desktop or somewhere there, something else.

PySy. Next in line is the next HDD with XP3 and then Win7. This one, by the way, died when I tried to boot from a half-dead other system and it went through the process of scanning and trying to correct something wrong on Win7 ( blue screen at startup).
ALL! I won’t forget - I’ll post if and how I restored it.

First, a little theory...
When you turn on the computer's power, a general hardware reset is performed and control is transferred to a special program flashed in the BIOS read-only memory (ROM) called the Basic Input/Output System. The main purpose of the BIOS is to check the functionality of the computer hardware, reset and initialize the main controllers, and perform the initial boot of the operating system. Equipment testing is performed by a self-testing routine (POST - Power On Self Test). POST runs a group of tests that check the performance of the processor, memory, main chipset controllers, as well as some peripheral devices necessary to perform the initial boot (disks, keyboard, video adapter, etc.).

If errors are detected during the POST process that do not allow loading, a stop is performed and a special sound signal is issued that allows you to identify faulty equipment. POST error codes are not standardized and are determined by the BIOS version. If testing was successful, on almost all BIOS versions single short is issued sound signal(“short beep”) and the operating system boot procedure begins.
To perform the initial boot, in general, the BIOS routine must read a certain formatted program with external media into RAM and transfer control to it. To boot from external USB disk, it is necessary for the BIOS boot routine to be able to detect a boot device that contains a special entry in its first sector Master Boot Record or MBR.

By default, the MBR is located in the first sector of the boot disk and occupies 512 bytes (standard sector length). This is not a prerequisite - the MBR can occupy more than one sector, which depends on the specific type of bootloader. Although the MBR entry is not strictly dependent on the platform of the OS being booted, it is different for DOS, file Windows systems and Linux. A mandatory sign of the presence of an MBR record in the first (sometimes called zero) sector of the disk is a special code (signature) in the last two bytes - 55AA. The presence of a signature is checked by the BIOS routine first, and if it is absent, the disk is considered non-bootable, even if all other bootable conditions are met. Many hard drive programs allow you to view and edit data from selected sectors. For example, this is what an MBR record looks like when viewed using free version Victoria for Windows.

Strictly speaking, the presence of a signature is not so much a sign of the presence of an MBR as a sign of the presence of any partitions on the disk. If you change, for example, using a disk editor, the sector signature, then both the BIOS and the operating system will consider such a disk to be “unformatted”. Before the signature (at offset 0x1BE relative to the beginning of the sector) there is a Partition Table, consisting of 4 elements of 16 bytes each, which determines maximum number(no more than 4) partitions on the hard drive. Each element describes the type of partition (00h - partition of unspecified type, simply free space, 01h - 12-bit FAT, 05h - extended partition, 07h - NTFS, etc.), a sign of activity (boot capability) - code 80h, start address , end address, offset relative to the MBR, and number of partition blocks. Simplified, the MBR structure can be represented as follows:

  • program code and data. (446 bytes)
  • disk partition table (4 fields of 16 bytes - 64 bytes)
  • signature 55AA (2 bytes)

The boot program looks for the active partition, reads data from the first sector into RAM this section, and transfers control to the initial instruction of the given bootloader code. The contents of the boot sector of the active partition, as a rule, depend on the operating system being loaded. Its task is to load the OS kernel into memory and transfer control to it.

Thus, to boot from an external USB drive, you need:

  • to Computer BIOS supported this type of loading
  • there was an MBR record on the media
  • there was an active partition with the operating system loader
  • The bootloader must be found and loaded necessary files operating system

From the above it follows that simply copying files of any OS to a flash drive (or other media) will not lead to the ability to boot this operating system from it, since when copying files, the MBR master boot record and the boot record of the active partition are not modified. Conversely, if there is an MBR and a partition bootloader, it is possible to replace the bootable system files. For example, if you have a bootable flash drive with Windows XP, you can completely remove all its files from the partition and replace them with others of the same operating system. The ability to boot from such a flash drive will remain.

Creating a USB disk based on a bootable CD/DVD or its ISO image.

Doesn't exist today universal program to quickly and easily create a bootable USB drive. But there are a considerable number of different software products, including those not directly intended to solve this problem, and yet, allowing, with skillful use, to solve it. The most common case is when you have a CD or its ISO image and you need to create your own based on it. bootable USB flash drive. An ISO file is a CD data image or DVD disc, based on international standard ISO-9660. The image file contains an exact copy of the physical CD: data, file system information, directory structure, file attributes and, importantly - boot information. When creating an ISO image, every bit of the CD/DVD is copied according to the original media. The ISO format is the most common CD image format, so there are a huge number of programs that allow you to get from existing disk its ISO image.

There are also software products that allow you to edit images and create downloadable media based on it. One of the most popular programs for creating bootable media is from EZB Systems Inc. The program is paid, however, the unregistered version allows you to work with files up to 300 MB, and can emulate a virtual CD of up to 600 MB.

For example, using UltraISO, we will create a bootable flash drive based on the ERD Commander 2008 boot CD.

First you need to create an ISO image, for which in the main program menu select the Tools tab and the Create CD image item. Then select the drive with the boot CD, and also specify the name and path of the ISO image file.

After pressing the button "Do" The creation of an ISO image from the existing CD will begin. The progress of the process is displayed by the program.

After completing the creation of the image, the program will offer to open its contents.

In this case, since there is no need to work with the contents of the ISO image, you can answer "No" and go to next step- creating a bootable USB flash drive with ERD Commander 2008 based on the disk image.

Select the Bootstrap tab and Write Disk Image.

Disk Drive- select the USB disk on which you want to burn the ISO image.
In field Image file The name and path of the ISO image file is displayed. This field cannot be changed in this context. Its value is set to the selected (open) ISO file. If you need to select another image file, this is done through the main program menu File - Open - image file name.
Recording method - need to select USB HDD or USB HDD+.

At the bottom of the window, click the button "Format" and set the parameters for formatting the removable disk.

After formatting is complete, close its window and press the button "Record". The program displays a warning that all data on the disk will be destroyed and requires confirmation to continue working.

After clicking "Yes" The process of writing the image to the removable disk begins. The progress of the process is displayed as a protocol at the top of the main window.

After the recording operation is completed, the button becomes active "Back" and when you click it, the image recording window closes. This technique allows you to easily create bootable USB emergency recovery disks from images ERD versions 6.0 and 6.5 of the kit Microsoft Diagnostic And Recovery Toolset(MS DART). However, an attempt to create a bootable USB flash drive from the image ERD Commander 2005/2008 or ERD version 5.0 ended in failure. The disk was created successfully, but an attempt to boot from it ended with the following message being displayed on the display screen: "Start booting from USB device: Remove disk or other media. Press any key to restart".

ERD 6.X images are created on Windows based Preinstallation Environment (WinPE) version 2.0 and older. WinPE is a truncated Windows version XP, which can be downloaded without installation to a hard drive, but using a CD/DVD drive or external USB drive. Version 2.x and older uses a Windows Vista/Windows 7 style boot loader. Previous versions- bootloader in Windows NT/2000/XP style. Let me remind you that when writing an ISO image to a flash drive, the UltraISO program displayed a log of its work, which included an entry about the type of boot sector of the partition. In the example given, this is the line - Boot Sector: WinNT. This means that the partition's boot sector was used to boot Windows NT/2K/XP.

System boot process from hard drive in this case it happens as follows:

  • the MBR is read and the address of the active partition is determined
  • the boot sector(s) of the active partition is read and control is transferred to it
  • searching and loading is performed, transferring control to the system boot loader file

The mechanism for booting WinNT/2K/XP using a hard disk is the same - the boot loader file is searched in the root partition of the disk ntldr, is loaded into memory and control is transferred to it. Next, the bootloader code searches and downloads the necessary Widows files. In the case of Windows PE on a CD, the CD boot sector code (bootsect.bin file) is used instead of the boot loader file ntldr file is used setupldr.bin from catalog I386. Moreover, the file setupldr.bin completely functionally identical to the file ntldr. A simple solution suggests itself - delete the file from the root of the flash drive bootsect.bin and copy the file from the I386 directory setupldr.bin to its root under the name ntldr. The boot sector code of the active partition must detect the boot loader file ntldr in the root of the flash drive and transfer control to it.

When I tried to boot in this version, the situation changed. The download has started and a message appears Setup is inspecting your computer's hardware configuration:
And after a few seconds NTDETECT failed. That's right setupldr.bin as a bootloader ntldr in the root of the flash drive, it worked, but the file was not found NTDETECT, which is quite expected, since the loading mechanism is in the style WinNT assumes that in addition to the file ntldr there must be a file in the root partition of the disk ntdetect.com

This file is also located in the directory I386 flash drives. There is a pattern that when using setupldr.bin as ntldr, all files needed to load and initialize the kernel must be in the root directory of the disk, not in the directory I386. After copying them to the root partition of the removable disk, the download ended with the message File \minint\system32\biosinfo.inf could not be Loaded. File is missing \minint\system32\biosinfo.inf. However, the catalog minint not on the flash drive, but there is I386, in which the required file is located. This suggests that instead of the system directory name I386 name used minint.
Actually, it would be possible to figure out the structure of the records in the file txtsetup.sif and change the path to system files, but there is a simpler and more universal way. Let's try to rename the directory and try to boot from the flash drive again. Everything works great! Booting from an external USB drive ERD Commander 2005/2008/ERD5.0 is performed without any problems, much faster, and there is a great opportunity to remake the resulting bootable ERD flash drive to suit your preferences.

Creating a bootable ERD flash drive without using an ISO image

Understanding the boot mechanism allows you to solve most problems “manually” without searching for and installing additional software. For example, if you need to replace the version of ERD Commander on the received flash drive, you can do this without using any software. The master boot record MBR and the boot sector code of the active partition are already present on this flash drive. Therefore, it is enough to simply remove all files and directories of one version of ERDC from it and “slip” the necessary ones from another. Naturally, you cannot use formatting, namely delete old files and folders and copy new ones in their place. To create bootable removable USB drives, you can do without using CD image burning.

The previous problem can be solved without using the UltraISO program. To obtain the MBR and boot sector of a partition on a flash drive, you can use, for example, a simple and free program PeToUSB(about 100kb in archived form), which allows you to format USB drives and record boot sectors. The program does not require installation and is very easy to use.

The boot mechanism and general structure of the boot disk.

    When you turn on the computer's power, a general hardware reset is performed and control is transferred to a special program flashed in the BIOS read-only memory (ROM), called the Basic Input/Output System.
The main purpose of the BIOS is to check the functionality of the computer hardware, reset and initialize the main controllers, and perform the initial boot of the operating system. Equipment testing is performed by a self-testing routine (POST - Power On Self Test). POST runs a group of tests that check the performance of the processor, memory, main chipset controllers, as well as some peripheral devices necessary to perform the initial boot (disks, keyboard, video adapter, etc.) If errors are detected during the POST process that prevent the boot from being completed - a shutdown is performed and a special sound signal is issued, allowing the identification of faulty equipment. POST error codes are not standardized and are determined by the BIOS version. If the testing was successful, on almost all BIOS versions a single short sound signal (“short beep”) is issued and the operating system boot procedure begins.
To perform the initial boot, in general, the BIOS routine must read a program designed in a certain way from external media into RAM and transfer control to it.
To boot from an external USB drive, the BIOS boot routine must be able to detect a boot device that contains a special entry in its first sector Master Boot Record or MBR. By default, the MBR is located in the first sector of the boot disk and occupies 512 bytes (standard sector length). This is not a prerequisite - the MBR can occupy more than one sector, which depends on the specific type of bootloader. Although the MBR entry is not strictly dependent on the platform of the OS being booted, it is different for DOS, file systems Windows and Linux.
A mandatory sign of the presence of an MBR record in the first (sometimes called zero) sector of the disk is a special code (signature) in the last two bytes - 55AA. The presence of a signature is checked by the BIOS routine first, and if it is absent, the disk is considered non-bootable, even if all other bootable conditions are met. Many hard drive programs allow you to view and edit data from selected sectors. This is, for example, what an MBR record looks like when viewed using the free version of Victoria for Widows

Strictly speaking, the presence of a signature is not so much a sign of the presence of an MBR as a sign of the presence of any partitions on the disk. If you change, for example, using a disk editor, the sector signature, then both the BIOS and the operating system will consider such a disk to be “unformatted”.

    Before the signature (at offset 0x1BE relative to the beginning of the sector) there is a Partition Table, consisting of 4 elements of 16 bytes each, which determines the maximum number (no more than 4) of partitions on the hard drive. Each element describes the type of partition (00h - partition of unspecified type, simply free space, 01h - 12-bit FAT, 05h - extended partition, 07h - NTFS, etc.), a sign of activity (boot capability) - code 80h, start address , end address, offset relative to the MBR, and number of partition blocks. Simplified, the MBR structure can be represented as follows:

Program code and data. (446 bytes)
- disk partition table (4 fields of 16 bytes - 64 bytes)
- signature 55AA (2 bytes)

The boot program looks for the active partition, reads data from the first sector of this partition into RAM, and transfers control to the initial instruction of the boot loader code. The contents of the boot sector of the active partition, as a rule, depend on the operating system being loaded. Its task is to load the OS kernel into memory and transfer control to it.

Thus, to boot from an external USB drive, you need:

For your computer's BIOS to support this type of boot,
- there was an MBR record on the media
- there was an active partition with a boot record (PBR - Partition Boot Record).
- The OS loader must take control and load the necessary operating system files.

    From the above it follows that simply copying files of any OS to a flash drive (or other media) will not lead to the ability to boot this operating system from it, since when copying files the MBR master boot record and the boot record of the active partition are not modified (PBR). Conversely, if you have an MBR and a PBR partition bootloader, it is possible to replace the bootable system files. For example, if you have a bootable flash drive with Windows XP, you can completely remove all its files from the partition and replace them with others of the same operating system. The ability to boot from such a flash drive will remain. In general, the boot scheme will be as follows - reading and executing the MBR code, loading the PBR code of the active partition, searching and loading the Windows boot loader file ntldr, which should be located in the root directory of the disk from which the initial boot was performed.

Create a bootable USB drive using its ISO image.

    Today, there are a considerable number of different software products, including those not directly intended to solve the problem of creating a bootable flash drive, and yet, allowing, with skillful use, to solve it. The easiest and fastest way to create a bootable USB drive is to use free program Rufus, the description of which is devoted to a separate article. The process of creating a bootable flash drive with ERD Commander is no different from the process of creating a bootable flash drive for Windows installations, the difference is only in the iso image files used.

    In this article we will consider the most common case when you have a CD or its ISO image and you need to create your own bootable flash drive based on it.

    An ISO file is a data image of a CD or DVD disc, based on the international standard ISO-9660. The image file contains an exact copy of the physical CD: - data, file system information, directory structure, file attributes and, importantly - boot information. When creating an ISO image, every bit of the CD/DVD is copied according to the original media. The ISO format is the most common CD image format, so there are a huge number of programs that allow you to obtain an ISO image from an existing disk. There are also software products that allow you to edit images and create downloadable media based on it. One of the most popular programs for creating bootable media is from EZB Systems Inc. The program is paid, however, the unregistered version allows you to work with files up to 300 MB, and can emulate a virtual CD of up to 600 MB.

    For example, let's create, using UltraISO, a bootable flash drive based on the ERD Commander 2008 boot CD.
First you need to create an ISO image, for which in the main program menu select the tab Tools and point Create CD image. Then select the drive with the boot CD, and also indicate the name and path of the ISO image file:

After pressing the button Do The creation of an ISO image from the existing CD will begin. The progress of the process is displayed by the program:

After completing the creation of the image, the program will offer to open its contents.

In this case, since there is no need to work with the contents of the ISO image, you can answer No and proceed to the next step - creating a bootable flash drive with ERD Commander 2008 based on the disk image.

and point Write Disk Image(Burn image to disk)

Disk Drive- select the USB disk on which you want to burn the ISO image
In field Image file The name and path of the ISO image file is displayed. This field cannot be changed in this context. Its value is determined by the selected (opened) ISO file. If you need to select another image file, this is done through the main program menu - File - Open- name of the image file.
Recording method - need to select USB HDD or USB HDD+.
At the bottom of the window, click the button Format and set the parameters for formatting the removable disk.

After formatting is complete, close its window and press the button Write down. The program displays a warning that all data on the disk will be destroyed and requires confirmation to continue working.

After clicking Yes The process of writing the image to the removable disk begins. The progress of the process is displayed as a protocol at the top of the main window.

After the recording operation is completed, the button becomes active Back and when you click it, the image recording window closes.

    This technique allows you to easily create bootable USB emergency system recovery disks from images ERD versions 6.0 and 6.5 of the kit Microsoft Diagnostic And Recovery Toolset(MS DART). However, an attempt to create a bootable flash drive from the image ERD Commander 2005/2008 or ERD version 5.0 ended in failure. The disk was created successfully, but an attempt to boot from it ended with the following message being displayed on the display screen:

Start booting from USB device:
Remove disk or other media.
Press any key to restart

    ERD 6.X images are created based on Windows Preinstallation Environment (WinPE) version 2.0 and older. WinPE is a truncated version of Windows XP that can be downloaded without installation to a hard drive, but using a CD/DVD drive or external USB drive. Version 2.x and older uses a Windows Vista/Windows 7 style bootloader. Previous versions use a Windows NT/2000/XP style bootloader.

Let me remind you that when writing an ISO image to a flash drive, the UltraISO program displayed a log of its work, which included an entry about the type of boot sector of the partition. In the example given, this is the line - Boot Sector: WinNT. This means that the partition's boot sector was used to boot Windows NT/2K/XP. The process of booting the system from the hard drive in this case occurs as follows:

- the boot sector(s) of the active partition is read and control is transferred to it.
- searching and loading is performed, transferring control to the system bootloader file.
The mechanism for booting WinNT/2K/XP using a hard disk is the same - the boot loader file is searched in the root partition of the disk ntldr, is loaded into memory and control is transferred to it. Next, the bootloader code searches and downloads the necessary Widows files.
In the case of Windows PE on a CD, the CD boot sector code (bootsect.bin file) is used instead of the boot loader file ntldr file is used setupldr.bin from catalog I386. Moreover, the setupldr.bin file is completely functionally identical to the ntldr file. A simple solution suggests itself - delete the bootsect.bin file from the root of the flash drive and copy the setupldr.bin file from the I386 directory to its root under the name ntldr.

The boot sector code of the active partition must detect the ntldr boot loader file in the root of the flash drive and transfer control to it.
When I tried to boot in this version, the situation changed. The download has started and a message appears

Setup is inspecting your computer's hardware configuration:
And after a few seconds
NTDETECT failed

That's right, setupldr.bin as an ntldr loader in the root of the flash drive, it worked, but the file was not found NTDETECT, which is quite expected, since the WinNT-style boot mechanism assumes that in addition to the ntldr file, there must be a file in the root partition of the disk ntdetect.com

This file is also located in the directory I386 flash drives. There is a pattern that when using setupldr.bin as ntldr, all files needed to load and initialize the kernel must be in the root directory of the disk, not in the directory I386. After copying them to the root partition of the removable disk, the download ended with the message

File \minint\system32\biosinfo.inf could not be Loaded

File is missing \minint\system32\biosinfo.inf. However, the catalog minint not on the flash drive, but there is I386, in which the required file is located. This suggests that instead of the system directory name I386 name used minint.

Actually, it would be possible to figure out the structure of the records in the file txtsetup.sif and change the path to system files, but there is a simpler and more universal way.

Let's try to rename the directory and try to boot from the flash drive again. Everything works great! Booting from an external USB drive ERD Commander 2005/2008/ERD5.0 is performed without any problems, much faster, and there is a great opportunity to remake the resulting bootable ERD flash drive to suit your preferences.

Creating a bootable ERD flash drive without using an ISO image.

    Understanding the boot mechanism allows you to solve most problems “manually” without searching for and installing additional software. For example, if you need to replace the version of ERD Commander on the received flash drive, you can do this without using any software. The master boot record MBR and the boot sector code of the active partition are already present on this flash drive. Therefore, it is enough to simply remove all files and directories of one version of ERDC from it and “slip” the necessary ones from another.

Naturally, you cannot use formatting, namely delete old files and folders and copy new ones in their place.

    To create bootable removable USB drives, you can do without using CD image burning. The previous problem can be solved without using the UltraISO program. To obtain the MBR and boot sector of a partition on a flash drive, you can use, for example, a simple and free program that allows you to format USB drives and record boot sectors. The program does not require installation and is very easy to use.

After formatting is complete, we will have an empty flash drive with an MBR entry, an activity sign and a WinNT-style partition boot sector. To create a boot disk for ERD Commander, all you have to do is do the following:

Copy the contents of the ERD disk to a flash drive. If there is an ISO image of the disk, its contents can be extracted using, for example, WinRAR.
- copy files (biosinfo.inf, ntdetect.com, etc.) from the I386 folder to the root directory of the flash drive
- rename the setupldr.bin file in the root directory to ntldr
- rename the I386 directory to minint.

Creating a bootable flash drive for ERD Commander 6.0-7.0 standard using Windows 7

ERD Commander 6.0 and later uses a new download manager for downloading BOOTMGR. Same as bootloader file ntldr, file bootmgr is located in the root directory of the disk from which the boot is performed. The boot sector of the active partition has program code to search for it, read it, and launch it for execution. The boot configuration for the new dispatcher is stored in a special format, in the file BCD catalog \BOOT and represents the system storage of boot configuration (Boot Configuration Data). The configuration used for ERD Commander 6.0 (DaRT 6.0) and older already has the necessary entries for creating an image of a RAM disk in the computer memory and deploying an image of the bootable system (BCD configuration entries for the device and boot application). Relatively high versatility of the new download manager bootmgr allows, if configured correctly, to download and deploy Windows image PE (ERDC) regardless of what physical media it is executed from. In other words, to boot ERDC 6.0 (DaRT 6.0) and older, it is enough that the boot sector code can transfer control to the boot manager bootmgr and the flash drive would have an exact copy of the CD data:

File bootmgr in the root directory

Catalog BOOT with all its contents

Catalog sources where is the downloadable image file located? boot.wim

The disk also contains a directory EFI, which may be needed if the download manager is used to download operating systems based on system EFI partition(Extensible Firmware Interface)

Thus, to boot ERDC 6.0 and older, you need to have an active partition with a bootloader on the flash drive bootmgr. To record the code of boot sectors that provide boot switching to bootmgr you can use the utility utility bootsect.exe which is in the catalog boot, or can be taken from the kit installation disk Windows Vista and older.

To format a flash drive and set the active partition flag, you can use a standard command line utility diskpart. After launching the utility displays a prompt to enter commands:

DISKPART >

To get a list of disks you need to enter the command:

list disk

The list will display the disks present in the system. You need to determine which of them is a flash drive. This is usually visible in the column size(you need to take into account that the “Free” column does not display the free space on the disk, but the space available for creating a new partition, and you should not pay attention to it). Further operations on the selected disk will lead to the destruction of data, therefore, you need to be careful and not make a mistake when choosing.

select disk 3- select disk 3

After the disk selection command, all operations will be performed in relation to it. By command list disk the selected drive is displayed with the symbol * in the first column.

To clear the contents of the disk, use the command

After cleaning, you need to create a new primary partition on the flash drive with the command:

create partition primary

Select the created partition for subsequent commands:

select partition 1

Make it active:

Format it, for example, in the file system FAT32

format fs=fat32

After the message that formatting is complete, assign a free letter to the partition with the command:

And finish working with the program:

After this, you need to determine the drive letter using Explorer or, for example, "Disk Management" in the control panel (diskmgmt.msc). To create a boot sector in style bootmgr you need to run the command:

bootsect /nt60 X: where X: is the letter assigned to the flash drive.

At successful completion, a message will be displayed containing the line:

Bootcode was successfully updated on all targeted volumes.

After these operations, the flash drive is ready to load the boot manager file bootmgr All that remains is to copy the contents of the ERD Commander CD and download. In a similar way, you can create a bootable flash drive for any software product based on Windows PE2 with boot manager bootmgr(flash drive based on the system installation disk, emergency recovery disk, etc.)

When using this technique, you need to consider the following points:

If the flash drive already has an active partition, then the utility diskpart, as a rule, is not needed.

Executing a command bootsect does not affect the data on the disk and can be executed at any time. To overwrite the master boot record (MBR) code, you can use the command - bootsect /mbr /nt60 X:

To restore boot style ntldr key is used /nt52

Creating a multiboot flash drive with ERD versions 5.0, 6.0, 6.5. 7.0

    When booting from any media, instead of the boot loader code of a specific system, in principle, any program code that can be found and initialized by the boot loader can be loaded. In turn, this code can transfer control to other bootloaders of other operating systems. In other words, in multiboot products, instead of loading a specific OS, the boot is first performed special program - download manager(or Boot Manager), with which you select required system and control is transferred to its loader.

The download process schematically looks like this:

The MBR is read and the address of the active partition is determined.
- the boot sector(s) of the active partition is read and control is transferred to it. Enables launch of the download manager
- the download manager displays a list possible options downloads, searches for and downloads the selected system.

    One of the most versatile tools for creating multiboot media is GRUB- GRand Unified Bootloader is the most popular bootloader in the Linux/Unix environment, which has become a kind of standard for a successfully implemented, highly customizable, and efficient bootloader. In addition to the ability to transfer parameters to the booted system, GRUB can transfer control along a chain to another bootloader, which allows it to boot Windows (via the ntldr bootloader) and almost any other system.

The GRUB project began development in the late 90s as part of the implementation of the Multiboot Specification, a specification that provides a universal way to boot the kernels of any operating system. Based on GRUB, the GRUB4DOS package was developed - a universal bootloader controlled in command line mode or using a configuration file. The GRUB4DOS boot loader can be used as the main system boot loader on both Linux and Windows. When installed in MBR, the file grldr.mbr, included in the Grub4dos package, is written to the boot area of ​​the boot device (HDD, floppy, USB Flash drive). Main file in the root of the device grldr, similar to bootloader ntldr loaded from the MBR using the grldr.mbr code.
When Grub4dos boots from the MBR, it scans all supported devices with all supported file systems for the grldr file, and if it is found, it loads it into RAM and then transfers control to it. The grldr boot loader code searches for its configuration file menu.lst, and if such a file is not found, then it is activated command mode. The grldr and menu.lst files can be located not only in the root of the active partition along with the MBR, but also on any others.

If the grldr boot loader is installed as a partition's boot sector, then it must be found and loaded by MBR code. In any case, the initial stage of the bootloader is to search for the menu.lst configuration file. If there are several menu.lst files (on different drives), the first menu.lst loaded will be the file on the boot device. If the file is found on one of hard drives, then files on removable media are ignored.

One of the features of the grldr bootloader is the ability to boot operating systems directly from an ISO image file. Therefore, creating a bootable disk with multiple ERDC ISO files becomes a fairly easy task.

The procedure for creating a multiboot USB disk can be divided into the following steps:

Formatting the flash drive and installing the grldr.bin bootloader code into the MBR sector and installing the active partition bootloader code for GRUB.
- Copy the grldr file to the root of the flash drive.
- Copying iso image files of bootable operating systems.
- Customizing the bootloader menu using commands written to the menu.lst file.

As an example, I chose the option USB creation flash drives with 3 different versions ERD Commander - 5.0, 6.0, 6.5, and accordingly, with 3 image files erd50.iso, erd60.iso, erd65.iso.

When working with GRUB, certain rules are used, ignoring which can lead to boot problems and even loss of user data. In all cases of working with software bootloaders, especially in the Windows OS environment, must be careful and present the result of the actions performed. If you are not confident in your knowledge and operating skills, do not perform such actions with connected disks with important data, or at least make copies of boot sectors, file location tables, or complete copies of the HDD.

When working with the Grub4Dos bootloader, observe the case of characters - lowercase and capital letters for him these are different symbols. The naming of devices also differs from that adopted for Linux and Windows. Device names used by GRUB:

Fd - floppy disk, floppy disk drive
cd - compact disk - compact disc drive
hd - hard disk - hard drive magnetic disks

The numbering of disks and partitions starts from zero. Entries about devices and partitions are enclosed in parentheses. Yes, record (hd0) means first hard drive, entry (hd0.0) means first partition on first hard drive. The disk numbering corresponds to their numbering in the BIOS. Typically, with a standard setup, Primary Master Disk corresponds to hd0, Primary Slave - hd1, etc. If the boot device order is changed in the BIOS, the disk naming also changes. In particular, when setting the boot mode from a flash drive, it will be named hd0, and the first hard drive will be named hd1. This fact is often missed when creating multiboot disks, resulting in non-working bootloader menu items due to incorrect numbering of boot devices.

The GRUB boot loader supports command line and allows you to execute about fifty built-in commands, much like Unix/Linux console commands. To enter GRUB debug mode, press the key INSERT at the very beginning of the bootloader. IN this mode, messages will appear on the display screen indicating the progress of the download. To enter the GRUB command line, use the keystroke C at the very beginning of the bootloader. A prompt to enter commands will appear on the screen.

A list of bootloader commands can be obtained by pressing a key TAB(list without any additional information) or by command

A hint for a specific command can be obtained using

help team name
help find- command hint find

Examples of commands for checking the numbering of disks and partitions

find /menu.lst- display a list of sections containing the menu.lst file
find /boot.ini- display a list of partitions containing the boot.ini file, usually used to check the name of the Windows partition (instead of boot.ini, you can search for the ntldr bootloader file itself).

If there is a menu.lst file, the commands for the bootloader are taken from it. Menu.lst lines starting with character # , are not processed and are used as comments. To create a simple multiboot ERD disk, you only need a few commands.

Step-by-step method for creating a multiboot flash drive with ERD 5.0, ERD 6.0, ERD 6.5

I have collected all the programs that may be needed for work in a small zip archive. No installation required.

1. Formatting and setting boot sector codes.

To format a flash drive, use the utility USB Disk Storage Format.(HP USB Disk Storage Format Tool) - hpusbfw.exe. Attempts to use standard formatting in a Windows environment usually result in boot sector codes not being installed, so it is better to use this utility. After launching in the main program window you need select a flash drive to format .

Be careful, as the disk for formatting you need to select exactly the flash drive that will be used as a multiboot one. The file system can be selected FAT32 or NTFS. Check the box for Quick Format. After formatting is completed, a window with the results will be displayed

To install boot sector codes (MBR master boot record and PB partition boot sector code), you can use either the console version (grubinst.exe) or the graphical version (grubinst_gui.exe) of the GRUB installer. The GUI version is simpler and less likely to cause errors.

Be careful when choosing a disk! The Grub4Dos installer uses the GRUB disk naming convention. Therefore, the selected disk cannot under any circumstances be (hd0)(this is the boot disk of your system) and its volume should be approximately equal to what the flash drive formatting program produced. After selecting the disk, press Install Once the installation is complete, you will receive a message about the results:

Click ENTER and close the installer.

In case the installation of boot sectors fails and is accompanied by a message Should be a disk image, check the box Floppy image in the "Options" section and click the button again Install

2. Copying the necessary files and setting up the menu.

Now all that remains is to copy the bootloader to the flash drive grldr, menu file and .iso image files. For ease of use, I collected all this in an archive, .
After unzipping, you need to write all the files to the flash drive.
For those who already have ERD iso image files, you can copy them to a flash drive (observing the image names - erd50.iso, erd60.iso, erd65.iso) and add the following files from the previous archive:

Grldr is a bootloader.
menu.lst - bootloader menu file
erdall - graphical menu shell.

The multiboot flash drive is ready. You can boot.
Please note that unpacking the images takes some time and the screen may remain blank after selecting a menu item. Depending on the size of the ISO image file, the speed of the flash drive, and the system as a whole, this can last from several seconds to several minutes.

The composition of the image files and the contents of the bootloader menu file can be changed according to your wishes.

Contents of the menu.lst file:

default 0
gfxmenu /erdall
root(hd0,0)

Title ERD Commander 5.0 for Windows XP / Windows 2003
map --mem /erd50.iso (0xff)
map --hook
chainloader (0xff)
boot

Title ERD Commander 6.0 for Windows Vista / Windows 2008
map --mem /erd60.iso (0xff)
map --hook
chainloader (0xff)
boot

Title ERD Commander 6.5 for Windows 7 / Windows 2008 RC2
map --mem /erd65.iso (0xff)
map --hook
chainloader (0xff)
boot


Explanations of the GRUB commands used in the file:

default 0- select the first menu item by default (default 1 - second, etc.)

gfxmenu /erdall- use the erdall file as the graphic style of the menu

root(hd0,0)- the first partition of the first disk will be used as the root partition, i.e. the first section of the flash drive from which the boot was performed.

title ERD Commander 5.0 for Windows XP / Windows 2003 - This is a boot menu item. The sequence of commands in each item specified title is the same, only the names of the items and the names of the image files differ.

map --mem /erd50.iso (0xff) Team map in this case it is used to emulate a CD in RAM (parameter --mem from image file erd50.iso to download device 0xFF. Team map used for booting from images and for replacing disks when, for example, it is necessary to boot Windows from the GRUB menu of a bootable flash drive. In this case, if you do not swap the drive, the boot will end with a message that the hal.dll file was not found, due to the fact that the Windows boot loader could not find the system directory, which should have been on (hd0). System location data contained in the boot.ini file, bootloader ntldr Windows will look for (hd0), which will be your flash drive. Therefore, to ensure normal loading of Windows installed on a hard drive, disk mapping is usually done so that the disk with Windows becomes (hd0)

map-hook- perform mapping immediately. Map commands are not executed immediately, but are queued for execution. To undo changes to disk device emulation, use map -unhook

Parameter --mem not required, but recommended. If it is absent, the boot will be performed without mapping the image into RAM, and will look the same as booting from a CD. However, GRUB has an important limitation when creating a virtual device from a disk image without mapping it into memory - the image file must be contiguous (not fragmented). This condition is usually met when CD/DVD is used as the storage medium. If you use a flash drive, when you delete and add individual files, it is quite possible that the image file may turn out to consist of several fragments and the download will end with an error message:

File for drive emulation must be in one contiguous disk area(The disk emulation file must be contiguous.)

In this case, you need to either defragment the file, for example, using the utility contig, or use image emulation in RAM, which does not require placing the file in the form of a single fragment. You just need to take into account that the computer’s RAM must be sufficient to accommodate the image file. Typically, small-sized images are used with the -mem parameter, and direct mapping is used for files whose size does not allow them to be fully read into the computer's RAM. The pause, in the form of a blank screen, during the loading of large images and the use of mapping into memory, is caused by the relatively long time it takes to read data from the flash drive into RAM when emulating a boot device.

chainloader (0xff)- GRUB will use the device obtained during mapping 0xff as a boot device.

boot- execute the loading procedure prepared by the previous commands.

    As an additional menu item, you can add the ability to boot Windows installed on your hard drive.

title Boot from first Hard Disk
map (hd1,0) (hd0,0)
map-hook
chainloader (hd0.0)+1
boot

The commands used in this paragraph are slightly different from those discussed above. As already noted, to boot Windows, the boot device must be the first hard drive (hd0). Team map (hd1,0) (hd0,0) assigns a match to the first partition of the first disk (hd0,0) to the first partition of the second disk (hd1,0), i.e. Instead of the flash drive from which the initial boot was performed, the hard drive will become the device (hd0). Team chainloader (hd0.0)+1 means that the first sector (+1) from the first partition of the first disk will be loaded.

    In conclusion, I will add that this technique allows you to create your own edition of the resuscitation flash drive, for example, by adding the ability to download Acronis products, Alkid CD, Ruslive CD assemblies, etc.

    For modern computers, which do not have floppy disk drives, the ability to boot from a floppy disk can also be implemented by loading the image using GRUB. As an example, let's consider the possibility of downloading images from popular programs for testing hard drives MHDD and Victoria. You can download the archive with prepared images from the link:

The archive contains 2 files - images mhdd.ima and vcr352.ima. They need to be copied to a flash drive and menu.lst add lines:

title Victoria for DOS ver 3.52
map --mem /vcr352.ima (fd0)
map-hook
chainloader(fd0)+1
rootnoverify(fd0)
map --floppies=1
boot

Title MHDD ver 4.60
map --mem /mhdd.ima (fd0)
map-hook
chainloader(fd0)+1
root(fd0)
map --floppies=1
boot

In this case, floppy disk emulation will be used (device (fd0) with mapping into memory from boot floppy image files vcr352.ima for Victoria and mhdd.ima for MHDD. Brief explanation of the commands:

chainloader(fd0)+1 specifies that the boot will be performed from the first sector of the first floppy disk.
root or rootnoverify set for bootloader grldr emulated drive as the root drive. rootnoverify used in cases where you need to indicate to the bootloader that the root disk does not need to be mounted. Typically used for standard file systems root .
map --floppies=1- tells the grldr bootloader that only one emulated floppy drive will be used.

Sometimes it is useful to include in the bootloader menu additional commands

Go to command line:
title Command Line
commandline

To restart a computer:
title Reboot PC
reboot

Turn off computer:
title ShutDown PC
halt

In addition to this article:

A separate article about using virtualization technology to test bootable flash drives. Links to download free and convenient programs to simplify the process of creating, debugging and testing created bootable media.

In many ways, the boot procedure is similar to the option discussed here, but instead of an external multiboot USB drive, a PXE server with a bootloader is used grldr and others necessary to ensure loading by local network, files. Example of remote multiboot ERD Commander and Victoria.

Detailed instructions for creating multiboot flash drives using the free version of the Sardu program.

An example of using the free Rufus program to create a bootable flash drive with a Windows distribution.