Jump to content











Photo
- - - - -

Please Help! Trying to boot vhd with grub4dos


  • Please log in to reply
5 replies to this topic

#1 Ziru

Ziru
  • Members
  • 4 posts
  • Location:Buenos Aires
  •  
    Argentina

Posted 19 August 2013 - 02:01 AM

Help please...
I have fully working Windows XP and Windows 7 on VirtualBox 
Vhd fixed.
 
I created the VHD in Windows 7 with this guide:
 

diskpart
[ENTER]
create vdisk file="f:\Windows.vhd" maximum=10240 type=fixed
[ENTER]
select vdisk file="f:\Windows.vhd"
[ENTER]
attach vdisk
[ENTER]
attributes disk clear readonly
[ENTER]
create partition primary offset=32 align=4
[ENTER]
attributes volume clear readonly
[ENTER]
active
[ENTER]
assign letter=V:
[ENTER]
format quick fs=ntfs label="Windows" unit=4096
[ENTER]
exit
[ENTER]
bootsect /nt52 v: /force /mbr
[ENTER]

 
but when i try to boot with grub4dos...

map /windows.vhd (hd0)
[ENTER]
map --hook
[ENTER]
chainloader /ntldr
[ENTER]
ERROR 17: CANNOT MOUNT SELECTED PARTITION


root (hd0)
[ENTER]
ERROR 17: CANNOT MOUNT SELECTED PARTITION

 


 

root (hd0,0)
[ENTER]
ERROR 17: CANNOT MOUNT SELECTED PARTITION

 

 

 

So, no matter what command i try, i only get this: cannot mount selected partition

Can someone help me, please?


Edited by Ziru, 19 August 2013 - 02:07 AM.


#2 genetix

genetix

    Frequent Member

  • Advanced user
  • 132 posts
  •  
    Finland

Posted 19 August 2013 - 02:38 AM

Hmm, you might wanna clarify few things..

 

1. when do you copy or install the XP / Windows 7 data to that VHD disk you try to mount ?

2. Where are you trying to mount it with grub4dos ? (USB? Internal HD?)

3. Is the 'Windows.vhd' at continuous space? (can't direct map fragmented image files.)

4. and so on.. could need quite a bit more information... Also Virtual Machine is quite a bit different than real hardware to boot on.


  • Ziru likes this

#3 Ziru

Ziru
  • Members
  • 4 posts
  • Location:Buenos Aires
  •  
    Argentina

Posted 19 August 2013 - 03:06 AM

Hmm, you might wanna clarify few things..

 

1. when do you copy or install the XP / Windows 7 data to that VHD disk you try to mount ?

2. Where are you trying to mount it with grub4dos ? (USB? Internal HD?)

3. Is the 'Windows.vhd' at continuous space? (can't direct map fragmented image files.)

4. and so on.. could need quite a bit more information... Also Virtual Machine is quite a bit different than real hardware to boot on.

 

 

1. I Installed Windows XP and Windows 7 on VHD on VirtualBox. i'm not copied anything.... 

2. i trying to mount it from a USB HDD... SeaGate 500GB.

3. mmmm the vhd was 23% fragmented.... i'lll defrag it now.

4. Please ask me any information that can be useful.

5?. Thanks you, genetix, for trying to help me.


Edited by Ziru, 19 August 2013 - 03:23 AM.


#4 Ziru

Ziru
  • Members
  • 4 posts
  • Location:Buenos Aires
  •  
    Argentina

Posted 19 August 2013 - 04:28 AM

 

 

3. mmmm the vhd was 23% fragmented.... i'lll defrag it now.

 

0% Fragmented now...

i still getting this on grub4dos: ERROR 17: CANNOT MOUNT SELECTED PARTITION



#5 genetix

genetix

    Frequent Member

  • Advanced user
  • 132 posts
  •  
    Finland

Posted 19 August 2013 - 04:31 AM

1. VirtualBox hardware is way different than 'real hardware' that image cannot boot without registry editing and full hardware support of what kinda of hardware you have in your real machine.

2. Well, USB-HDD is kinda still possible to be run from vhd with real hardware used while installing those systems to vhd.

3. Yeah, when you do Grub4dos 'direct Mapping' of image file it cannot have any fragments. Memory mapping is another thing but assuming your VHD is so big it won't even fit to memory. 

 

 

My advice is.. Create VHD with 'Wimb' Windows XP / 7 topic 'XP_IMG' and follow those instructions, if you have any applications or data at VirtualBox VHD / OSes copy them over at your current host system.

 

http://reboot.pro/to...-and-windows-7/

 

(I'm sorry but I don't have any USB-HDD's here to test)

 

In theory:

Diskpart

 

create vdisk file="f:\Windows.vhd" maximum=10240 type=fixed
select vdisk file="f:\Windows.vhd"
attach vdisk
create partition primary

format fs=ntfs label="Windows" quick
active
assign
exit
 

command prompt (Windows 7 DVD folder: "boot\")

 

bootsect /nt52 v:
 

* Grub4dos Install to USB-HDD f: and boot to USB-HDD

 

Grub4dos (menu.lst at F:)

 

title run from vHD

find --set-root --ignore-floppies /windows.vhd

map /windows.vhd (hd0)

map --hook

root (hd0,0)

chainloader /ntldr

boot

  

- However, this will not boot with same data at on VirtualBox that's for sure. You will in any case have to map the VHD > install the XP & Windows 7 ISOs from grub4dos to VHD.


Edited by genetix, 19 August 2013 - 04:55 AM.


#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 August 2013 - 09:58 AM

You seem to have both a well strange Windows 7 that boots through NTLDR. (instead of BOOTMGR) 

(and that uses the /nt52 bootsector). :dubbio:

 

@Ziru

An attempt to map a fragmented image in grub4dos should give you an "error 60", see:

http://reboot.pro/to...disk-emulation/

 

:cheers:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users