Jump to content











Photo
- - - - -

Booting from VHD in Grub4DOS


  • Please log in to reply
94 replies to this topic

#51 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 17 October 2012 - 06:16 PM

"5 user(s) are reading this topic
1 members, 4 guests, 0 anonymous users"



Now what is all this nonsense about.

VHD images are not quite raw. Maybe you're thinking of a flat vmdk file, which has two components:


[/size][/font][/color][/background][background=rgb(249, 249, 249)]

251904 Virtual Disk 3-flat.vmdk[/background]

     8 Virtual Disk 3.vmdk



The header information is stored in a teency little file there, and the -flat.vmdk is totally raw.


In the case of your equivalent VHD file, the header for the VHD file is stored at the beginning, and the MBR and everything else is pushed back.


[size=4]If they were really raw images, then Unix would be able to identify them:




nas:/Volumes/VHDs# file *vhd

WindowsXpVhdImportDiscUtilClone.vhd: Microsoft Disk Image, Virtual Server or Virtual PC

nas:/Volumes/VHDs# 


But if you're trying to say "They're RAW files, but with a small offset" then I would agree.

[color=#282828][font=georgia, serif][background=rgb(249, 249, 249)]Yes I know that this is a year too late, but I'm trying to google for that thing that loads VHD files directly... whatever it is... or does it load WIM files directly... I can't remember now... all I know is I'm sick of having to repair my VHD boot and I want to take it out on someone.


#52 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 October 2012 - 07:29 PM

Now what is all this nonsense about.
VHD images are not quite raw. Maybe you're thinking of a flat vmdk file, which has two components:
...

In the case of your equivalent VHD file, the header for the VHD file is
stored at the beginning, and the MBR and everything else is pushed back.


.....
But if you're trying to say "They're RAW files, but with a small offset" then I would agree.


"Static" VHD images are RAW images with a single sector appended to them.
This is a fact.

Try (among other similar tools):
http://labalec.fr/erwan/?page_id=42
http://reboot.pro/in...?showtopic=8480

:cheers:
Wonko

#53 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 17 October 2012 - 07:30 PM

...

Your quotes (see your first quote) and formatting (see your first code area) are very often wrong in your posts. You might consider previewing or reviewing your posts.

#54 sfinktah

sfinktah

    Frequent Member

  • Advanced user
  • 217 posts
  • Location:Der Äther
  • Interests:/(C(++|#)|P(HP|XE)|(OS|Linu)X|8051)/
  •  
    Australia

Posted 18 October 2012 - 10:06 PM

Damn, .. badly formatted and wrong. How embarassment.


# file crysis0.vhd



crysis0.vhd: x86 boot sector; partition 1: ID=0x7, active, starthead 1, startsector 63, 204800 sectors; partition 2: ID=0x7, starthead 0, startsector 208845, 40756273 sectors, code offset 0xc0, OEM-ID "	  м", Bytes/sector 190, sectors/cluster 124, reserved sectors 191, FATs 6, root entries 185, sectors 64514 (volumes <=32 MB) , Media descriptor 0xf3, sectors/FAT 20644, heads 6, hidden sectors 309755, sectors 2147991229 (volumes > 32 MB) , physical drive 0x7e, dos < 4.0 BootSector (0x0)




apologies to all.

#55 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 27 January 2013 - 01:36 PM

find --set-root /Myl33t7.vhd

map /Myl33t7.vhd (hd31)

root (hd31)

chainload /BOOTMGR

boot
Wonko

 

 

Wonko, I tried to boot my vhd as this menu, but I gor error 60.

 

 

 

title 0) w8x64 etg
find --set-root /_vhdx/w8x64.vhd
map /_vhdx/w8x64.vhd (hd31)
root (hd31)
chainload /BOOTMGR
boot
title
root

 

As you can see, I made a "windows 8 to Go" at vhd, and I linked G4D menu. But I got this error at booting vhd.

 

 

 

error 60, file for drive emulation must be in one contiguous disk are


#56 saddlejib

saddlejib

    Frequent Member

  • Advanced user
  • 270 posts
  •  
    United Kingdom

Posted 27 January 2013 - 03:26 PM

http://diddy.boot-la...s/files/map.htm



#57 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 27 January 2013 - 04:08 PM

And, for the record, when experimenting you NEVER use a menu entry BUT ALWAYS try each command on command line.

Once you will have solved the error 60 by defragging,and which now it is created by the line:

 

 

map /_vhdx/w8x64.vhd (hd31)

 

you will get another one, this time created by the the line:

 

 

root (hd31)

If your .vhd is that of a hard disk with one single partition in it,  you may want to try:

 

 

root (hd31,0)

instead.

 

:cheers:

Wonko


  • ZEE likes this

#58 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 28 January 2013 - 11:12 AM

/wanko,

 

 

I did as you showed, but the result is this.

 

 

 

 

 

w8x64 wtg1
(hd31,0)
 
Autodetect number-of-headers failed. Use default value 255.
Autodetect sectors-per-track failed. Use default value 63.
root (hd31,0)
Error 21: Sected disk does not exist.
 

 

And I made 30G fixed vhd, and restored "windows to go" with Acronis True Image Home. and the G4D menu is this.

 

 

 

title Previous Menu ...\n
find --set-root /HBCD/menu.lst
configfile /HBCD/menu.lst
title
root
title
root
#-------------------------------------------------------------------------
 
title 0) w8x64 wtg1
find --set-root /_vhdx/w8x64.vhd
map /_vhdx/w8x64.vhd (hd31)
root (hd31,0)
chainloader /HBCD/boot8
boot
title
root
 
title 0) w8x64 wtg2
find --set-root /_vhdx/w8x64fixed.vhd
map /_vhdx/w8x64fixed.vhd (hd31)
root (hd31,0)
chainload /BOOTMGR
boot
title
root
 
