Jump to content











Photo
- - - - -

boot windows 8 vhd with grub


  • Please log in to reply
29 replies to this topic

#1 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 22 December 2018 - 07:27 PM

Hi,

 

I am trying for weeks now to boot a windows 8.1 vhd with grub (4dos) .

 

I am doing it with XP successfully, but windows 8.1 gives me headaches.

 

My idea it to have two entries in grub: 

 

to load the sectormapped vhd or

the load the memory loaded vhd.

 

the windows 8.1 is stripped down to fit into a 1 GB ntfs compressed vhd. it has the firadisk driver installed, but it fails always to boot, --> can't find the winload.efi / winload.exe.

 

can anyone help me with this and /or point me to a tutorial dealing with this specific case?

 

steps I did:  normal windows 8.1 install.

install firadisk driver, disable pagefile, hibernation etc. reboot into a PE. copy the contents of the C into a VHD. try the boot the VHD with grub4dos.

 

 

 



#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 22 December 2018 - 07:43 PM

How are you booting using grub4dos?

Do you have normal uncompressed \bootmgr and BCD?

 

 I think I have read that...

Using compressed or encrypted VHDs for native boot. VHDs that have been compressed by NTFS or encrypted using Encrypting File System on the host volume are not supported for native boot.


#3 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 22 December 2018 - 07:45 PM

yes using grub4dos from a usb stick



#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 22 December 2018 - 07:49 PM

and the other two points? One was a question and one a quote? Can you answer those?



#5 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 23 December 2018 - 12:18 AM

Hi,

 

sorry I misunderstood you.

 

this is the menu.lst I am using.

 

title  q1900.vhd -FILEDISK
find --set-root --ignore-floppies /q1900.vhd
map  /q1900.vhd (hd0)
map --hook
root (hd0,0)
chainloader /bootmgr
 
title q1900.vhd - RAMDISK
find --set-root --ignore-floppies /q1900.vhd
map --mem /q1900.vhd (hd0)
map --hook
root (hd0,0)
chainloader /bootmgr
 
 
I think the boot files were also ntfs compressed, but as I were doing trial and error llooking for a solution I think I have those uncompressed also. I will check that soon.
 
But the method I use should work?


#6 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 24 December 2018 - 04:07 AM

I am now a step futher, the fix was: doing bootrec /rebuildbcd . Now it's booting futher, but it crashes throwing a INACCESSIBLE BOOT DEVICE. 

 

it that because firadisk is not loading properly?  NB. it's a windows 8.1 64 bit, and I changed to testmodus in the BCD. 



#7 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 24 December 2018 - 08:07 AM

UEFI_MULTI can make the correct Firadisk entry

http://reboot.pro/to...e-5#entry208639

 

More Info

http://reboot.pro/fi...ct-make-mini-8/

http://reboot.pro/to...ct-make-mini-8/



#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 24 December 2018 - 08:43 AM

UEFI_MULTI can make the correct Firadisk entry

Good :), what about sharing the "correct" Firadisk entry it uses?

 

Or are you referring to the ones you have here?:

http://reboot.pro/fi...ct-make-mini-8/

 

 

@favorinus

At first sight the "non mem" one cannot possibly work (see the menu.lst in the above link, you need to pass parameters to Firadisk for non mem mapped hard disks images), while the "mem" one should.

 

Are you sure the .vhd is a "static" one?

Which (EXACT) version of grub4dos are you using?

 

 

:duff:

Wonko



#9 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 24 December 2018 - 09:17 AM

Good :), what about sharing the "correct" Firadisk entry it uses?

 

Or are you referring to the ones you have here?:

http://reboot.pro/fi...ct-make-mini-8/

 

 

 

Sure, here it is ....

title Portable W864USP1.vhd - FiraDisk FILEDISK - 3.5 GB
find --set-root --ignore-floppies /W864USP1.vhd
map --heads=2 --sectors-per-track=18 --mem (md)0x800+4 (99)
map /W864USP1.vhd (hd0)
map --hook
write (99) [FiraDisk]\nStartOptions=disk,vmem=find:/W864USP1.vhd,boot;\n\0
rootnoverify (hd0,0)
chainloader /bootmgr
map --status
pause Press any key . . .

