Jump to content











Photo
- - - - -

ImDisk hang during DISM apply

dism hang bug

  • Please log in to reply
61 replies to this topic

#26 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 11 September 2014 - 01:29 PM

Just now I extracted the partition alone from a VHD to a file, mounted it on ImDisk, and successfully applied the Vista install WIM on it. I hadn't even corrected the sectors before.

 

Rules out something wrong with this particular ISO/WIM.

Good. :)

Then now you have to re-do it the same (with the same ISO/WIM) to the same image mounted with an offset from within the vhd.

 

Is this the same ISO/WIM that failed originally?

 

How big is size is this test image (the volume) you are currently experimenting the apply with?

How big in size was the one that failed originally?

 

You initially reported about a dynamic VMDK, you are now talking of a VHD (static, dynamic, what)?

 

Maybe is the "dynamic" nature of the container that caused the issue?

 

Personally (JFYI) I would not even THINK of using a "dynamic" VHD or VMDK, IMHO a disk or volume image should always be RAW (though of course using a sparse file for it is OK).

 

 

:duff:

Wonko



#27 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 12 September 2014 - 09:23 AM

Then now you have to re-do it the same (with the same ISO/WIM) to the same image mounted with an offset from within the vhd.
 
Is this the same ISO/WIM that failed originally?

Yeah it's the same ISO/WIM. So this is the original situation itself. I redid it again and it hung at 58%.

How big is size is this test image (the volume) you are currently experimenting the apply with?
How big in size was the one that failed originally?

ISO = 2.83GiB, WIM = 2.55GiB, final expanded size of Index 2 from WIM = 6.7GB

You initially reported about a dynamic VMDK, you are now talking of a VHD (static, dynamic, what)?
 
Maybe is the "dynamic" nature of the container that caused the issue?
 
Personally (JFYI) I would not even THINK of using a "dynamic" VHD or VMDK, IMHO a disk or volume image should always be RAW (though of course using a sparse file for it is OK).

VMDK was my original situation (stalled at 10/11%), then I tried with static VHD (immediately after I discovered the problem, stalled at 72%; just now, stalled at 58%). So it's not just dynamic.

Now we know that DISM doesn't have a problem with superfloppy images, it's obvious that ImDisk is exposing some difference in the mounted partition of the HDD image, as compared to the superfloppy image.

#28 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 September 2014 - 10:29 AM

Now we know that DISM doesn't have a problem with superfloppy images, it's obvious that ImDisk is exposing some difference in the mounted partition of the HDD image, as compared to the superfloppy image.

Not yet.

 

At least you have not specified if in all cases you set IMDISK to expose the "same" kind of device.

 

In IMDISK control panel you have these settings:

  • Auto
  • Hard disk volume
  • Floppy
  • CD/DVD-ROM
  • + "removable media"

With a "superfloppy" image the "Auto" should correspond to "Floppy" :unsure:, whilst with a partition it should correspond to "hardisk volume".

 

Logically, since the small image worked in both ways, the different behaviour must be *somehow* connected to either the "full size" of the image or to some peculiarity of the "real" .wim.

 

 

 

ISO = 2.83GiB, WIM = 2.55GiB, final expanded size of Index 2 from WIM = 6.7GB

Which is not really-really an answer to the questions asked:

 

 

How big is size is this test image (the volume) you are currently experimenting the apply with?

How big in size was the one that failed originally?

 

You tried with a "minimal" image (like 20 Mb or so) which worked BOTH when "superfloppy" AND when "volume on hard disk" and with a "full sized" partition (that failed) and later with another "full sized" superfloppy (which succeeded).

How big are these "full size" test images? (not the source you apply or the size of the source once applied, the size of the volume to which you apply the .wim)

 

If we put size of the images in a scale of 1 to 100, we know that "size 1" works in both ways and "size 100" works only as "superfloppy" (at least this is what you reported).

It would make sense to try a "size 25" and a "size 75" image to see if there is any connection with the size.

 

