Can we restore main boot menu in PE environment?Can bootable usb be added to main boot menu in PE environment? Answer is YES.


E

e4rr0o

Guest
I used 4 GB pen drive , format it as NTFS, Mark the partition as ACTIVE.
My pc has Five OS , 3 are of Windows 11, 1 OS of Windows 10, and 1OS of Windows 8.1 pro (all Pro versions)
I run CMD as administrator.
Changed to 4 GB pen drive letter..
c:\windiws\system32>T:
T:>bcdboot c:\windows>system32 /s T: /f ALL
I repeated above command four times again replacing c: with D:, E: , G:, H: one by one.
Boot files successfully added.(each time) Attaching Windows 11 bootable pendrive run Recovery.bat file available in www.tenforum.com Note down drive letter of Windows 11 bootable usb drive.
Type that letter when recovery.bat is run.
Now reboot pc, press any key to boot from 4GB pen drive , you will see the main boot menu with recovery option added. You can boot to any installed OS.
When recovery option is clicked, pc restars, here again press any key to boot from bootable USB pendrive. This time Windows 11 setup runs.
Change winload.efi to winload.exe depending upon MBR or GPT style.
 
Windows Build/Version
Windows 11 21H2 OS Build 22000.978

My Computer

cereberus

Well-known member
Pro User
VIP
Local time
4:58 PM
Posts
3,305
Visit site
OS
Windows 10 Pro + others in VHDs
I used 4 GB pen drive , format it as NTFS, Mark the partition as ACTIVE.
My pc has Five OS , 3 are of Windows 11, 1 OS of Windows 10, and 1OS of Windows 8.1 pro (all Pro versions)
I run CMD as administrator.
Changed to 4 GB pen drive letter..
c:\windiws\system32>T:
T:>bcdboot c:\windows>system32 /s T: /f ALL
I repeated above command four times again replacing c: with D:, E: , G:, H: one by one.
Boot files successfully added.(each time) Attaching Windows 11 bootable pendrive run Recovery.bat file available in www.tenforum.com Note down drive letter of Windows 11 bootable usb drive.
Type that letter when recovery.bat is run.
Now reboot pc, press any key to boot from 4GB pen drive , you will see the main boot menu with recovery option added. You can boot to any installed OS.
When recovery option is clicked, pc restars, here again press any key to boot from bootable USB pendrive. This time Windows 11 setup runs.
Change winload.efi to winload.exe depending upon MBR or GPT style.
Most pcs will not boot from an NTFS formatted usb flash drive.
Most require a fat32 formatted drive.

Also, you only really need to install onr OS, and you can do rest more easily from Windows. Problem in winpe mode drive letters may not be as you expect them to be in Windows.

Easybcd is a great tool for rebuilding a boot menu as it is easy to rename entries, reorder then etc.

Sure you can use bcd commands but when you have 7 boot entries (and some are winpe entries), it can get very tedious.


I find a much easier way of restoring boot menu is to boot from a Macrium Reglect USB flas drive and click 'fix windows boot problems" link, and then tidy up with easybcd.
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

jimbo45

Well-known member
Power User
VIP
Local time
4:58 PM
Posts
2,382
Location
Hafnarfjörður IS
Visit site
OS
Windows XP,7,10,11 Linux Arch Linux
Too much "Obfuscation here" by @Ramesh Sharma --- your method won't work on older PC's in any case as they can't boot from an NTFS partition as the previous poster has pointed out.

I have an external SSD drive which I can connect to a PC via a SATA-->USB connector and it shows "Classic" windows boot menu with WINPE as one of the options, Also on "Other options" I can boot Linux, or stand alone GPARTED (partition manager).

multios.png
whether one wants to boot macrium to fix boot problems or simply run the Windows command bcdboot.exe is really a moot point. If you need to boot from an external device into windows 11 you'll need a small fat32 efi partition, then the rest can be an NTFS partition. If you want more than one OS on it create as vhdx filles.