title Portable W864USP1.vhd - FiraDisk RAMDISK - 3.5 GB
find --set-root --ignore-floppies /W864USP1.vhd
map --mem /W864USP1.vhd (hd0)
map --hook
root (hd0,0)
chainloader /bootmgr


#10 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 24 December 2018 - 09:22 AM

Why not try using a VHD with a non-compressed NTFS filesystem first?

Once that is working, try it with your NTFS compressed VHD.



#11 misty

misty

    Gold Member

  • Developer
  • 1069 posts
  •  
    United Kingdom

Posted 24 December 2018 - 09:22 AM

@favorinus
The Boot Configuration Data (BCD) store entries usually contain disk signature and partition offset information - unless device is set as boot in which case a relative path is used. The other exception is using locate as device.

In your first test, it's possible that you copied the BCD store and then when loading it, it tried to find winload.exe on your original setup - the one copied to the VHD. If you deleted the Windows on your HDD after copying it to the VHD, then winload.exe would be missing.

Running the bootrec command may have fixed this. I usually use bcdboot. E.g. (with VHD mounted as R:) -
bcdboot R:\Windows /S R: /F BIOS
bcdboot reference - here
 

...@favorinus
At first sight the "non mem" one cannot possibly work (see the menu.lst in the above link, you need to pass parameters to Firadisk for non mem mapped hard disks images), while the "mem" one should.

Are you sure the .vhd is a "static" one?
Which (EXACT) version of grub4dos are you using?...


As Wonko has asked - is the VHD a fixed type disk?

Also, SVBus may be easier to use if booting from file backed disks - it does not require additional parameters in your Grub4dos commands.

Personally, I would recommend getting Native Boot VHD working first before trying RAM loading. Assuming your Windows version supports VHD Native Boot, this is essentially a way of booting a file backed disk.

Once Native Boot is working, then try RAM boot.

Misty

#12 misty

misty

    Gold Member

  • Developer
  • 1069 posts
  •  
    United Kingdom

Posted 24 December 2018 - 09:24 AM

And another suggestion - try using none RAM loading (flat boot) WinPE for tests. WinPE 5.* is essentially a stripped down version of Windows 8.*.

#13 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 24 December 2018 - 04:43 PM

 

Why not try using a VHD with a non-compressed NTFS filesystem first?

Once that is working, try it with your NTFS compressed VHD

It's now decompressed.

 

 

 

 you need to pass parameters to Firadisk for non mem mapped hard disks images)

 

ok, now I applied the correct parameters:

 

find --set-root --ignore-floppies /W864USP1.vhd
map
--heads=2 --sectors-per-track=18 --mem (md)0x800+4 (99)
map /W864USP1.vhd (hd0)
map --hook
write
(99) [FiraDisk]\nStartOptions=disk,vmem=find:/W864USP1.vhd,boot;\n\0
rootnoverify
(hd0,0)
chainloader /bootmgr

 

it's not giving me a blue screen 7B anymore but it's infinity booting now (the moving circle)

 

 

 

 is the VHD a fixed type disk?

 

yes it's a fixed vhd.

 

 

 

try using none RAM loading (flat boot) WinPE for tests

 

sounds interesting. I will take a look at that.

 

but any thoughts about at can cause the infinite boot now?



#14 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 03 January 2019 - 05:50 PM

Hi,

 

I have started all over again and used the SVBUS method, which I have more success until now. I manage install and boot windows 8.1 into a VHD when installed on a HDD. When I copy the VHD to a USB pendrive it boots as FILEDISK it will show me a BSOD and reboots quickly, but when I do booting as RAMDISK it loading perfectly.

 

When can be the cause of this? I remember from XP that there needed to be a waitbt driver for USB.

 

greetings,

 

Mariano



#15 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 January 2019 - 07:51 PM

When can be the cause of this? I remember from XP that there needed to be a waitbt driver for USB.

There could be also an issue with "Removable" vs. "Fixed"? :dubbio:

 

I.e. a USB hard disk might work BUT a USB stick (without the "Removable bit flipped") might not? :unsure:

 

You might try (but no guarantee that this is the cause and corresponding fix) the diskmod driver (alternative to the "historic" cfadisk and dummydisk filter driver):