Maybe you can delete a number of files from the volume to which you applied the .wim and re-capture it (thys making a smaller .wim) to try applying it to a smaller image (it doesn't matter if the result will be bootable or not, here we are just troubleshooting the applying process).

 

Try running Winobj:

http://technet.micro...s/bb896657.aspx

and/or Olof's dosdev:

http://www.ltr-data.se/opencode.html/

with the one and the other images and see if you can spot any difference in the way they are enumerated in the OS.

 

Check also (possibly related):

http://reboot.pro/to...emount-ramdisk/

 

:duff:

Wonko



#29 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 12 September 2014 - 10:38 AM

Ah sorry, I should have been more careful.

I was operating on a 10GB VHD (and earlier VMDK of same size). It created a 32MB partition before automatically, I did not go to change that. The rest went to the partition I have been experimenting on, of size 1039036144 bytes. The smaller one was 30MB in size.

Maybe I should try deleting the 1st partition?

Hardlinks could have posed a problem, as you said, though I can't imagine how.

Also just confirming, ImDisk counts partitions from 1 right?

#30 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 September 2014 - 11:11 AM

Also just confirming, ImDisk counts partitions from 1 right?

I am not sure to understand the question.

But yes the entries are 1/2/3/4 AFAICR.

 

IMDISK control panel when you attempt mounting a volume should prompt you with a list of the volumes found, and you choose one.

Or are you using command line? (and if you are, why didn't you post the command lines used? :w00t:)

 

In any case I doubt that the volume position (first, second or nth) in the disk image can make a difference, as once the offset has been chosen, what is mounted should be exactly the same. :unsure: (and since the "previous partition" was so small it cannot be any hiccup with CHS/LBA, which might - in case - be around 512 Mb or 8 GB, nor - since the whole image is within 128 Gb - some kind of issue with LBA 28/48)

 

Since the "whole wim" creates once applied some 7 Gb of "occupied space", you could try:

  1. making a static RAW (not VHD, not VHDX, not VMDK) image around 20 Gb
  2. create in it two partitions around 10 Gb, exactly the same size
  3. dd one of them to a "superfloppy"
  4. test the applying to all three
  5. see which differences happen

The other "strange thing" as I see it is the "different progress percentage" before fail that you reported. :dubbio:(this sounds like a connection to the format used as "outer container")

 

 

:duff:

Wonko



#31 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 12 September 2014 - 11:30 AM

Ohh, now maybe here is a potential problem vector : I am using ImDisk Toolkit which has a partition selection GUI field to select. I'm quite happy for it, since I hate entering offsets by hand.

Anyway that is why I asked to confirm. The field is a "spinner", one where you can click up or the down arrow button to increment/decrement the partition number. It's starts from 0, hence the slight (1%) doubt.

#32 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 September 2014 - 11:46 AM

Well, then you need to try again, using the IMDISK control panel directly for the tests (or use command line).

The IMDISK toolkit is a nice addon but it might introduce (in perfect good faith and to the scope of easening the user experience) any kind of "different" behaviour.

Partition entries are traditionally numbered from 0 (in the DOS/windows world) but from 1 in the Linux world, and more or less any tool/connection uses the one or the other, there is no really "fxed" rule for it, AFAIK.

 

:duff:

Wonko



#33 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 12 September 2014 - 01:01 PM

The IMDISK toolkit is a nice addon but it might introduce (in perfect good faith and to the scope of easening the user experience) any kind of "different" behaviour.

Partition entries are traditionally numbered from 0 (in the DOS/windows world) but from 1 in the Linux world, and more or less any tool/connection uses the one or the other, there is no really "fxed" rule for it, AFAIK.

 

imdisk.exe:

 

-v partition
        Specifies which partition to mount when mounting a raw hard disk image
        file containing a master boot record and partitions.

        Specify number 1-4 to mount a partition from the primary partition
        table and 5-8 to mount a partition from an extended partition table.



#34 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 September 2014 - 01:30 PM

        Specify number 1-4 to mount a partition from the primary partition
        table and 5-8 to mount a partition from an extended partition table.

 

 

I am not sure to understand the question.

But yes the entries are 1/2/3/4 AFAICR.

 

 

I remembered right. :)

 

:duff:

Wonko



#35 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 12 September 2014 - 01:54 PM

I remembered right. :)

 

I just wanted to show that I follow the policy of Olof... In fact, the partition number in my GUI is directly transmitted to the command line tools (imdisk.exe or DiscUtilsDevio.exe).
That said, I can understand your annoyance if the one you are trying to help does not use the same tool.

Moreover, I just found a bug for an image file created with Arsenal Image Mounter, on which I created 2 partitions: my GUI is able to mount the second partition but not the first one.
But in case of a VDI file (so, mounted through DiscUtilsDevio), it works. Likely something obvious...



