
Multiboot, UEFI, NTFS or almost a recipe for happiness
The post was written based on the publication "Life-giving flash drive . "
Good day, Habr. Most recently, while reading Habr, I came across an article Life-giving flash drive , which described a way to create a multi-boot flash drive with a set of useful utilities, various systems, etc. And everything would be fine, and here and there the dog is buried - let's pay attention to this comment thread , which discusses the multi-boot functionality in systems with UEFI. Thus, I beganmy own investigation to look for a universal way to solve this problem.
We didn’t have to go far - since the time of the insanely popular build of Windows XP Zver Edition, its developers have used a set of utilities called RMPrepUSBto record the assembly to a USB drive. The assembly has faded from the memory of people, but the utility package project itself continues to develop and grow stronger. Well, the very foundation is the Easy2Boot project . Studying their site, I found a universal way to create a multi-boot flash drive that can contain any distribution kit, LiveCD or floppy disk images that you just want to add. So, let's start creating such a miracle flash drive.
We go to the site and download the last archive with Install_RMPrepUSB_Full in the name. Unpack and install.
Attention: for lovers of portability - you can open the installer in 7-zip (for example) and unzip it into a folder without installation.
Next, go to the Easy2Boot website and download the archive with E2B itself, unpack it to any folder on your PC.
We go into the folder with E2B and run the file _ISO \ docs \ Make_E2B_USB_Drive.cmd .
Attention: if you did not install, but unpacked RMPrepUSB, then at the first stage you will be asked to specify the path in the RMPrepUSB folder.
We will be asked to indicate the number of the drive from the above list, asked if we really want to format the drive and asked to select the FS.
And here is the attention!We select FAT32 - we boot into UEFI without problems, but there is no file support> 4 GB, and vice versa - NTFS without UEFI, but with support for large files. If your images weigh less than 4 GB each, then feel free to choose FAT32. NTFS is a bit more complicated, namely, a flash drive in UEFI will not load, but if you load it on a regular BIOS and then select an image for UEFI (see below), Easy2Boot will overwrite the MBR of the flash drive and it will boot into UEFI, provided that that image has its support (the presence of the files efi \ bootia32.efi and efi \ boot \ bootx64.efi )
We go along a difficult path - write N (that is, format it in NTFS), a confirmation window will pop up, click OK and wait. After formatting, the E2B files will be copied and the message “Press any key” will appear on a green background.
We go to the drive, we see the files and the _ISO folder . Briefly describe the structure (details are on the site ):
Next, run RMPrepUSB, select the drive in the list and press Ctrl + F2, agree and wait a couple of seconds. The program will play with files and you can boot from a flash drive.
Oh yes. That is what we are here for. To prepare the image for upload to UEFI, download the archive , unpack it. Install the file ImDisk \ imdiskinst.exe from the folder, and then drag the image file onto the MakePartImage_AutoRun_FAT32.cmd script in the main folder. This script converts the image into the .imgPTN format, when mounted, E2B will rewrite the MBR and mount the image as a FAT32 partition. You can read more here .
A working example - I threw different images on the drive, the structure is as follows:
We boot into the BIOS, select the desired UEFI image, switch the UEFI back and get a flash drive with one partition containing the files of this image. Accordingly, if this image supports downloading to UEFI, it will appear in the list of devices from which you can boot.
Attention! If you booted from images prepared for UEFI, then you will notice that the next time you boot from the drive there will be a boot menu from the same image. And where are all those that we sketched on a flash drive? Yes, and the files on the flash drive are not the same ... There are two options - from the bootloader, select the top item EASY2BOOT or in the OS, run the e2b \ RestoreE2B (run as admin) .cmd script from the flash drive .
And there were some minuses here - you have to switch to the BIOS in order to connect the desired image. But the functionality of this set of utilities closes all conceivable and inconceivable needs for a multiboot flash drive.
Foreword
Good day, Habr. Most recently, while reading Habr, I came across an article Life-giving flash drive , which described a way to create a multi-boot flash drive with a set of useful utilities, various systems, etc. And everything would be fine, and here and there the dog is buried - let's pay attention to this comment thread , which discusses the multi-boot functionality in systems with UEFI. Thus, I began
We didn’t have to go far - since the time of the insanely popular build of Windows XP Zver Edition, its developers have used a set of utilities called RMPrepUSBto record the assembly to a USB drive. The assembly has faded from the memory of people, but the utility package project itself continues to develop and grow stronger. Well, the very foundation is the Easy2Boot project . Studying their site, I found a universal way to create a multi-boot flash drive that can contain any distribution kit, LiveCD or floppy disk images that you just want to add. So, let's start creating such a miracle flash drive.
Getting started
We go to the site and download the last archive with Install_RMPrepUSB_Full in the name. Unpack and install.
Attention: for lovers of portability - you can open the installer in 7-zip (for example) and unzip it into a folder without installation.
Next, go to the Easy2Boot website and download the archive with E2B itself, unpack it to any folder on your PC.
Flash drive preparation
We go into the folder with E2B and run the file _ISO \ docs \ Make_E2B_USB_Drive.cmd .
Attention: if you did not install, but unpacked RMPrepUSB, then at the first stage you will be asked to specify the path in the RMPrepUSB folder.
We will be asked to indicate the number of the drive from the above list, asked if we really want to format the drive and asked to select the FS.
And here is the attention!We select FAT32 - we boot into UEFI without problems, but there is no file support> 4 GB, and vice versa - NTFS without UEFI, but with support for large files. If your images weigh less than 4 GB each, then feel free to choose FAT32. NTFS is a bit more complicated, namely, a flash drive in UEFI will not load, but if you load it on a regular BIOS and then select an image for UEFI (see below), Easy2Boot will overwrite the MBR of the flash drive and it will boot into UEFI, provided that that image has its support (the presence of the files efi \ bootia32.efi and efi \ boot \ bootx64.efi )
We go along a difficult path - write N (that is, format it in NTFS), a confirmation window will pop up, click OK and wait. After formatting, the E2B files will be copied and the message “Press any key” will appear on a green background.
Screenshots



