Jump to content











Photo
- - - - -

Boot from UEFI ramdisk

ramdisk uefi

  • Please log in to reply
4 replies to this topic

#1 nimue

nimue
  • Members
  • 2 posts
  •  
    United States

Posted 01 November 2021 - 04:41 PM

Anyone knows if it is possible to boot Windows from a UEFI ramdisk?

An example for Linux is given here: https://www.intel.co...100f-820238.pdf (slide 35)

 

From an UEFI shell you create a disk in memory, load the files there from the web or maybe physical disk/drive. Then boot the ramdisk  from the efi shell. 

I'm not sure if each modern UEFI Bios has to support this command. At least you can't find too much on it online.

Anyone if it will work?


Edited by nimue, 01 November 2021 - 04:42 PM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 November 2021 - 07:18 PM

More or less you are describing ramdisk booting, which is something that is usually done via grub2, grub4dos/grub4UEFI, agfm, etc. on both BIOS and UEFI.

 

Then your image[1] (or whatever you load to the ramdisk[2]) needs to have (in the case of a Windows or similar) a suitable ramdisk driver installed, which right now is SVBUS (other drivers like WinVblock and Firadisk have issues with latest Windows versions).

 

But I am not sure to have understood what you are actually asking. i..e. whether you want to know about existing solutions to ramboot a windows or if the question is about not using any of the available tools. :unsure:

 

:duff:

Wonko

 

[1] usually a VHD image is used, as it is the same as a RAW or dd-like one,

[2] if you want to create a ramdisk and populate it with files, then you will need to create a volume and apply to it a filesystem to be able to copy files to it.


  • antonino61 likes this

#3 nimue

nimue
  • Members
  • 2 posts
  •  
    United States

Posted 02 November 2021 - 11:29 AM

I guess it is similar to what you can do with grub. But you can leave out the grub part (just use the efi shell) and I'm not sure if you would require an additional driver.

I didn't test it. The link just mentions fat32 so maybe it won't work with Windows+NTFS. But in case ntfs works would you need an additional driver? I guess the disk would just look like a normal ntfs disk to the OS, wouldn't it?

The question is not about the existing tools. It looks like they all use grub in some way. I was just wondering if anyone successfully used the UEFI-only ramdisk for booting Windows.



#4 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 02 November 2021 - 12:44 PM

VHD_WIMBOOT_Trusted-63  and  Win_Reduce_Trusted-45  and  SVBus_INST_Trusted-20  can be used

 

to make Mini-10x64.vhd booting in UEFI mode from RAMDISK where Windows 10/11 UsedSize is about 2 GB

 

Info: VHD_WIMBOOT.pdf


  • antonino61 likes this

#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 02 November 2021 - 01:35 PM

I guess it is similar to what you can do with grub. But you can leave out the grub part (just use the efi shell) and I'm not sure if you would require an additional driver.

I didn't test it. The link just mentions fat32 so maybe it won't work with Windows+NTFS. But in case ntfs works would you need an additional driver? I guess the disk would just look like a normal ntfs disk to the OS, wouldn't it?

The question is not about the existing tools. It looks like they all use grub in some way. I was just wondering if anyone successfully used the UEFI-only ramdisk for booting Windows.

No, this has nothing to do with the filesystem used by the ramdisk (though a filesystem on the ramdisk is needed to load files to it and of course the OS needs to be ale to access it).

 

The point is about the need of a ramdisk driver.

WIndows (recent versions) has not one built-in apart the one used for .wim's (in PE's).

 

Such a driver is needed for windows to "map" an extent of ram as a disk, otherwise it won't ever boot, simply because it cannot find the device, typically halting with a 0x0000007b BSOD.

 

This is independent from the way you load the data to the ramdisk. 

 

If you prefer, besides the way you "prepare" the ramdisk, the OS you copy there must be capable of booting from ramdisk.

 

And to boot from UEFi (or BIOS) you need a OS loader, the only os loader that can load (recent) windows is bootmgr.efi (or BOOTMGR on BIOS), so what any of the existing working tools do, one way or the other, is to:

1) prepare and/or map an image to and/or copy to the ramdisk the needed OS files

2) chainload the osloader on it (bootmgr.efi or BOOTMGR)

before and besides the above:

3) the os on the ramdisk must have installed/available a driver to map the ramdisk as volume

 

I don't see why (in theory) #1 and #2 should not be possible from EFI shell, though I am failing to see any particular advantage on not using an already tested and working solution, but #3 is a pre-requisite to boot a Windows from ramdisk.

 

Said the other way round, you'd better first have a working ram booting Windows, and then attempt to create a ramdisk and booting from it via EFI shell.

 

:duff:

Wonko







Also tagged with one or more of these keywords: ramdisk, uefi

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users