SUSE Support

Here When You Need Us

VMware Guest Boots to Grub Prompt

This document (000021635) is provided subject to the disclaimer at the end of this document.

Environment

All versions


Situation

VMware guests using EFI may boot to a shell in the Grub2 bootloader. Often this is due to the layout of the attached storage being incompatible with the default settings of VMware's EFI implementation. The following are key details to identify this issue.

 

The filesystem containing /boot may be spread across two or more different virtual disks. The following are common actions that can create this scenario, but not an exhaustive list:

  • Adding a new physical volume to the LVM volume group holding the contents of /boot.
  • Spreading a BTRFS root filesystem holding /boot across two devices.

Alternatively, a storage layout that puts /boot on a different disk than /boot/efi, which is the EFI System Partition (ESP), can also cause similar behavior, even if /boot is only on one disk.

 

When booting a system with such a layout, the guest is able to start the Grub2 bootloader, but the process stops at a grub shell. The prompt in this shell can be either a standard grub prompt, or a grub rescue prompt depending on the details of the situation.

grub> 
grub rescue>

 

When running the ls command at this prompt, only one disk appears. You may see additional mapped volumes that correspond to that disk such as LVM volumes. In this example, the only disk that appears is (hd0).

grub> ls
(hd0) (hd0,gpt2) (hd0,gpt1) (lvm/system-root) (lvm/system-swap)

 

If /boot is on a disk separate from the ESP, then you may not see the volume where /boot resides in the ls output above.

 

Attempting to list the contents of /boot will fail if /boot is spread across more than one disk.

grub> ls (lvm/system-root)/boot/
error: ../../grub-core/kern/disk.c:237:disk `lvm/system-root' not found.

 

If you enter the EFI firmware menu before loading Grub2, then continue booting from there, the system boots normally.

Resolution

Add the following parameter to the VM's advanced configuration:

efi.quickBoot.enabled = "FALSE"

 

This can be added to the VM's *.vmx file directly, or you can add it through VMware's various management interfaces such as vSphere. The process to add it through one of VMware's management interfaces can vary, so please reference the documentation for your particular product if you have any doubts.

 

You may be able add it in vSphere by navigating to the system, opening the system settings, then navigating to the "Advanced Parameters" tab. In the "Attribute" box, enter "efi.quickBoot.enabled" and in the "Value" box enter "FALSE". Click on the "Add" button.

Cause

Some VMware EFI implementations use a quick boot feature by default to speed up the boot process. With this feature enabled, the EFI firmware only initializes the disk containing the ESP and presents only that one disk to the bootloader. When this happens on systems matching the Situation above, Grub2 is unable to assemble the needed parts of the /boot filesystem as some or all parts of it are on separate disks that do not appear.

By entering the EFI menu before booting, the system is forced to initialize all disks so they can be presented in that menu. After exiting the menu to continue booting, all of the initialized disks are presented to Grub2 and the system is able to boot normally.

By adding the parameter mentioned in the Resolution section, this behavior is disabled. This causes all disks to be initialized without entering the EFI menu, allowing the system to boot without any workarounds.

Additional Information

There are other EFI implementations that exhibit similar behavior across both physical and virtual hardware. Providing an exhaustive list of them here is not possible. If your symptoms match the Situation section above on a different hardware platform that uses EFI, you might have a similar quick boot feature enabled.

Other causes are also possible. For example, KVM will exhibit similar behavior if you have not marked all relevant disks as bootable. This additional article provides details on other things to look out for that can cause similar symptoms on other platforms. It provides alternative resolutions for KVM guests and BIOS-based VMware guests.

https://www.suse.com/support/kb/doc/?id=000019849

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021635
  • Creation Date: 03-Dec-2024
  • Modified Date:10-Dec-2024
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications
    • SUSE Manager
    • SUSE Linux Enterprise Micro

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.