Enabling the Boot Menu During Boot
If the VM is booting “hands-off” (i.e., the boot menu does not appear during boot), you can enable the boot menu by modifying the bootloader configuration. The steps depend on whether the system is using GRUB (for BIOS or UEFI) or systemd-boot (for UEFI).
Step 1: Determine the Bootloader
Follow the steps in the previous section to determine whether the system is using GRUB or systemd-boot.
Step 2: Enable the Boot Menu
For GRUB (BIOS or UEFI)
Edit the GRUB configuration file:
sudo nano /etc/default/grub
Modify the following parameters to ensure the boot menu appears:
Set
GRUB_TIMEOUT
to a value greater than 0 (e.g.,GRUB_TIMEOUT=5
) to display the menu for 5 seconds.Ensure
GRUB_HIDDEN_TIMEOUT
is either commented out or set to 0.Set
GRUB_TIMEOUT_STYLE
tomenu
to always show the menu.
Example configuration:
GRUB_TIMEOUT=5 GRUB_HIDDEN_TIMEOUT=0 GRUB_TIMEOUT_STYLE=menu
Save the file and regenerate the GRUB configuration:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot the system. The GRUB boot menu should now appear during boot.
For systemd-boot (UEFI)
Edit the systemd-boot configuration file:
sudo nano /boot/loader/loader.conf
Add or modify the following parameters to ensure the boot menu appears:
Set
timeout
to a value greater than 0 (e.g.,timeout 5
) to display the menu for 5 seconds.Set
console-mode
toauto
or a specific resolution if needed.
Example configuration:
timeout 5 console-mode auto
Save the file and reboot the system. The systemd-boot menu should now appear during boot.
Step 3: Temporarily Access the Boot Menu
If you only need to access the boot menu once (e.g., for testing), you can interrupt the boot process:
For GRUB: Press
Shift
(for BIOS) orEsc
(for UEFI) during boot to bring up the menu.For systemd-boot: Press
Space
during boot to bring up the menu.
Step 4: Verify the Changes
After making the changes, reboot the system and verify that the boot menu appears. If the menu does not appear, double-check the configuration files and ensure the correct bootloader is being used.
Summary
Determine the bootloader (GRUB or systemd-boot).
Modify the configuration file to enable the boot menu:
For GRUB: Edit
/etc/default/grub
and regenerategrub.cfg
.For systemd-boot: Edit
/boot/loader/loader.conf
.
Reboot the system and verify the boot menu appears.
Note: The boot menu operates independently of wether the system is running in graphical mode or text mode, so the absence of an X server does not affect this process.