http://reboot.pro/to...-usb-hard-disk/

 

Anyway, first thing you should need to modify the build so that it stops (and does not reboot) on STOP errors/BSOD's, I believe that you need to change a setting in Registry also in Windows 8/8.1:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]
"AutoReboot"=dword:00000000

(of course when offline it will be either ControlSet001 or ControlSet002).

 

:duff:

Wonko



#16 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 03 January 2019 - 08:52 PM

Thank you for the reply,

 

Now it doesnt autoreboot anymore and the bsod message is INACCESSIBLE_BOOT_DEVICE.



#17 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 03 January 2019 - 09:05 PM

If the USB stick is a 'Removable' type then you will get that error.

Can you try booting using VirtualBox + VMUB?

The USB drive will  appear as a hard disk to WinPE - if it boots OK, then the issue is most likely to be because the USB is a removable device.

One way to prove it would be to use a USB HDD instead.



#18 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 03 January 2019 - 09:32 PM

ok I have copied to a USB HDD and it gives me to same error. INACCESSIBLE_BOOT_DEVICE when trying to boot as FILEDISK,

 

can it be the problem that I installed windows 8.1 first on the internal  SATA HDD and now it's booting without any sata ?



#19 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 03 January 2019 - 09:53 PM

What does the BCD look like for FILEDISK booting?

Is the VHD specified in the BCD entry?



#20 favorinus

favorinus

    Member

  • Members
  • 38 posts
  •  
    Argentina

Posted 04 January 2019 - 02:52 AM

I have tried now a workaround by using bootmgr to load the VHD as FILEDISK .

 

Windows Boot Manager
--------------------
identifier              {bootmgr}
description             Boot Manager
locale                  en_US
nointegritychecks       Yes
displayorder            {a80a400f-f3d3-4c07-b7b9-8729c6f78b37}
                        {7eca6a46-2bb5-4d8c-b556-40d70ec55e93}
bootsequence            {bootmgr}
timeout                 30
 
Windows Boot Loader
-------------------
identifier              {a80a400f-f3d3-4c07-b7b9-8729c6f78b37}
device                  vhd=[locate]\RADIO.VHD
path                    \Windows\system32\winload.exe
description             Boot from VHD
locale                  en-US
testsigning             Yes
osdevice                vhd=[locate]\RADIO.VHD
systemroot              \Windows
detecthal               Yes
 
Real-mode Boot Sector
---------------------
identifier              {7eca6a46-2bb5-4d8c-b556-40d70ec55e93}
device                  boot
path                    \grldr.mbr
description             Realmode App Loader

 

 

So de MBR of the usbstick is set to bootmgr and the /boot/bcd has two entries:

 

1. pointing to the VHD with test-signing enabled.

2. pointing to grldr.mbr which loads menu.lst which has two entries, one for loading VHD as FILEDISK the other as RAMDISK.

 

RAMDISK works fine,

FILEDISK failed with INACCESSABLE_BOOT_DEVICE

 

The VHD has also a /boot/bcd inside. 

 

H:\Boot>bcdedit /store h:\boot\bcd /enum
 
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  unknown
description             Windows Boot Manager
locale                  en-us
inherit                 {globalsettings}
default                 {default}
resumeobject            {1bdf8bc8-0f0a-11e9-9a75-d05099614b6b}
displayorder            {default}
toolsdisplayorder       {memdiag}
timeout                 30
 
Windows Boot Loader
-------------------
identifier              {default}
device                  unknown
path                    \windows\system32\winload.exe
description             Windows 8.1
locale                  en-us
inherit                 {bootloadersettings}
testsigning             Yes
allowedinmemorysettings 0x15000075
osdevice                unknown
systemroot              \windows
resumeobject            {1bdf8bc8-0f0a-11e9-9a75-d05099614b6b}
nx                      OptIn
bootmenupolicy          Legacy
detecthal               Yes


#21 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 January 2019 - 09:03 AM

 

So de MBR of the usbstick is set to bootmgr and the /boot/bcd has two entries:

 

1. pointing to the VHD with test-signing enabled.

2. pointing to grldr.mbr which loads menu.lst which has two entries, one for loading VHD as FILEDISK the other as RAMDISK.

 

