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

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
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
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 23H2 (RP channel)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Gigabyte
    CPU
    AMD Ryzen 5900X 12-core
    Motherboard
    X570 Aorus Xtreme
    Memory
    64GB Corsair Platinum RGB 3600MHz CL16
    Graphics Card(s)
    MSI Suprim X 3080 Ti
    Sound Card
    Soundblaster AE-5 Plus
    Monitor(s) Displays
    ASUS TUF Gaming VG289Q
    Screen Resolution
    3840x2160
    Hard Drives
    Samsung 990 Pro 2TB
    Samsung 980 Pro 2TB
    Samsung 970 Evo Plus 1TB
    Samsung 870 Evo 4TB
    Samsung T7 Touch 1TB
    PSU
    Asus ROG Strix 1000W
    Case
    Corsair D750 Airflow
    Cooling
    Noctua NH-D15S
    Keyboard
    Asus ROG Flare
    Mouse
    Logitech G903 with PowerPlay charger
    Internet Speed
    500Mb/sec
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
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

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!
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
    Win11 Pro 23H2
    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
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
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

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
e4rr0o, It's always important to acknowledge and thank those who have helped you in online communities. One way to do this is by using the like button located at the bottom of each post. By clicking on the like button, you can show your appreciation and support for the helpful content that others have shared with you. This small gesture can go a long way in encouraging people to continue contributing and sharing their knowledge with you and others in the community.

So, please remember to use the like button to show your gratitude and support to those who have helped you along the way. It's important to note that a "like" gives 1 point, "Helpful" gives 5 points, and for exceptional help, "Great support" gives 10 points.

Latest Support Threads

Back
Top Bottom