wila
Leadership
Leadership

Some EFI questions

Jump to solution

Hi,

Fusion 7 Pro.

Got a tiny EFI VM to play with EFI and changed the boot order in the EFI setup like below:

pastedImage_2.png

Now I would expect to boot easily as I can choose the Shell from the setup and boot into it without any issue and play with it.

Guess my expectations are too high as it just skips the Shell.

pastedImage_3.png

Is that a bug or expected?

Another thing I noticed is that I cannot boot to USB. I have a USB stick connected to the VM, this stick has a EFI shell installed and on a physical machine it will just boot into it. Seems the EFI firmware isn't able to work with that. Now trying to move that to a CD image, which hopefully does work.

A USB stick however is much easier as I can write to that. Is it possible to work around that? (Guess I can format a virtual disk and use that, but it isn't very portable outside of virtual machines)

FWIW I choose "Debian 7.x" as guest OS (no reason it was a default) and I can now see the files on my CD image, but not boot from it, guess I got some more experimenting to do.

Thanks,

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
dariusd
Leadership
Leadership

Just to check: Did you have the USB device connected through to the VM when you ran "map -r"?  The screenshot above shows that you've connected a USB video camera to the VM, but the USB mass storage device is presently disconnected...

:smileygrin:

--

Darius

View solution in original post

0 Kudos
9 Replies
wila
Leadership
Leadership

Having a discussion with myself it seems.

Changed the guestOS from "debian 7" into "debian 7 x64" and now it boots straight into the shell (from my CD image).

w00t.

Would still appreciate answers on the question in regards to boot order of the "unsupported Shell" and how-to boot from USB - if that's possible at all.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
dariusd
Leadership
Leadership

Hi Wil,

We recently disabled the Shell in the default boot order... it was causing far too many complaints and issues because it is ... ahem ... not terribly informative and user-friendly.  It was just plain confusing to anyone who didn't know what it was.

If you want to enable the shell by default, you can add to your config:

   efi.shell.activeByDefault = "TRUE"

to get back the old behavior.  You can also select the EFI Shell manually from the main menu to launch it (without requiring any advance configuration).

It should be possible to boot from USB.  You might have to connect the device to the VM and then reset the VM before it appears on the menu.  (We have an open ticket requesting that we handle hot-added devices in the menu, but it's not yet done.)  If all else fails, boot to the EFI Shell, connect the USB device, run "map -r" to detect new devices, look for the USB device in the map list, and use the Shell to launch the bootloader -- i.e. "fs3:\EFI\BOOT\BOOTX64.EFI".

Hope that helps!

--

Darius

dariusd
Leadership
Leadership

Changed the guestOS from "debian 7" into "debian 7 x64" and now it boots straight into the shell (from my CD image).

This probably means that your CD image contains a 64-bit (X64) shell.  EFI comes in two different architectures, IA32 and X64.  EFI applications and bootloaders are built for one architecture or the other, generally, and will only run on EFI firmware of the appropriate architecture.  (The exception is Apple stuff, for which they use "Fat" or "Universal" EFI binaries to compile for both IA32 and X64.)  The "default" is to look in \EFI\BOOT\BOOTIA32.EFI or \EFI\BOOT\BOOTX64.EFI as appropriate for the firmware's architecture.

When a 64-bit guest OS is chosen, we automatically use 64-bit EFI firmware (X64 architecture), otherwise we use 32-bit (IA32) EFI firmware.  If you're not using the correct firmware architecture for the EFI application you're trying to launch, it won't run.  You can check by looking for the string "EFI ROM" in vmware.log.

Cheers,

--

Darius

0 Kudos
wila
Leadership
Leadership

Hi Darius, I'd figured you might answer this Smiley Happy

Ah disabled, I will try that efi.shell.activeByDefault setting to use the shell that way as it is faster to boot into a shell without attaching anything else. I can see that the shell might confuse people, but the network boot takes a long time before it has timed out, so people might not even wait long enough to see the main menu.

The USB device still doesn't show up here, not even after running map -r. I do use the same USB stick in a Windows VM without problems and have used it to boot into a shell on physical hardware.

Don't see the stick as a device show up in the shell. Not after a map -r, not even after running my own version of the shell (EDKII from 2014)

Tried all the blkN devices. There's only 1 fs device (fs0) and that's my virtual cdrom.

Hot adding to the menu would really be awesome.

I understand about the different versions of firmware, there are also arm versions and a few others that don't tell me much. I saw the IA32 error in the shell when trying to run efi apps from the cdrom and the penny dropped.

Great work, very interesting to play with.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
dariusd
Leadership
Leadership

After running "map -r", is there a blkN which has a Device Path corresponding to your USB device (with "Usb" in it somewhere)?  If so, EFI has found the USB device but is having trouble recognizing partitions or filesystems on it, and we need to investigate its partitioning and formatting.  If not, EFI is having trouble talking to the hardware, and we need to figure out why EFI doesn't like the device.

Thanks,

--

Darius

wila
Leadership
Leadership

Hi Darius,

There's no device with USB in there. I was wondering about that.

pastedImage_2.png

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
dariusd
Leadership
Leadership

Just to check: Did you have the USB device connected through to the VM when you ran "map -r"?  The screenshot above shows that you've connected a USB video camera to the VM, but the USB mass storage device is presently disconnected...

:smileygrin:

--

Darius

View solution in original post

0 Kudos
wila
Leadership
Leadership

Very sharp, can't see how I missed that. Yes if I connect the USB storage then it works.

Was sure I did that before when I tested previously. Guess not then, will test with it some more.

thanks!

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
dariusd
Leadership
Leadership

Cool.  Let us know if you encounter any more problems.

I wouldn't jump to any conclusions about user error vs. software error... Keep an eye on the USB connections, and let us know if you spot any further surprises... It's always possible that we have some interesting bug lurking there.

(And FWIW, I always find the various icons utterly confusing... I had to dig around to figure out what the weird box-with-a-circle-in-the-middle icon actually was... I would never have guessed that it meant USB video camera.)

Cheers,

--

Darius

0 Kudos