Page 6 of 6

Re: How to generally enter virtual 8086 mode?

Posted: Wed Apr 27, 2022 2:15 pm
by rdos
kzinti wrote:
rdos wrote: No, I don't. I boot with a USB floppy containing my OS and then on the command line I write "inithd /i / r 0", then I create a partition with mkpart, and copy the boot image to the root. That's pretty simple.
Both inithd and mkpart are tools...
Maybe. They are part of my command-line application. I can run it without tools too by building an application that loads at boot time from the USB disc and does the same actions without any user intervention. That's how we initiate new computers when installing our terminal software.
kzinti wrote: bootx64.efi is the bootloader... not sure why you need a second stage bootloader (load64.bin) but that's fine, it has nothing to do with UEFI.
It does have to do with UEFI. My OS image is not a linked PE executable, and so cannot be directly loaded neither by 32-bit nor by 64-bit UEFI. Rather, the OS image is built with a tool (or application) from a configuration file that writes a binary that combines a set of device-driver files, settings, application executables, preloaded files and autorun commands. The load64.bin and load32.bin files are executables that can be loaded by UEFI and that sets up an environment so the OS image can be started.
kzinti wrote: I don't know why you have this problem where you need to erase UEFI variables, I have never run into this or heard about it before now.
Typically, I won't have this problem when I reformat the disc (like in the example), only when I try to update an existing Windoows installation for multiboot. It's often easier to add my OS to GRUB, provided you know where the GRUB config file is and can change it. GRUB booting also needs a second stage loader, much for the same reason as UEFI does.

With MBR booting, there are ten or so sectors that have a similar function as the second stage loader. It will read the OS image to a fixed address and start it.

Re: How to generally enter virtual 8086 mode?

Posted: Wed Apr 27, 2022 2:16 pm
by rdos
Ethin wrote:Pretty sure the only reason your able to boot the floppy drive at all is because your doing it over USB. Get with the times and use this thing called a USB flash drive and you might find your life being a bit easier.
I meant an USB flash drive, not an USB floppy. :-)

Re: How to generally enter virtual 8086 mode?

Posted: Wed Apr 27, 2022 2:26 pm
by Ethin
I mean, maybe a USB floppy might work, but it'd need to be UAS compatible, I think. UEFI has tape boot support but I don't think anyone even uses that; I don't even think that there's code for that in EDK II other than the standards definitions...

Re: How to generally enter virtual 8086 mode?

Posted: Thu Apr 28, 2022 3:58 am
by Gigasoft
Don't remove existing boot variables. If you want to dual boot, just add another Boot#### variable containing an EFI_LOAD_OPTION structure that points to your OS.