Jump to content











Photo
- - - - -

can Grub4Dos boot raw hdd .img?


  • Please log in to reply
25 replies to this topic

#1 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 15 October 2011 - 02:00 AM

I want to make raw image of full xp on USB flashdrive and boot that .img file with Grub4Dos from HDD, is this possible?

thanks

#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 15 October 2011 - 08:07 AM

I want to make raw image of full xp on USB flashdrive and boot that .img file with Grub4Dos from HDD, is this possible?

thanks

Yes, only it won't boot. :whistling:

Or better, the grub4dos part and the real mode part will go allright :thumbsup:, but as soon as the protected mode will kick in you will get a nice BSOD, 0x0000007b :ph34r:.
I thought you were on the right track yesterday, I wonder WHERE exactly you lost yourself :frusty::
  • you NEED an XP driver capable of booting off a RAW image, please read as Firadisk or Winvblock or a similar one

:cheers:
Wonko

#3 Sphinx114

Sphinx114

    Newbie

  • Members
  • 19 posts
  • Location:Siberia, Russia

Posted 15 October 2011 - 08:22 AM

My experience: I'm install XP on virtual harddrive (XP.VHD). In this XP i'm install winvblock driver. Defragment XP.VHD. On real HDD installed Grub4Dos.

Booting XP.VHD:
title Boot from XP.VHD

map /XP.VHD (hd1)

map --hook

map (hd0) (hd1)

map (hd1) (hd0)

map --rehook

rootnoverify (hd0)

chainloader ()+1

More info here

I am assured that it can boot from usb, but I does not how. May be you need to use patched ntdetect.com or usbboot patch.

#4 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 15 October 2011 - 04:53 PM

hi Wonko, not lost.. Im on more than one track at a time thats all. Im using FiraDisk to boot in RAM but now I want to boot somehow a raw image.

hi Sphinx114, welcome to reboot.pro! I have XP in VM. I think it is .vdmk file not .VHD but Im not sure. I will check to see. to boot xp in usb I am using usboot.org with success. I think your suggestion for .VHD boot with Grub4Dos is what I have been looking for thank you I will try this.

I have recently downloaded Qemu manager since Wonko has shared some of the advantages it has over other VMs so I will try that also this way when I have a chance.

thanks

#5 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 16 October 2011 - 04:19 PM

so after more digging arround trying to find more info on the subject I try firadisk on usboot xp, then image it to raw with selfimage, then boot with Grub4Dos with this menu item:

title boot raw image
find --set-root /raw.img
map /raw.ing (hd0)
map --hook
chainloader (hd0)+1



and I get this error:

NTFS BPB found with 0xEB (jmp) leading the boot sector.
probed C/H/S = 126/255/63, probed total sectors = 2014928
chainloader /ntldr
Error 17: Cannot mount selected partition
Press any ley to continue...


I'll keep digging arround and trying stuff but if anyone knows what I should do let me know thanks

edit: noticed and corrected where I missed a shift key in the menu list entry example above

#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 16 October 2011 - 07:08 PM

then image it to raw with selfimage,
then boot

FOUR questions :dubbio::
  • Boot WHAT?
  • What is "it"? (disk or partition/volume)
  • Why selfimage?
  • HOW EXACTLY did you image "it"?

Hint:
before attempting booting, make sure that what you have made is a RAW DISK image (and NOT a "drive image" or a "partition image" or a "volume image").

:cheers:
Wonko

#7 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 16 October 2011 - 07:54 PM

thanks for the hint, thats probably the case here since I thought selfimage made raw images, I imaged with the "drive" option thinking that was what I needed for this.

FOUR answers:

1. what I thought was a raw image, thats what I want to boot anyway.

2. "it" is a usboot'ized XP on SD. I see now that may not work but my smallest flash is 4GB and my smallest USBHDD is 30GB I do have a IDE to USB adaptor and some really old IDE HDD that are ~2GB I could start from if that will be better?

3. because I thought self image made raw disk images.

4. I booted it in a card reader, my bios will boot this way with USB Memory option then I connected my USB HDD then I started selfimage and set c:/ as source and USBHDD partition 2 as target.

I really apreciate your input as allways. let me ask you some questions if I may:

1. if I image a disk in raw format does this include the unallocated space on that disk too? I think so but not certain.

2. what freeware/shareware that has GUI can I use to make a raw image that will boot via Grub4Dos?

3. what menu list entry for Grub4Dos will boot a raw image?

4. will a USB to IDE adaptor make the raw image different in any way than if I image directy with IDE connection?

5. do you know where I can find tips or tutorials related to what I am trying to do?

6. are the changes made on a raw image after it is booted from Grub4Dos persistant or not?


at this point I am trying to learn how I can image my usboot'ized, nearly universal xp so that I can boot that image. upon success I plan to make more images of different versions of my OS so that I can boot the one I need anytime from the same disc. (business or personal depending on the task)

thanks

#8 tinybit

tinybit

    Gold Member

  • Developer
  • 1117 posts
  •  
    China

Posted 16 October 2011 - 11:55 PM

The "Error" command is with "chainloader /ntldr", whereas your menu had "chainloader (hd0)+1" but no "chainloader /ntldr". Why?

#9 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 17 October 2011 - 02:58 AM

hi tinybit, this menu I copy from post by wonko: http://reboot.pro/14...048#entry126048

so sorry I can not answer "why". I have tried each menu item wonko suggested in this post. also without rebooting between each try and that seems to give different results sometimes but I am not sure in this case because I did not try rebooting.

I think the main problems I have here is because I do not know how to make a raw image correctly so I am searching for more information so I can learn about that now.

thanks

#10 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 October 2011 - 07:47 AM

Just for the record, the "WHAT" in "Boot WHAT?" was supposed to be "real machine", "Vmware", "Qemu", etc.

3. because I thought self image made raw disk images.

Well, it CAN do those, but if you tell it to make a drive image, it will - curiously enough - make a drive image. :whistling:

Before anything else, have you clear what a DISK is and what a DRIVE is? (and the difference between them?)
If you don' thave this clear it's like you are trying to make bread but without flour ;) (or, better, using sand instead of flour :ph34r:).

This initial mistake is more common than you might think, see if these help :):
http://reboot.pro/8804/page__st__503
http://www.911cd.net...showtopic=22984

Now, there is a nice, complete and tested approach, won't it be easier to follow it at first? :dubbio:
http://reboot.pro/9830/
http://reboot.pro/13731/

This way:
  • you will have something actually working
  • you will get familiar with tools and concepts
  • after you have had some success you can introduce your variations

:cheers:
Wonko

#11 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 17 October 2011 - 04:54 PM

I really apreciate all the helpful input here but I would like to point out that my initial question in this topics title has not been answered. yes/no

I also have some questions in my previous post addressed to wonko but if anyone else can answer any of them that would not only be very helpful to me but also other readers / searchers / lurkers of this topic at some point Im sure so please, if you can help...

at least I have a confirmation that selfimage can make a raw image and from further reading (Ive looked through all 20 pages of topics for related info in the Grub4Dos forum now) I found mention that dsfo can make raw image too but I am still a novice with commandline programs and I dont want to make huge mistake by not being certain of what Im doing first.

but right now I still dont know if Grub4Dos can boot a raw image and if it can do this then if it is like with booting .iso's in that some .iso work as-is and other .iso need prearangements.

about .VHD booting, is or can a .VHD be a RAW image also? because it may be subject for another topic or not so I dont want to confuse the issue further if I can avoid it.

Wonko, the "complete and tested approach" you linked to is great and lots of info on those topics but the longer threads tend to get "off point" I have already been reading and re-reading these topics but NO they are not easier to follow at first. that is why I started this topic.

I would like to eventually learn exactly what pmedia has but her instructions are not clear and precise enough. sure I could add to the confusion on those topics but lets try this one step at a time. break it down some and then when I can replicate what pmedia has done I will have left a trail of topics to follow that should/may be easier to follow for the newcomers.

so, back to the question in the title..

thanks

#12 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 October 2011 - 06:45 PM

The question in the title makes no sense by itself :ph34r:
Let's see if with Q&A we can get one step forward. :unsure:

Q.Can grub4dos map and boot a RAW DISK image?
A.Yes :fine:.


