Booting problem when activating Secure Boot and TPM

Discussions related to using VirtualBox on Windows hosts.
Post Reply
sterod
Posts: 23
Joined: 30. Apr 2021, 19:08

Booting problem when activating Secure Boot and TPM

Post by sterod »

Hi Everyone,

Finally VirtualBox 7 is out, and I was looking foward to upgrade my Windows 10 VMs to Windows 11.

However, after activating Secure Boot and TPM, to enable me to do the upgrade, I boot into a commad prompt and Windows won't start. Researched the issue, and it seems that to use SecureBoot you need GBT partitions, and presently the partitions are all MBR.

There are some tools that say you can convert MBR to TPM without data loss, but as these are virtual machines, I wonder if there is a specific process in VirtualBox to achieve this? If not, which is your recommended tool for making the conversion to minimise risk of data loss?

Best regards,

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

Re: Booting problem when activating Secure Boot and TPM

Post by mpack »

sterod wrote:but as these are virtual machines, I wonder if there is a specific process in VirtualBox to achieve this?
VirtualBox knows nothing about guest filesystems, so no - there is no VirtualBox tool to do this.

Two options I would recommend:
  1. Backup the Win10 VMs then install Windows 11 from scratch into the same VMs, after changing the template to Win11.
  2. Backup the Win10 VMs using Macrium Reflect Free, change the VM settings, then restore the Macrium image into the VM. I believe Macrium caters for converting the filesystem.
Personally I would bite the bullet and do the first. You have the backup available from which to grab files afterwards.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Booting problem when activating Secure Boot and TPM

Post by scottgus1 »

I believe there is a built-in Windows command to convert MBR to GPT. I don't know what it is, this would be web-search stuff. But a VM is a PC, for all intents and purposes, so if you web-search how to upgrade MBR 10 to GPT 11, you might get a method that works in the VM. Also see the Windows Guests subforum, this has been talked about there.

Backing up the VM is an absolute necessity if you care about the VM. Shut the VM down completely from the 10 Start Menu. Then copy the whole VM folder to a couple backup medias. An FC file compare can confirm the copies.
sterod
Posts: 23
Joined: 30. Apr 2021, 19:08

Re: Booting problem when activating Secure Boot and TPM

Post by sterod »

I ended up using the inbuilt mbr2gbt/validate and mbr2gpt/convert facility from the command prompt, and successfully converted to gbt without losing any data.

Changed settings to TPM version 2.0 and Secure Boot, and could then start the VM.

Could still not upgrade to Windows 7. When I run the PC Health App, it does no longer report any errors (earlier it complained about Secure Boot and TPM 2.0), but Windows update still reports that my PC is not compatible with Windows 11.

Hmm. Maybe only chance is to do a clean install and try to reinstall all apps. Problem I foresee is licensing issues, and I do not have the install programs in all instances.

Sten
multiOS
Volunteer
Posts: 797
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Booting problem when activating Secure Boot and TPM

Post by multiOS »

AFAIK Microsoft doesn't 'allow' a free direct upgrade route from Windows 7 to 11. You may have to jump through the hoops of upgrading from 7 To 10 to 11.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Booting problem when activating Secure Boot and TPM

Post by scottgus1 »

I suspect that 'sterod' is trying to go from 10 to 11, and that "Could still not upgrade to Windows 7" was a conflation with Virtualbox 7.
sterod wrote:Windows update still reports that my PC is not compatible with Windows 11.
Have you tried getting the PC Health Check app the Windows Update app suggests? What does the app say?

Also don't forget this:
mpack wrote:changing the template to Win11.
See the VM's General settings, Basic tab, Version dropdown.
multiOS
Volunteer
Posts: 797
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Booting problem when activating Secure Boot and TPM

Post by multiOS »

@scotgus1,

Reading again, you may be right. If the existing VM is Windows 10, and given the varied results from my testing and other reports so far, I'd be interested to know if it is running reliably on VirtualBox 7.0.6 with matching Guest Additions and 3D enabled.
sterod
Posts: 23
Joined: 30. Apr 2021, 19:08

Re: Booting problem when activating Secure Boot and TPM

Post by sterod »

My bad. Naturally, I meant after upgrading to VirtualBox 7.

However, problem solved automatically. Two days after upgrading to Secure Boot and TPM, Windows suddenly informed me that Windows 7 is now available for download.

Downloading and installing as I write this message!
sterod
Posts: 23
Joined: 30. Apr 2021, 19:08

Re: Booting problem when activating Secure Boot and TPM

Post by sterod »

In case anyone else has the same problem, these are the details of the conversion.

I rebooted Windows in terminal mode. (Click Start Button, Press Power, Hold down shift key and press restart. When restarting, choose Troubleshoot>Advanced Options>Command Prompt)

I first ran this command to make sure everything was OK:
mbr2gpt/validate
Once it confirms that all is well, I ran
mbr2gpt/convert

Once done, I typed exit and closed down windows.

Proceeded to activate Secure Boot and TPM 2.0 in Virtual Box 7. Restarted the VM, and everthing went well.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Booting problem when activating Secure Boot and TPM

Post by mpack »

sterod wrote:Two days after upgrading to Secure Boot and TPM, Windows suddenly informed me that Windows 7 is now available for download.
Again with "Windows 7"?
sterod
Posts: 23
Joined: 30. Apr 2021, 19:08

Re: Booting problem when activating Secure Boot and TPM

Post by sterod »

Obviously getting senile! Windows 11 I meant.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Booting problem when activating Secure Boot and TPM

Post by scottgus1 »

Come on, baby, 7 come 11! Papa needs a new pair of shoes!
sterod
Posts: 23
Joined: 30. Apr 2021, 19:08

Re: Booting problem when activating Secure Boot and TPM

Post by sterod »

multiOS wrote:@scotgus1,
If the existing VM is Windows 10, and given the varied results from my testing and other reports so far, I'd be interested to know if it is running reliably on VirtualBox 7.0.6 with matching Guest Additions and 3D enabled.
The answer to this is that it is stable if I use VBoxVGA driver, but the screen freezes up and the VM crashes if I use VBoxSVGA driver. I do not know why.
multiOS
Volunteer
Posts: 797
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Booting problem when activating Secure Boot and TPM

Post by multiOS »

@sterod,

Thanks for reporting back and glad you've hit on a 'work-around' for your current setup.

The reason I asked, is that, as you know, VBoxSVGA is the default (intended) setting for Windows VMs on which 3D is supported but, for me, if the Version 7.0.xx Guest Additions are installed, then on some Windows PCs, and also on Intel macOS hardware I've been able to test with VirtualBox 7 releases up tp 7.0.6:

- Windows 7 VMs seem to work normally with 3D enabled; but
- Windows 10 VMs only work with 3D disabled; and
- Windows 11 VMs always freeze during startup, unless the Guest Additions installations are downgraded to Version 6.1.XX
- 'Linux' VM installations tested seem to work normally.

However, somewhat confusingly, on one HP Laptop I've used, the same VMs all run perfectly!

VBoxVGA is an 'historic' hangover intended for mainly for older operating systems and it doesn't provide 3D support, so running that option in a Windows 11 VM should produce similar behaviour to running VBoxSVGA with 3D disabled, but, out of curiosity, I'll do some more personal testing, on both macOS and Windows Hosts before reporting my outcomes to the VirtualBox Developers via the Public Bugtracker..
Post Reply