#36 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 12 September 2014 - 03:46 PM

That said, I can understand your annoyance if the one you are trying to help does not use the same tool.

There is not any "annoyance" :), just trying to get to the root of the issue, and find (if any) the actual culprit of this strange DISM behaviour.

 

Our friend milindsmart (very understandably BTW, as he is mostly driven by enthusiasm, which is a very good thing :thumbsup: ) is not (yet ;)) used to be very exact in his reports, and thus I have to apply some mild torture :w00t: :ph34r: in order to extract from him the info.

 

Of course, if by any chance it will come out that the issue is connected with the use of your toolkit, I will be the first one to propose a mild form of punition for you, I guess crucifixion :hyper: would probably do :whistling:.

http://www.imdb.com/...?item=qt0471984

 

:duff:

Wonko



#37 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 12 September 2014 - 05:04 PM

Of course, if by any chance it will come out that the issue is connected with the use of your toolkit, I will be the first one to propose a mild form of punition for you, I guess crucifixion :hyper: would probably do :whistling:.

 

I don't have followed everything, but it would be surprising that a DISM issue could be related to what I found.
The volume is properly mounted, or it is not mounted at all.

Here is the two bugs I have found:
- an incorrect check of the mounted volume that prevents imdisk.exe, when it is used, to mount the first partition of multi-partitioned image files (that is, with a MBR)
- an issue with the partition number set to 0 (for mounting the whole image file): DiscUtilsDevio handles it, but not imdisk.exe, and I forgot to check this case.

This should be easy to fix, with no side effect.

I think you will have to wait for the crucifixion. :)

 

 

Edit: the first bug has another consequence: .nrg and .sdi files cannot be mounted.
I wonder from how many time this bug is here, because I have a .nrg test file that I was able to mount a long time ago...


Edited by v77, 12 September 2014 - 05:15 PM.


#38 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 13 September 2014 - 02:03 PM

Well, then you need to try again, using the IMDISK control panel directly for the tests (or use command line).
The IMDISK toolkit is a nice addon but it might introduce (in perfect good faith and to the scope of easening the user experience) any kind of "different" behaviour.

Since I am using a VHD, I need to use DiscUtils presumably. ImDisk is certainly not showing any dialog box of its own asking me which partition to mount of the ones it has found. So I cannot test ImDisk alone. I could test the whole thing using command line, but I very seriously doubt that it will have any effect other than the mild torture you mentioned :D

OR, I can remove the last sector which would make the VHD a RAW HDD image, but I HATE that virtually every tool I tried is going to copy the WHOLE file and save it as a different filename, then deleting the original one, instead of just simply LINKING that cluster to a different filename record!

Please save me guys, any tool that stops worrying about fragmentation and avoids wastefully moving around GBs of data even when I'm trying remove 1 SECTOR?

#39 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 September 2014 - 02:17 PM

Please save me guys, any tool that stops worrying about fragmentation and avoids wastefully moving around GBs of data even when I'm trying remove 1 SECTOR?

 

HxD ?

 

Edit: by the way, I just upload a new version of ImDisk Toolkit with fixes for the bugs I was talking previously.
And about the interface of which Wonko was talking, you also can get it with the "Switch to Driver Interface" button of the mounting tool. In case of a multi-partition raw file, this will show the list of the partitions of which he was also talking.


Edited by v77, 13 September 2014 - 02:27 PM.


#40 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 13 September 2014 - 02:39 PM

HxD also took ages to save it when I moved 100MB of sectors. HxD works well when modifying without changing the length, but apparently is not smart enough for this.

Yeah I realized that only a RAW HDD image would allow ImDisk to show a list of partitions. I am using a fixed size VHD, which is a RAW image plus 1 sector. But when I used the driver interface, it showed the size as 2TB, with no prompt for partition.

#41 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 September 2014 - 03:59 PM

Look, there is something that simply does not sound right.

 

Maybe I am using an older version of IMDISK, but here it works fine.

 

A plain, standard, "static" VHD is a RAW image with one sector appended to it.

 

IMDISK (the plain, normal,. standard control panel app) should access a Standard VHD EXACTLY as if it was a RAW image since it will simply IGNORE the appended "Conectix sector".

 

Try changing the file name from .vhd to .img. <- I doubt that anyone may have included the extension into some form of autodetection of the file format, but you never know.

 