Folder structure or where to put the images?
We go to the drive, we see the files and the _ISO folder . Briefly describe the structure (details are on the site ):
- ANTIVIRUS - upload images of anti-virus LIveCD (Kaspersky, Dr.Web and others like them)
- AUTO - we throw any image into a subfolder with the desired name (for example, along the path Ubuntu \ My_Ubuntu_Distro.iso)
- LINUX - respectively, any Lunk image is thrown into this folder.
- MAINMENU - drop the image into this folder and it will appear in the main menu of Grub4DOS at boot (not in the submenu, more on that later)
- UTILITIES - images of floppy disks we throw here
- UTILITIES_MEMTEST - the same thing, but, alas, I can’t say more precisely
- WIN - here we will add the images prepared for upload to UEFI. More about that later
- WINDOWS - by the structure of the subfolders, it is easy to understand that for each Windows family you need to put the image in the corresponding subfolder.
Next, run RMPrepUSB, select the drive in the list and press Ctrl + F2, agree and wait a couple of seconds. The program will play with files and you can boot from a flash drive.
Wait, what about UEFI?
Oh yes. That is what we are here for. To prepare the image for upload to UEFI, download the archive , unpack it. Install the file ImDisk \ imdiskinst.exe from the folder, and then drag the image file onto the MakePartImage_AutoRun_FAT32.cmd script in the main folder. This script converts the image into the .imgPTN format, when mounted, E2B will rewrite the MBR and mount the image as a FAT32 partition. You can read more here .
What does it all look like?
A working example - I threw different images on the drive, the structure is as follows:
- _ISO \ LINUX \ linuxmint-17-xfce-dvd-64bit.iso
- _ISO \ WIN \ ru-en_win7_sp1_x86-x64_18in1_activated_v2.imgPTN
- _ISO \ WIN \ Boot_USB_Sergei_Strelec_2014_v.6.9.imgPTN
- _ISO \ WIN \ ru_windows_8_1_pro_vl_x86_dvd_LITE_3.iso
Screenshots
Flash drive main menu

Linux submenu

Submenu with regular Windows ISO images

Submenu with images for UEFI

When loading an image for UEFI, we will be asked if we really want to rewrite the table with the flash partition? Hit Enter

And here is the bootloader of any image for UEFI. Instructions for returning to the main menu below.


Linux submenu

Submenu with regular Windows ISO images

Submenu with images for UEFI

When loading an image for UEFI, we will be asked if we really want to rewrite the table with the flash partition? Hit Enter

And here is the bootloader of any image for UEFI. Instructions for returning to the main menu below.

We boot into the BIOS, select the desired UEFI image, switch the UEFI back and get a flash drive with one partition containing the files of this image. Accordingly, if this image supports downloading to UEFI, it will appear in the list of devices from which you can boot.
Attention! If you booted from images prepared for UEFI, then you will notice that the next time you boot from the drive there will be a boot menu from the same image. And where are all those that we sketched on a flash drive? Yes, and the files on the flash drive are not the same ... There are two options - from the bootloader, select the top item EASY2BOOT or in the OS, run the e2b \ RestoreE2B (run as admin) .cmd script from the flash drive .
In the dry residue
And there were some minuses here - you have to switch to the BIOS in order to connect the desired image. But the functionality of this set of utilities closes all conceivable and inconceivable needs for a multiboot flash drive.
Information from the developers site
- www.easy2boot.com/faq-/how-e2b-works
- www.easy2boot.com/make-an-easy2boot-usb-drive
- www.easy2boot.com/add-payload-files
- www.easy2boot.com/add-payload-files/makepartimage
- www.easy2boot.com/add-payload-files/adding-uefi-images
- www.easy2boot.com/add-payload-files/adding-windows-install-isos-without-needing-a-helper-flash-drive