INITRD Basics
|
2019-07-18, 15:52
Post: #1
|
|||
|
|||
INITRD Basics
When using "initrd" to download a file, how is that file accessible in UEFI context?
I was expecting to see a new file system device created, but I find no new devices. For example. initrd http:/blahblah/disk_image.dsk kernel http:/blahblah/bootx64.efi /efi/boot/ At this point, UEFI is able to find and execute bootx64.efi (an OS loader), but how do I locate the prior initrd of disk_image.dsk? I expected to find a UEFI RAMdisk or new file system device created, but I am not seeing this. Obviously the file disk_image.dsk is in memory somewhere, but how does my OS loader find it? If not via memory address and size, then through what protocol? Is there a detailed description somewhere of what is actually happening when iPXE pulls images down? |
|||
2019-07-19, 06:12
Post: #2
|
|||
|
|||
RE: INITRD Basics
I would probably start reading the wimboot sources, which finds all loaded files
But the linux kernel for example receives an argument telling it which filenames to load, I think this is mentioned in the FAQ Use GitHub Discussions VRAM bin |
|||
2019-09-06, 20:05
Post: #3
|
|||
|
|||
RE: INITRD Basics
This turned out to be much simpler than it seemed. The downloaded file appeared not as a RAMdisk (hence, no new fs device) but as just a file in the default volume.
My mistake was thinking that because this was a disk image file, that an INITRD would create a UEFI disk. Nope... just a file. UEFI FileIo was able to access the file by name. Since what I was looking for was it's address in physical memory, but it was stored as a file, it was just a matter of reading the file size, allocating memory for it, and reading the file into the allocated memory. Pass the address and size through to the booting OS and it was able to mount the disk image as a RAMdisk. Problem solved. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)