IF it still doesn't work, simply open the VHD image in *any*[1] hex/disk editor and fill the last sector with 00's. <- to all effects this will become a RAW hard disk image with an "excess" sector after the partitioned space.

 

:duff:

Wonko

 

[1]By *any* I mean here Tiny Hexer (or other hex editors that have an option to open an image file as "disk") .



#42 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 13 September 2014 - 04:07 PM

Just now I had another case of failure unwittingly : Arsenal Mounter resulted in the same problem with the same VMDK. I did not even expect it, I actually wanted to test something else on it.

I used the option to "mount through discutils".

And I think I MAY have got the answer here : I have been using GPT, not MBR. Could that have not been implemented in ImDisk's autodetection, but implemented in DiscUtils, and having some bug.

Sorry guys, I should have given this info earlier, but you would have if any of you tried replicating at any point : we could have debugged bit by bit.

#43 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 September 2014 - 04:40 PM

And I think I MAY have got the answer here : I have been using GPT, not MBR. Could that have not been implemented in ImDisk's autodetection, but implemented in DiscUtils, and having some bug.

 

Yes, ImDisk does not handle GPT.

I just tested a static multi-partitioned VHD file in MBR: the mounting tool (at least the last version) is working fine, and using "Switch to Driver Interface" shows the list of partitions inside the image.

 

I also tried to use GPT for this image file: it works with DiscUtils (so, with the mounting tool of ImDisk Toolkit), but you have to add 1 to the partition number, because the disk manager of Windows creates a hidden partition of 128 MB for each GPT disk.


Edited by v77, 13 September 2014 - 04:42 PM.

  • milindsmart likes this

#44 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 September 2014 - 04:42 PM

@milindsmart

 

Look. :)

I am using plain IMDISK.

Version 1.75 (I know).

Under XP SP2 (I know).

It opens fine GPT disk images (of course it sees ONLY the protective MBR 0xEE partition entry), BOTH as RAW images AND as "static" VHD's.

 

No IMDISK toolkit, no discutils, no .Net (madness ;)) involved. 

 

The ball is in your court.

 

:duff:

Wonko



#45 v77

v77

    Silver Member

  • Team Reboot
  • 602 posts
  •  
    France

Posted 13 September 2014 - 04:51 PM

@Wonko:

 

Does not work for me. The ImDisk control panel shows no list of partition for a static vhd partitioned with GPT. I only get an automatic offset of 1 block.


  • milindsmart likes this

#46 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 September 2014 - 05:06 PM

Well, it works here.

Actually it lists also a MBR partition entry with ID set to 00.

 

:duff:

Wonko

Attached Thumbnails

  • imdiskgpt.jpg


#47 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 13 September 2014 - 05:34 PM

I have never got any list at all! Using 1.8.4. How come?

#48 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 13 September 2014 - 05:59 PM

If this can help ...

 

-mounting a static vhd (MBR) works fine with IMDISK

-if that vhd has multiple partitions, IMDISK will ask me to choose which partition I want to mount

 

-mounting a static vhd (GPT) does not work (offset =1 sector, total size is wrong = 4294967295 sectors)

-if I input the correct offset and total size myself, then I can mount it

 

I have latest IMDISK version under Win7SP1.

 

A static vhd is a raw image with one extra sector which many mounting tools will ignore or at least it wont stop these tools to mount the static image as a raw image.


  • milindsmart likes this

#49 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 3041 posts
  • Location:Nantes - France
  •  
    France

Posted 13 September 2014 - 06:50 PM

I have never got any list at all! Using 1.8.4. How come?

 

ImDisk will popup a list if your image (MBR for sure, GPT not according to my experience) has multiple partitions.

Otherwise, not.


  • milindsmart likes this

#50 milindsmart

milindsmart

    Frequent Member

  • Advanced user
  • 201 posts
  • Location:Bangalore
  •  
    India

Posted 13 September 2014 - 07:36 PM

Thanks guys, now with multiple reports things are starting to get more interesting...

Well, it works here.
Actually it lists also a MBR partition entry with ID set to 00.

 

ImDisk will popup a list if your image (MBR for sure, GPT not according to my experience) has multiple partitions.
Otherwise, not.

Sounds like some sanity.

Possible reasons for the weird behavior :
  • GPT
  • DiscUtilsDevio
  • ...
Next experiment asap for me : try dism with mbr disk of exact same size and configuration.





Also tagged with one or more of these keywords: dism, hang, bug

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users