title 1) Mini Windows XP by Hiren CD and Hangul support !\n Very oldest system good usable ...
find --set-root /HBCD/XP/XP.BIN
chainloader /HBCD/XP/XP.BIN
title
root
 
title 2) Windows 7 by UserPE\nRun of Windows 7 PE
find --set-root /HBCD/boot7
chainloader /HBCD/boot7
title
root
 
title 3) Windows 8\nRun of Windows 8 PE
find --set-root /HBCD/boot8
chainloader /HBCD/boot8
title
root
 
title 4) USB Windows Setup (Vista to Win8) from Sources folder \nYou need Windows setup files in Sources folder.\nYou must rename or backup for \BOOT folder and copy here.
find --set-root /bootmgr
chainloader /bootmgr
title
root

 

 

And add this vhd with bcdedit:

 

 

 

 

But I got this error message from "w8x64 wtg2"

 

 

 

w8x64 wtg1
(hd31,0)
 
Autodetect number-of-headers failed. Use default value 255.
Autodetect sectors-per-track failed. Use default value 63.
root (hd31,0)
Error 21: Sected disk does not exist.


#59 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 28 January 2013 - 11:45 AM

Good, also expected.

 

Now WHY the disk "does not exist"? :dubbio:

 

Maybe because you did not take some time to read the guide and understanding how mapping works: http://diddy.boot-la...s/files/map.htm

(which was suggested to you).

 

You need to hook the mapping (and as said you should NOT use an entry in a menu.lst when experimenting), till now the errors you had were "foreseeable", but when they are not, it is important to know WHICH command produces the error. 

 

BTW the final "title" and "root" in each of your menu.lst entries make no sense and the boot command is ONLY needed on command line.

 

:cheers:

Wonko



#60 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 29 January 2013 - 05:56 PM

Wonko/

 

 

Thanks! Booted vhd.

 

 

 

title 3) Windows 8\nRun of Windows 8 PE
find --set-root /HBCD/boot8
chainloader /HBCD/boot8
title
root

 

 

and, this might works, but I could not remember.

title 0) w8x64 wtg2
find --set-root /_vhdx/w8x64fixed.vhd
map /_vhdx/w8x64fixed.vhd (hd31)
root (hd31,0)
chainload /BOOTMGR
boot
title
root

 

After understanding commandline, I understood the problem existed at windows vhd. I googled and read and tried several tips and guides, and the vhd was booted. But I could not write down the procedure, that's why I did so many things.



#61 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 30 January 2013 - 09:47 AM

On command line:
 
 
 

 
find --set-root /_vhdx/w8x64fixed.vhd
map /_vhdx/w8x64fixed.vhd (hd31)
map --hook
root (hd31,0)
chainloader /BOOTMGR
boot

if it works, then, as a title in  a menu.lst:
 
 

 
title 0) w8x64 wtg2
find --set-root /_vhdx/w8x64fixed.vhd
map /_vhdx/w8x64fixed.vhd (hd31)
map --hook
root (hd31,0)
chainloader /BOOTMGR

You ALWAYS need to hook the mapping.
On command line you need a final boot command.
In a title menu you NEED NOT a boot command, as it is "implied".

The command is chainloader, NOT chainload.

You DO NOT need/want the final title and root commands in the menu.lst , they simply make NO sense.

 

:cheers:

Wonko



#62 F...youidontcareanymore

F...youidontcareanymore

    Member

  • Members
  • 82 posts
  • Location:Adelaide
  •  
    Australia

Posted 03 June 2015 - 02:14 AM

