Virtual Machine

Discussions about using Linux guests in VirtualBox.
Post Reply
apchicha
Posts: 1
Joined: 22. Feb 2023, 22:10

Virtual Machine

Post by apchicha »

Settings of VM
Settings of VM
Снимок.PNG (69.94 KiB) Viewed 2228 times
How VM opens
How VM opens
Снимок1.PNG (35.78 KiB) Viewed 2228 times
I have made a VM for my lessons to learn UX/UI design, but VM didn't open correctly, how to fix it? Windows 8.1 64x, I've already tried to reinstall VB and Xubuntu
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Machine

Post by mpack »

You posted in "Windows Guests", but the guest appears to be Ubuntu? Topic moved to "Linux Guests".

Take another run through the VM settings. I see for example that you assigned 16MB graphics RAM - not a lot.

Any further discussion will require a VM log. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
nbanba
Posts: 16
Joined: 27. Feb 2023, 10:48

Re: Virtual Machine

Post by nbanba »

Hi

I don't know about ubuntu, but it seems that the installed GUEST (Ubuntu) does not have UEFI configure in it.

When installing the guest OS, you must assure yourself that the OS is proprerly installed in UEFI mode: you must have grub-efi installed on the VM and you must have a FAT12 partition (also kwnown as EFI partition) that contains an UEFI launcher like grub64.efi or the MS signed one shimx64.efi.
This EFI partition must not be encrypted and must be browsable by the most basic storage client your EFI BIOS (Basic Input Output System) provide, because in case of multi boot in a multi OS installed configuration, only 1 EFI partition is enough for all OS installed on the machine and every OS will update this EFI partition accordingly to it's requirements to make the system boot.
To boot a Linux using GRUB bootloader, you must also have a grub.cfg file on the partition, and it's content is refering to the root partition containing /boot and inside the launching kernel image

We are now in 2023 and EFI on production server is now more than 15 years of use, so you must never chose "legacy or bios install" under your linux installer, except if your hardware does not support UEFI (or if you explicitely want to use very outdated and buggy code which is really not recommanded)


To boot your machine, did you try to enter in the EFI shell the following command :
fs2:

It will attempt to boot (or to load) your BLK2 install

Here is an example on my Dell XPS15 laptop, (only have a single drive so for me it's "fs0:" ) (ls command let you list , cd command let you change directory)

Code: Select all

Shell>FS0:
FS0:\> ls
Directory of: FS0:\
28/02/2023 10:43 <DIR>  4,096 EFI
    1 Dir(s)
FS0:\> cd EFI
FS0:\EFI\>ls
Directory of: FS0:\EFI\
28/02/2023 10:43 <DIR>  4,096 debian
21/01/2023 07:12 <DIR>  4,096 Dell
FS0:\EFI\>cd debian
FS0:\EFI\debian\> grub64.efi
Here launching "grub64.efi "makes my laptop boot



As already said, for further help or assistance you will have to provide logs, etc...
And I recommand you type in google.com search engine :
" how to boot my system from its efi shell "

You will find a lot more than I told, and the way to recreate from the UEFI shell the UEFI boot entry in the UEFI BIOS for permanent fix of your issue.


Kind regards
nbanba
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Machine

Post by mpack »

nbanba wrote: We are now in 2023 and EFI on production server is now more than 15 years of use, so you must never chose "legacy or bios install" under your linux installer, except if your hardware does not support UEFI
I don't believe this is appropriate advice for a VM. The MBR BIOS has decades of experience behind it, so unless you have a specific need to use GPT (e.g. you have a virtual disk larger than 2TB), then I would stick with MBR.

The VirtualBox EFI implementation is relatively new (it is still documented as "experimental" in user manual section 4.14), and originally only intended for MacOS guests and later extended to support other guests.

Returning to the OPs question, what makes you think he is not using EFI? In fact his symptoms to me indicate the opposite: he has selected EFI, hence the EFI shell, but the hard disk may not be initialized with a GPT partition layout. So this would be a good example of when the advice to always use EFI turns out to be bad.
nbanba
Posts: 16
Joined: 27. Feb 2023, 10:48

Re: Virtual Machine

Post by nbanba »

Hello

Sorry for the maybe misunderstanding of the issue, but it seems more than iffy that a modern 2023 linux install iso try to install an efi system on a non gpt partition... not sure it's possible, it would not work.

To see if it s the case, maybe uncheck the UEFI box on virtualbox vm configuration and try to boot again to provide us log, or/and try to boot on an external kernel and to mount your root and boot partition to see how your distrib had been installed and post it here.

@mpack :
I currently know no way to achieve to run a VM with secure boot and full filesystem encryption (except /boot) without UEFI and necessarily a GPT partition table.
For security requirements and modern uefi-bios interactions, I think it's necessary to follow and use today's technology in the machines you run as guest os, especially if you're using your own PKI to generate your secure boot keyx database or you want to be able to do it later.


Remaining availiable for further help or discussion,
Kind regards
nbanba
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual Machine

Post by mpack »

The EFI shell is part of the VirtualBox EFI BIOS, it is not part of a Linux install. The fact that you see the shell tells you that the EFI BIOS was running, i.e. EFI was selected in the VM settings.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Virtual Machine

Post by fth0 »

The first screenshot in the OP already shows that EFI was selected in the VM settings. What it also shows is that (probably) an unattended installation was tried, which is the default in VirtualBox 7.0.6. My best guess ATM is that the VirtualBox unattended installation failed to setup the VirtualBox (U)EFI BIOS correctly to boot from the newly created partition(s). If that's the case, a manual selection of the right EFI boot loader would be the next step to take ...
Post Reply