Black screen, trying to boot a real raw Win10disk

Discussions related to using VirtualBox on Linux hosts.
Post Reply
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

Hi all,
on a ubuntu 20.04.2 LTS linux host, running VirtualBox 6.1.16_Ubuntu r140961, I try to boot a Windows 10 parition.
I'm following a tutorial found here : [ I'm a too young user to post link.....]

I only managed to get a black screen.

Here is the log [I'm too young user to add files...]
VBox.log
(120.9 KiB) Downloaded 10 times
The only error i can see is :

Code: Select all

00:00:06.636007 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
But I'm not sure it is related.

Do you have any idea of what can happen.?

Vincent
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Re: Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

Here is the result of
fidsk -l

Code: Select all

Périphérique       Début        Fin  Secteurs Taille Type
/dev/nvme0n1p1      2048     391167    389120   190M Système EFI
/dev/nvme0n1p2    391168     653311    262144   128M Réservé Microsoft
/dev/nvme0n1p3    653312  197487409 196834098  93,9G Données de base Microsoft
/dev/nvme0n1p4 995225600  997253119   2027520   990M Environnement de récupération Windows
/dev/nvme0n1p5 997255168 1000214527   2959360   1,4G Environnement de récupération Windows
/dev/nvme0n1p6 197488640  995225599 797736960 380,4G Système de fichiers Linux
I created a vmdk file with
VBoxManage internalcommands createrawvmdk -filename ~/win10.vmdk -rawdisk /dev/nvme0n1 -partitions 1,3
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Black screen, trying to boot a real raw Win10disk

Post by scottgus1 »

The screenshot error can be ignored. It is only saying the VM is not in a state that can take a screenshot, probably related to the Preview in the main Virtualbox window.
vbelloir wrote:-partitions 1,3
Try letting the VM access the whole drive, not just a couple partitions.
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Re: Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

Hi scottgus1 and thanks for your answer!

I still can't post a link....

I tried without partition selection:

Code: Select all

VBoxManage internalcommands createrawvmdk -filename ~/win10.vmdk -rawdisk /dev/nvme0n1
If I select Enable EFI option, I got a black screen. If I don't select the option, i got
FATAL: No bootable medium found! System halted.
EDIT : On the tutorial I follow, there is some setting with Grub (latter, I will be able to post link).
Set up GRUB

Now let's start the virtual machine. Most likely, GRUB will now start without being able to load Windows directly. With lsyou can display all partitions:

grub> ls
(proc) (hd0) (hd0,gtp5) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

We already know that our Windows installation is on partition 3. Let's verify this:

grub> ls (hd0,gpt3)
Partition hd0,gpt3: Filesystem type ntfs - Label 'Windows', UUID ABCDEF - Partition start at 283648KiB

Now do the following:

grub> insmod part_gpt
grub> insmod chain
grub> set root=(hd0,gpt3)
grub> insmod ntfs
I don't really understand if I must to that in the VM, on in my Linux Host.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Black screen, trying to boot a real raw Win10disk

Post by mpack »

Perhaps it's time that someone drew your attention to what the user manual has to say on this subject:
User manual s9.7.1 wrote: Warning: Raw hard disk access is for expert users only. Incorrect use or use of an
outdated configuration can lead to total loss of data on the physical disk
. Most impor-
tantly, do not attempt to boot the partition with the currently running host operating
system in a guest. This will lead to severe data corruption.
I would consider that someone who has to ask multiple questions on how to make it work, or needs to follow a tutorial which they don't really seem to follow, probably is not an "expert user".

And in the same vein: I suspect that installing grub onto a raw disk would be a very bad idea.

Why exactly do you need to run a VM based on a raw hard drive? Linux can access files in an NTFS partition without a VM, and a VM doesn't need raw access for itself.
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Re: Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

Hi mpack,

I do know that ntfs file system can be access without VM.
You are right, I'm not an expert.
Even if I'm cannot be qualified as expert, Linux (ubuntu, mint, arch, debian...) is my daily driver OS since 2004. So, I would qualified myself as advanced user.

But I do understand the risk, and this is not the first time I run VM with raw disk.
I changed computer two weeks ago. My last one had two 256GB SSD. Linux (ubuntu 20.04.2 LTS) was on the first one, Windows 10 on the other.
I managed to get windows available on both VM and VM
For my job, I need dualboot, because I run some software that can't be run on wine : Altium Designer.
For long work session, I use Windows on dual boot, to get more efficiency. But sometime, I need to run it only few minutes, so, instead of reboot, I prefer launch the VM.

Is it clearer?

Now two week ago, I changed computer, and there is only a single NVME (bigger than before). My old Windows 10 install still works (I put the SSD in a external USB case), but I can't managed to do the same with Windows installed on NVME.

EDIT : I'm prepared to eventually lost some data. This computer is really new, and Windows partition is pretty empty.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Black screen, trying to boot a real raw Win10disk

Post by scottgus1 »

You might run into a couple issues if you continue:
vbelloir wrote:I use Windows on dual boot, to get more efficiency. But sometime, I need to run it only few minutes, so, instead of reboot, I prefer launch the VM.
This will result in changing 'hardware' in the OS, from physical to virtual and back, with Microsoft's activation servers hiccuping over each change. Eventually, you might not be allowed to change anymore. See viewtopic.php?f=7&t=98410 for a possible method.
vbelloir wrote:I run some software that can't be run on wine : Altium Designer
If your programs need good graphics, you probably won't get as good or good enough in the VM as in physical boot. VirtualBox is not designed for graphics-intensive apps.

Your physical drive appears to already have a Linux partition on it. Was it a dual-boot setup, with grub controlling boot to Windows or Linux? Further editing grub might bung up the exiting setup. (I don't really know, though, I am a Windows guy). I'd recommend good restorable backups of both the host and the external drives, lest that 'data loss' warning bite harder than expected.
vbelloir wrote:setting with Grub...in the VM, on in my Linux Host
If the edit is for getting the VM to boot to the correct partition, then in the VM, definitely. "What happens in the VM stays in the VM." Edits to the host grub would not affect the VM, since the host OS is not running yet, so the VM would not be running yet either. On the other hand, editing the VM's grub to boot to Windows in the VM might upset booting physically. I bring to mind the bite of 'data loss' mentioned earlier. :lol:

A Stack-Exchange-style "frame challenge": Can you transfer to a separate VM the things you need to access for a few minutes and leave your physical-boot Windows unchanged? Or are you trying to access Altium Designer briefly during the short VM boots?
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Re: Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

I know that VM will not "see" real HW, and I'm OK with that.

As I said, I will only boot VM for short time, when no good performance is needed.

Yes, my linux host, and my windows raw disk are on the same nvme disk, with dual boot, managed by grub.

I could keep the Win10 partition for dual boot, and create a separate VM, for short use, but it will result in duplicate datas and software, and space lost.

EDIT: the tuto I follow is there:
https://translate.google.com/translate? ... %3Fp%3D366
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Black screen, trying to boot a real raw Win10disk

Post by mpack »

Just to be clear: if the raw VMDK descriptor is changed to reference the entire host drive (which I believe was suggested at one point), and then you edit the grub script inside the VM, then you are in fact affecting the host drive too.

It's raw access: that means that everything you do to that drive in the VM is visible to the host.
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Re: Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

I understand that.
But even if I configure the whole drive, or only partitions 1 (boot) and 3 (Windows 10), I don't have access to grub in the VM.
Got black Screen if Enable EFI is selected. "FATAL: No bootable medium found! System halted." message if not....

I will try to edit grub setting directly from Linux host, but I think it will not do anything, as grub doesn't seem loaded in the VM.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Black screen, trying to boot a real raw Win10disk

Post by Martin »

You need to add an overlay file for the boot sector to be able to write the necessary changes.
See the -mbr parameter in chapter 9.7.1.2 of the manual.
vbelloir
Posts: 7
Joined: 30. Apr 2021, 19:01

Re: Black screen, trying to boot a real raw Win10disk

Post by vbelloir »

Thanks for your answer.
In fact, my issue seems to not be related to the fact that I'm trying to boot a rawdisk.

I tried to create a VM, with a linux iso file.
I can boot Linux Live iso if Enalble EFI is disabled.
If I enable it, I got a black screen.

Here is the log file:
VBox.log
(124.41 KiB) Downloaded 8 times
any idea?

EDIT:
I tried to change graphique card from vboxsvga to vboxvga without any success (I read this somewhere in the forum)
jaza
Posts: 1
Joined: 3. Aug 2021, 01:44

Re: Black screen, trying to boot a real raw Win10disk

Post by jaza »

I had the same problem, and as suggested in some other threads in this forum, setting the kernel parameter split_lock_detect=off in the host Ubuntu 20.04, resolved it for me. I can now boot Windows 10 in VirtualBox 6.1.22.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Black screen, trying to boot a real raw Win10disk

Post by fth0 »

FWIW, VirtualBox 6.1.24 or newer do not need split_lock_detect=off any more.
Post Reply