Many moons later (years) i returned to booting a full XPSP3 from ram.

 

Using Oracle VM i setup XP on a 1.5GB VHD.

After install in VM updated driver such as "Intel PCI to ISA Bridge" and the like to standard M$ driver.

Installed Firadisk.

Defragged

Contigged

Shutdown

 

Compressed VHD with GZIP

 

menu.lst

title XPE VHD GZIP
map --mem (hd0,0)/XPE2.vhd.gz (hd0)
map --hook
root (hd0,0)
chainloader /ntldr

 

XP boots BSOD free as their is no imported foreign driver (VM setup installed drivers).

 

This is just a quick run down, next to boot vhd from hdd & add drivers.

 

4 Years late :)


  • ZEE likes this

#63 ZEE

ZEE

    Member

  • Members
  • 99 posts
  •  
    Portugal

Posted 03 June 2015 - 01:02 PM

:2nd: :3th: :1st: :cheerleader: :chair: :clap: :good: :yahoo: :stretcher: :fine: :mobile: :clapping: :happy_dance2: :rofle: :rofle: :rofle: :rofle:

 

BETTER LATE THEN NEVER...

 

Please shou this to Wonko and Sambul...

I'd like to see their insights in this matter...

 

 

 

 

 

Many moons later (years) i returned to booting a full XPSP3 from ram.

 

Using Oracle VM i setup XP on a 1.5GB VHD.

After install in VM updated driver such as "Intel PCI to ISA Bridge" and the like to standard M$ driver.

Installed Firadisk.

Defragged

Contigged

Shutdown

 

Compressed VHD with GZIP

 

menu.lst

title XPE VHD GZIP
map --mem (hd0,0)/XPE2.vhd.gz (hd0)
map --hook
root (hd0,0)
chainloader /ntldr

 

XP boots BSOD free as their is no imported foreign driver (VM setup installed drivers).

 

This is just a quick run down, next to boot vhd from hdd & add drivers.

 

4 Years late :)



#64 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 June 2015 - 01:26 PM

 

BETTER LATE THEN NEVER...

 

Please shou this to Wonko and Sambul...

I'd like to see their insights in this matter...

 

Define "insight". :unsure:

DoleBludger used to play with ramdisks many years ago, he is back now with a report of a new successful attempt.

There is no "insight" that I can add :dubbio:, at the most I can say "Welcome back :), good to know you made it :good: ".

 

:duff:

Wonko



#65 ZEE

ZEE

    Member

  • Members
  • 99 posts
  •  
    Portugal

Posted 04 June 2015 - 01:39 AM

Been reading the previous posts and saw the info you provided... :juggler:

 

Just want to know if you have some new pert of knowledge to add to this matter... :fish:



#66 F...youidontcareanymore

F...youidontcareanymore

    Member

  • Members
  • 82 posts
  • Location:Adelaide
  •  
    Australia

Posted 07 June 2015 - 02:57 PM

Anytime you install an operating system, it installs the drivers it sees as compatible to run & device services.

Usb for example has a configuration matrix for UPPER & LOWER Filters, depending the disk type, the controller & timing between the two.

Things such as a device filter can be mis-overlooked easily as their is no one reference machine to derive as a stand point.

 

As a general rule drivers in device manager that are generic are safer for our purposes.

 

Background services for drivers/devices should be restricted & tested individually.

 

:yess:

 

*Edit - This applies to all NT based operating system, Vista can boot from VHD.


Edited by DoleBludger, 07 June 2015 - 03:01 PM.


#67 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 07 June 2015 - 05:35 PM

*Edit - This applies to all NT based operating system, Vista can boot from VHD.

Interesting news. Are you referring here to what MS defines as "Native Boot"?

If yes, any tips? Might be useful as a means of adding support for booting Windows 7 editions other than Enterprise and Ultimate. Interestingly I just noticed that the "Deploy Windows on a VHD (Native Boot)" page states that this...
 

Applies To: Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2


No mention of Windows 7. Naughty, naughty MS - misleading and untrue!

Understanding Virtual Hard Disks with Native Boot also states that this "Applies To: Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2" - then later goes on to state that ...
 

What is VHD with Native Boot?

In Windows® 7 and Windows® 8, a virtual hard disk can be used as the running operating system on designated hardware without any other parent operating system, virtual machine, or hypervisor. Windows disk-management tools, the DiskPart tool and the Disk Management Microsoft® Management Console (Diskmgmt.msc), can be used to create a VHD file. A supported Windows image (.wim) file can be deployed to the VHD and the .vhd file can be copied to multiple systems....


Regards,

Misty

#68 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 June 2015 - 06:44 PM

@Misty

Had you missed it, there are NO actual "news" on this thread since it's post #2.

 