RAMDISK works fine,

FILEDISK failed with INACCESSABLE_BOOT_DEVICE

 

The VHD has also a /boot/bcd inside. 

For the record, the MBR is probably a standard one and the PBR of the active partition is "set to BOOTMGR", the MBR is not set to "anything", if it is a "standard" one.

 

The actual \bootBCD that is used in the actual booting seems to be the one inside the VHD.

 

First thing I would add to the vhd another copy of grldr and grldr.mbr and an entry for it in the internal \boot\BCD, so that once booted the "external" BOOTMGR and \boot\BCDyou have a menu/pause loading the "internal" ones.

 

The "unknown" in both "device" and "osdevice" look "suspect" to me. :unsure:

 

:duff:

Wonko



#22 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 04 January 2019 - 09:38 AM

As Wonko says, the BCD that is actually used is the BCD inside the VHD.

That BCD needs to load the VHD because the mapped (hd0) BIOS drive disappears as soon as the Windows kernel is loaded and protected mode is used.

 

The alternative would be to copy \bootmgr and \boot folders to the USB drive and edit the \boot\BCD on the USB drive so that it loads the VHD.

 

(or simply copy the VHD to an Easy2Boot USB drive!).



#23 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 January 2019 - 01:56 PM

That BCD needs to load the VHD because the mapped (hd0) BIOS drive disappears as soon as the Windows kernel is loaded and protected mode is used.

That is the actual question/doubt :ermm: , the "virtual" (hd0) should actually be "hooked" by the SVBUS driver AFAICU, and as seen on the release thread:

http://reboot.pro/to...r-for-grub4dos/

(much in the way firadisk works, but without needing to have parameters passed to the driver)

 

If the \boot\BCD loads the VHD, it would IMHO become a sort of "mixed mode" between "grub4dos/svbus" and "native" booting. :w00t:

 

Now since it worked for everyone on that thread, there must be something "wrong" in either the (internal to the VHD) \boot\BCD or in the grub4dos commands executed (now that the mentioned Removable/Fixed issue is not relevant since the same setup doesn't work from USB hard disk, they may be a further issue, though).

 

In the above mentioned SVBUS thread, unless I missed some reports, both 7 and 10 worked, 8/8.1 were not tested, so it is possible that is something specific to 8/8.1 but I personally doubt it.

 

As a matter of fact - provided that the SAME VHD does work in "mem" mode, I am actually surprised that it works - I would have expected that for BOTH ("mem" and "filedisk") booting a "specific" \boot\BCD entry coming from  running bcdboot would have been needed.

 

:duff:

Wonko



#24 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 04 January 2019 - 06:27 PM

Since the SVBUS VHD works as a filedisk from an internal HDD but not from a USB HDD, it sounds like a USB driver issue.

Perhaps Win8 does not contain the required USB drivers for your particular system.

That is why I suggested testing with VBOX so that the USB drive would appear to be a SATA\IDE drive.

A USB driver issue would explain why mem works but not filedisk?

Or maybe SVBUS prevents the Win8 USB driver from hooking in.

 

Presumably if you do a mem boot, you can 'see' the USB drive under Windows?



#25 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 January 2019 - 06:46 PM

Since the SVBUS VHD works as a filedisk from an internal HDD but not from a USB HDD, it sounds like a USB driver issue.

Perhaps Win8 does not contain the required USB drivers for your particular system.

That is why I suggested testing with VBOX so that the USB drive would appear to be a SATA\IDE drive.

A USB driver issue would explain why mem works but not filedisk?

Or maybe SVBUS prevents the Win8 USB driver from hooking in.

 

Presumably if you do a mem boot, you can 'see' the USB drive under Windows?

Very possible :) , I missed that none of the reports on the mentioned thread were about USB disks/sticks, but I thought that Windows 8+ have *somehow* a very good USB support, even at boot time (better than 7, I think because of the Windows To Go added feature).

Maybe it is really some kind of "missed hooking" between SVBUS and the Windows 8 USB stack, but (again I may be well mistaken) I seem to remember that either Winvblock or Firadisk (or both) did actually work off USB sticks with Windows 8/8.1. :unsure:

 

 

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users