You can boot MBR into Windows 10 if your PC supports MBR (BIOS) booting but if you do it that way you have to go through all the kefuffle of getting to the machines internal BIOS menu. Much easier especially on a laptop to have default as bootable external device before HDD.

@cereberus you know this stuff so just ignore - was directing at the OP. It's of course much easier in general to fix problems from a full windows OS than from a winpe environment.

I also use this method to test install various builds of windows before trying "for real" on the main machine's internal Windows HDD. I also like to have Win 10 around just in case something on W10 works but breaks on W11 or has been removed from W11.

cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

BrianInEngland

Well-known member
Member
VIP
Local time
4:58 PM
Posts
850
Visit site
OS
Windows 11 Pro 22H2 (RP channel)
Most pcs will not boot from an NTFS formatted usb flash drive.
Most require a fat32 formatted drive.

Also, you only really need to install onr OS, and you can do rest more easily from Windows. Problem in winpe mode drive letters may not be as you expect them to be in Windows.

Easybcd is a great tool for rebuilding a boot menu as it is easy to rename entries, reorder then etc.

Sure you can use bcd commands but when you have 7 boot entries (and some are winpe entries), it can get very tedious.


I find a much easier way of restoring boot menu is to boot from a Macrium Reglect USB flas drive and click 'fix windows boot problems" link, and then tidy up with easybcd.
My PC will boot from an NTFS drive, in fact when I re-installed Windows 11 I extracted the ISO files to a partition on my SSD, formatted as NTFS. Booted and installed no problem, took less than 5 minutes
 

My Computer

System One

  • OS
    Windows 11 Pro 22H2 (RP channel)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Gigabyte
    CPU
    AMD Ryzen 5900X 12-core
    Motherboard
    X570 Aorus Xtreme
    Memory
    32GB Corsair Platinum RGB 3600MHz
    Graphics Card(s)
    MSI Suprim X 3080 Ti
    Sound Card
    Soundblaster AE-5 Plus
    Monitor(s) Displays
    ASUS TUF Gaming VG289
    Screen Resolution
    3840x2160
    Hard Drives
    Samsung 980 Pro 2TB
    Samsung 970 Pro Plus 1TB
    Samsung 970 Pro 1TB
    Samsung T7 Touch 1TB
    Samsung 870 Evo 2TB (on external USB connector)
    PSU
    Asus ROG Strix 1000W
    Case
    Corsair D750 Airflow
    Cooling
    Noctua NH-D15S
    Keyboard
    Logitech G810
    Mouse
    Logitech G903 with PowerPlay charger
    Internet Speed
    500Mb/sec
    Browser
    Microsoft Edge
E

e4rr0o

Guest
Thread Starter
FAT 32 formatted pen drive works as well as NTFS formatted pen drive.
In my post please read the command as T:>bcdboot c\windows /s T: /f ALL
 

My Computer

NavyLCDR

Well-known member
Power User
VIP
Local time
8:58 AM
Posts
1,295
Visit site
OS
Windows 11
Most pcs will not boot from an NTFS formatted usb flash drive.
Most require a fat32 formatted drive.
That is not true at all. If you had stated that most PC's will not boot in UEFI mode from NTFS, that would be correct. However, legacy booting (non-uefi) has always been able to boot from NTFS for decades.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    Homebuilt
    CPU
    AMD Ryzen 7 3800XT
    Motherboard
    ASUS ROG Crosshair VII Hero (WiFi)
    Memory
    32GB
    Graphics Card(s)
    EVGA GeForce GTX 1080 Ti
  • Operating System
    Windows 11 Education
    Computer type
    Laptop
    Manufacturer/Model
    Dell Inspiron 7773
    CPU
    Intel i7-8550U
    Memory
    32GB
    Graphics card(s)
    Nvidia Geforce MX150
    Sound Card
    Realtek
    Monitor(s) Displays
    17"
    Screen Resolution
    1920 x 1080
    Hard Drives
    Toshiba 512GB NVMe SSD
    SK Hynix 512GB SATA SSD
    Internet Speed
    Fast!