It has been senselessly revived, after 4 years, with an off-topic post about booting XP (and not 7) through grub4dos mapping (and not "Native" booting which can ONLY be done on 7 - and later - and only on some versions of the OS) with a further gratuitous and vague mention of Vista.

 

This whole thread is revolving around the same, old misunderstanding about the fact that "grub4dos+firadisk or Winvblock VHD booting" does NOT EXIST AT ALL, only "grub4dos +firadisk or Winvblock RAW booting" exists (and applies also to Windows 2000, just for the record, and theoretically could work also for NT 4.00 or earlier).

 

Native VHD booting is ANOTHER thing, and was introduced for the first time with Windows 7, as correctly stated on the mentioned post #2.

 

:duff:

Wonko



#69 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 07 June 2015 - 06:54 PM

@Wonko
Thanks for the clarification. Not sure if I was being lazy or optimistic when I asked about Native Boot (VHD) - I should have read the thread in full - unfortunatly I didn't as -
  • I'm lazy
  • The kid's are particularly distracting tonight
  • I have a hangover
  • I'm a bit distracted with some homework
  • Did I mention I'm lazy :whistling:
:cheers:

Misty

#70 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 June 2015 - 09:03 AM

And just to prove how things are dynamic, what I posted yesterday is not anymore true today as coincidentally karyonix just posted a modified grub4dos that can map --mem a dynamic VHD:

http://reboot.pro/to...mic-vhd-to-ram/

 

So, all in all we have a new way to have grub4dos actually do (dynamic) VHD booting :) (though still not "native"), and it is good to be proved (almost) wrong this way. :thumbsup:

 

:duff:

Wonko



#71 F...youidontcareanymore

F...youidontcareanymore

    Member

  • Members
  • 82 posts
  • Location:Adelaide
  •  
    Australia

Posted 08 June 2015 - 09:47 AM

I am using grub4dos-0.4.5c & firadisk-driver-0.0.1.30

 

"How to boot from VHD in Grub4DOS"


Edited by DoleBludger, 08 June 2015 - 09:53 AM.


#72 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 June 2015 - 10:43 AM

I am using grub4dos-0.4.5c & firadisk-driver-0.0.1.30

 

"How to boot from VHD in Grub4DOS"

And AGAIN, you are NOT booting from VHD, you are booting from a RAW image, as grub4dos interprets the Static VHD as if it was a RAW image and discards it's last sector (or actually any sector past the area actually allocated/indexed in the partition table entry corresponding to the partition(s) inside the VHD RAW image MBR) and it outputs a warning message similar to:

info: total_sectors calculated from partition table(4192965) is less number of sectors in the whole disk(4192966)

 

 

 

:duff:

Wonko



#73 F...youidontcareanymore

F...youidontcareanymore

    Member

  • Members
  • 82 posts
  • Location:Adelaide
  •  
    Australia

Posted 08 June 2015 - 10:51 AM

I see that when booting to ramdisk.

I don't see that when booting from disk.



#74 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 June 2015 - 11:05 AM

I see that when booting to ramdisk.

I don't see that when booting from disk.

Well you posted about your success in booting from ramdisk here:

http://reboot.pro/to...b4dos/?p=192955

 

So HOW EXACTLY are you "booting from disk"?

 

:duff:

Wonko

 

P.S.: to clear the scope of my posts, they are about two (hopefully) goals:

  1. calling things with their name
  2. provide as clear as possible, and not subject to possible misunderstandings, information that may be useful to other members


#75 F...youidontcareanymore

F...youidontcareanymore

    Member

  • Members
  • 82 posts
  • Location:Adelaide
  •  
    Australia

Posted 08 June 2015 - 12:00 PM

1) Created VHD under virtual disk management in win7 2GB

2) Formatted to NTFS slow

3) Unmounted

4) Attatched to VM

5) Installed XP

6) Detatched before first login

7) Attached to VDM

8) Loaded Hive &  disabled many services

9) Re-attached to VM

10) Installed firadisk

11) :dubbio: Tried booting from usb with grub :book: got to desktop and machine reset.

12) Tried again in safe mode .. got to desktop...paused...then reset

13) :lightbulb:

Failing to remember every step...

14) Loaded hive in 7

15) Removed usb filters

16) Booted to desktop from hdd (no mouse, no keyboard)

 

And that's as far as i could go in XP

 

And then lots more hours of frustration.

 

In 7/Vista you can't boot from VHD with firadisk enabled, you can only boot into memory with firadisk enabled :eek:

 

Any non VHD aware Vista+ require Virtual Disk Miniport & (i have a migrane) HBA & the following services removed;

 

......... (will add tomorrow) PS. rdyboost sucks






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users