Q.Can grub4dos map and boot a .VHD DISK image?
A.Yes :thumbsup:, as long as the .VHD is "static" (NOT "dynamic"/"growing", NOT "differencing"); a "static" .vhd is NOTHING but a RAW DISK image with a single sector appended to it (that will be ignored by grub4dos booting - though will show you a "warning" message that can be hidden).

Q. Then, can grub4dos map and boot a RAW DISK image OR a .VHD DISK image of a XP install from a USB device (Hd or flash)?
A. Yes :smiling9:, BUT as soon as the "real mode" part of booting will give way to the "protected mode" part you will have a BSOD STOP 0x0000007b :ph34r: UNLESS you provide a suitable driver (Firadisk or WinVblock).
(and we are back to "square #1" :frusty:)

Q. Then, all that is needed is to add firadisk or winvblock or a similar driver to the image?
A. NO :(, unfortunately it is a very complex thing to do, you will need to go through a number of threads :w00t:, learn a lot of things that you seemingly right now haven't (yet ;) ) fully grasped, the advised (mind you long and winding) path is to try the approach wimb uses, and experiment with it as a base. And yes even plainly following the step by step instructions wimb :worship: provided and the pre-made little scripts and apps will be difficult, but IMHO it is the easiest one.

Can you answer this question (intentionally missing the answer :whistling:)?:
Q. Can you describe the difference between a RAW DISK image and a RAW DRIVE (or partition or volume) one?

Please consider the above NOT an attempt to somehow "spoil" your plan or "obstruct" your progresses, this is IMHO a BASIC point that until you haven't grasped it fully makes anything further "a suffusion of yellow".

:cheers:
Wonko

#13 Sphinx114

Sphinx114

    Newbie

  • Members
  • 19 posts
  • Location:Siberia, Russia

Posted 17 October 2011 - 07:29 PM

Interlocutors, your english with more bugs. I'm nothing understand :(

Zoso, open your raw.img in hex editor. What you see at start? Here MBR or PBR or another.
Structure ot this file should be similar to the real harddrive for successful booting.

Edited by Sphinx114, 17 October 2011 - 07:32 PM.


#14 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 18 October 2011 - 02:08 AM

my simple answer to your question wonko is that the image is a copy of the drive, one is a copy and the other is the real thing.

thankfully, Sphinx114 has provided some information that might allow me to answer the same question with a more detailed answer and another clue. so now I should learn how to look at both image and HDD and compare them with a hex editor.

while I was away I tried again with the same menu list item above but this time I used selfimage to make an image of the same usboot xp with firadisk except now I imaged from a real IDE HDD connected through a USB to IDE adaptor and got a different unsuccessful result:

(hd0,2)
Warning: total_sectors calculated from partition table(4128705) is greater than
the number of sectors in the whole disk image (4124736). The int13 handler will
not be able to read/write sectors(in absolute address, i.e., lba) 4124736 -
4128704, though they are logically inside your emulated virtual disk(accordin
g to the partition table).

probed C/H/S = 257/255/63, probed total sectors = 4128705
chainloader /ntldr

Error 22: No such partition

wonko, obviously you are withholding by not wanting to give any more options than to read wimbs instructions and thread. I think YOU make things more complex than they should be but I am not sure of why you do this, it could be for many reasons so I care not to guess and just accept that that is the way you are. difficult but helpfull anyway. I still apreciate what you have done and can do though. I will read it again looking for more clues but can you tell me if his proceedures will be successful if WinVblock is substituted with FiraDisk?

one of the main reasons I insist on learning to do this directly instead of using wimb's proceedure is that I have countless hours wrapped up in my XP going back years and so starting over with a fresh install is basically not an option. some of the tuning I have done to it I cant remember and it would take way more time than I have available to retrace my steps doing so.

Sphinx114, I have limited experience with using a hex editor. I do not know how to identify the differences between the image and the harddrive. where can I find information about how to do this?

thanks

#15 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 October 2011 - 08:25 AM

Zoso,
until you understand that a DISK image has as first sector a MBR and a DRIVE (or partition or volume) image - which is what you seemingly made - has as first sector a PBR or bootsector, you won't get anywhere. :(

You seemingly attempted to map a DRIVE image to a WHOLE DISK.

I gave you a link that should have hopefully explained this to you, I will try again, can you read a few posts starting from here?:
http://reboot.pro/8804/page__st__503
Particularly read - over and over if needed - this one:
http://reboot.pro/8804/page__st__508

Let's see if an example helps:
A "normal" hard disk, partitioned under any MS OS BEFORE Vista :ph34r: with a single partition will have:
Offset 0: First sector: the MBR <- this is the beginning of the DRIVE
Offset 1: Next 62 sectors: Hidden sectors
Offset 63: Next sector: the PBR of the partition <- this is the beginning of the DRIVE
Offset 64: Next n sectors (let's say 99,936): the actual DRIVE/partition/volume space
Offset 100,000: Next m sectors (let's say 1,000) : unused sectors <this is the END of the DRIVE

A DISK image of the above starts at 0 and is 101,000 sectos in size.
A DRIVE image of the above starts at 63 and is 99,937 sectors in size.

From the error you got in grub4dos, it seems like you made a DRIVE image and mapped it as if it were a DISK image, when you attempted chainloading (hd0)+1 (which NEEDS to be a MBR) grub4dos recognized a bootsector:

NTFS BPB found with 0xEB (jmp) leading the boot sector.
probed C/H/S = 126/255/63, probed total sectors = 2014928


:cheers:
Wonko

#16 tinybit

tinybit

    Gold Member

  • Developer
  • 1117 posts
  •  
    China

Posted 18 October 2011 - 06:28 PM

chainloader /ntldr

Error 22: No such partition


Recently a bug was fixed. You probably encountered the bug.

Try the latest grub4dos at http://code.google.c.../downloads/list

You should also update the grub4dos inside your IMGs.

#17 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 18 October 2011 - 10:33 PM

I had understood the differences slightly but your example here makes it much clearer thanks. the error changed after I re-imaged from an IDE HDD and the last attempt does not indicate BPB but a sector difference of 3969 sectors. obviously all the sectors were not reproduced in that image. I definately need to learn how to do what Sphinx114 suggests with a hex editor and I havnt found any information that deals with exactly that yet.

I've read in several places that selfimage is capable of making RAW images but I do not see that option. it has three radio buttons, one for file based, one for DRIVE based, and one for NBD base. I dont think selfimage is what I need for this task now.

something that can make a true sector to sector copy RAW image directly seems like the best option over a VHD but I am only finding reports of success booting VHD and not other type of RAW image so I may need to go that route. there is more information available for VHD too.

tinybit, I have updated to grub4dos-0.4.5b-2011-10-09 now so my next attempts I will use that one.

thanks

#18 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 October 2011 - 07:24 AM

Zoso,
the difference about size is NOT really an error,it is a warning,
Please re-read:
http://reboot.pro/15627/page__st__14

Those 3969 are most probably the m in the example.
A "real" DISK has always a number of unused sectors at the end that are not "indexed" on the MBR or in the PBR.
What grub4dos does when you point it to a DISK image is to check that data in the MBR and in the PBR are consistent and expects that there are NO such unused sectors at the end, if there are, it will display a Warning and continue happily :).

Again a .vhd IS a RAW disk image with one sector appended at the end.

There is NO problem whatsoever to convert back and forth between them.
We do have on the forum a nice app that can:
image a DISK (or a DRIVE) and that can convert between RAW and VHD.
Here:
http://reboot.pro/8480/

Now you need to learn that in Windows NT a DRIVE (or partition or volume) is identified by \\.\<driveletter>, like \\.\C:, \\.\D:, etc. while DISKs are \\.\PhysicalDriven like \\.\PhysicalDrive0 (first disk, usually boot disk) \.\\PhysicalDrive1, etc.

:cheers:
Wonko

#19 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 20 October 2011 - 12:16 AM

I getting close!
updated to the latest Grub4Dos and tried CloneDisk, another awesome program from a reboot member.. Thanks Erwin1! (and Wonko The Sane again) I used it to make a RAW.IMG first but also made a VHD from that RAW.IMG so that I could try both.

Im still learning with Grub4Dos but with this menu item:

title Boot from CloneDisk.IMG.vhd
map (hd0,3)/CloneDisk.IMG.vhd (hd0)
map --hook
chainloader (hd0)+1

it started booting but after hardware configuration selection I got BSOD error 6B, "PROCESS1_INITIALIZATION_FAILED"

ALMOST There! I have ran into this error in the past when first learning to boot from USB but it has been so long now I forgot what was the cause that time. I realize it could be something totaly different this time but I wish I could remember what it was then anyway.

now Im searching for more BSOD info. once I have success I will make an attempt at a tutorial since there doesnt seem to be one for booting RAW.IMG or VHD here yet.

the big deal about this to me is that I will be able to boot into several different versions of XP from the same disk. I have been doing this with a payware software called First-Defense ISR but it has for some reason dropped this capability and now only offers two OS boot options and not upto 10 as before but it also has problems with system encryption and support for the original version has also been discontinued.

Grub4Dos is the greatest of all! I wish I had more time that I could devote to study its capabilities. I will get the hang of it eventually but I only have so much free time for what is just a hobby for me. I have noticed that it has a "dd" command though, I dont know if this is the same "dd" as linux has but wouldnt it be great if it could be used to copy a disk and place the image on another disk and boot that! it may allready be possible for all I know but if not it is something to consider.

anyway, I cant Thank all the great reboot members enough! and I am only just starting to understand just how awesome Grub4Dos is but I do know it is number one software on all my systems now.

edit: I just remembered what was causing this error before and now I am sure it is the same problem. my ATI display drivers.. I had to remove them to have success booting in RAM and it is present in this image so I will now test with out this driver and report back.

#20 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 20 October 2011 - 04:12 AM

it wasnt the display drivers causing BSOD 0x6B so Im still looking for clues as to why Im getting this BSOD.

could be alot of things, this tricky AHCI system, something todo with the usboot changes, something to do with FiraDisk. all this can make it over-complicated for sure.

I would like to try a fresh install of XP then add FiraDisk and then make a raw image of that and try to boot it just to see if it works BUT I would have to put it on my internal SATA HDD which is 60GB so working with 60GB is out of the question and I cant connect the old 2GB IDE HDD to my system without the USB adaptor and then I would need to make the image USB bootable again. maybe its time to dig out my old desktop.. first I'll go read the wimbs thread again for clues. and maybe try to use WinVBlock instead of FiraDisk.


its never easy.

#21 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 October 2011 - 07:29 AM

its never easy.

Sure it is not :(, that's why I suggested to you to start from a tested base. :)

:cheers:
Wonko

#22 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 21 October 2011 - 06:39 PM

I seemed to remember that we had this EXACT same kind of conversation before :w00t: :frusty::
http://reboot.pro/8802/page__st__29
http://reboot.pro/8802/page__st__31

:cheers:
Wonko

#23 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 22 October 2011 - 05:19 AM

and what "kind" is that? they must be related in that some way right? I seem to remember you were much more helpful two years ago but what is the point of these last two posts of yours exactly? nevermind.

#24 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 22 October 2011 - 08:44 AM

and what "kind" is that? they must be related in that some way right? I seem to remember you were much more helpful two years ago but what is the point of these last two posts of yours exactly? nevermind.

It seems to me like a good 2/3 of the present thread was related to try having you fully grasp the differences between a DISK and a DRIVE, and I had the impression that CLONEDISK sounded to you as "news". BOTH these info were already provided, that's all.

:cheers:
Wonko

#25 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 22 October 2011 - 03:47 PM

OK, I see.. I looked at CloneDisk back then but I didnt actually use it successfully for that task and now Im learning more about VHD/RAW so now I have spent more time experimenting with both and CloneDisk. and in truth I had started to try it again because I read another referance to it in another thread related to VHD and was already using it at the same time you mentioned it here this time.

anyway, now it is much more useful since I understand more about it. this is all a huge puzzle and Im just now starting to see how some of the pieces fit.

now I am looking at IMG_XP again too and the process involved so that I can try to use parts of it to try and use it with my exsisting XP somehow but as usual it is slow going since I only have limited time to experiment with these things.

so even though you can make things (or seemingly to me) more difficult sometimes, with out your help (input on my postings) here at reboot I would have almost not help at all. so again, thanks (as usual) you are a (the) key member here.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users