hsehestedt

Well-known member
Power User
VIP
Local time
10:58 AM
Posts
1,336
Location
Texas, USA
Visit site
OS
Windows 11 Pro 22H2
Ramesh, I think that I have a procedure all worked out that does what you want, but I need to make sure that I properly understand what you want to do.

Is your goal to be able to boot the image of any one of several OSes from the pendrive?

What I can provide to you: My procedure creates a pendrive with 2 partitions. The first partition is a small FAT32 partition guaranteeing that it will boot on any system. On the second partition you can put an unlimited number of ISO images. At this point, you can run a batch file on the pendrive and it will make any ISO image on the pendrive bootable, showing a menu of available images you can select from.

If you have no access to a system where you have Windows, an added benefit is that the pendrive is already bootable so you can boot it and then select the ISO image you want to make bootable. It will reconfig the pendrive and make your selected image bootable so the next time you boot it will boot the image you selected. When done, you run another batch file and it reverts to the original configuration, all ready to go again.

As an example, I have my pendrive set to allow booting of any of the following:

Windows 10 21H2 (original release)
Windows 10 21H2 with latest updates
Windows 10 21H2 sysprep customized
Windows 11 21H2 (original release)
Windows 11 21H2 with latest updates
Windows 11 21H2 sysprep customized
Windows 11 22H2 (original release)
Windows 11 22H2 with latest updates
Windows 11 22H2 sysprep customized
Windows 11 22H2 with drivers for my desktop preinstalled
Windows 11 22H2 with drivers for my laptop preinstalled
Macrium Reflect Recovery Disk
Veritas System Recovery Boot Disk

If this sounds at all like what you want to accomplish, let me know.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Chromium Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Dual Boot Windows 11 Pro 22H2 and Windows 10 Pro 22H2
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 15-BL012DX
    CPU
    Intel i7-7500U
    Memory
    32GB
    Graphics card(s)
    Dual Intel HD 620 and Nvidia GeForce 940MX
    Sound Card
    Built-in Realtek HD Audio
    Monitor(s) Displays
    4k 15-inch
    Screen Resolution
    4k (3840 x 2160)
    Hard Drives
    1TB Seagate FireCuda 510 NVMe SSD
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Chromium Edge
    Antivirus
    Windows Defender
    Other Info
    RAM Upgraded from 16GB to 32GB WiFi Upgraded from WiFi 5 to WiFi 6 SSD upgraded from 512GB NVMe SSD to 1TB Seagate FireCuda 510 NVMe SSD
E

e4rr0o

Guest
Thread Starter
Good Morning @hsehestedt .
Genius idea from you.
Thanks for considering me and my thread.I respect you Sir.
Exactly I wanted the same you got it.
A simple windows user should recover boot menu very easily to boot into selected windows os (installed on hard disk). Also one should be able to run Windows 11 bootable setup from this pen drive. One may have to press any key again on restart to run Windows 11 bootable USB. Please change winload.efi to winload.exe in recovery.bat file to boot if partition style is MBR.
Recovery option is to be run from pen drive after booting any Windows from this pen drive, otherwise Recovery option will be added to main menu of hard disk PE environment.
Sir, I request you to post bat file you have created.
My regards to everyone.
 

My Computer

cereberus

Well-known member
Pro User
VIP
Local time
4:58 PM
Posts
3,305
Visit site
OS
Windows 10 Pro + others in VHDs
That is not true at all. If you had stated that most PC's will not boot in UEFI mode from NTFS, that would be correct. However, legacy booting (non-uefi) has always been able to boot from NTFS for decades.
Sure but I have not used legacy bios for years, so was imprecise.
 

My Computer

System One

  • OS
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

Latest Support Threads

Top Bottom