Jump to content











Photo
- - - - -

File Access anomolies on mounted images


  • Please log in to reply
5 replies to this topic

#1 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 25 December 2010 - 09:12 PM

OK, not sure if this is right forum area, since I can make this happen with Win7PE_SE project. While I haven't tried others, it could be similar to what is being described in this post

After a lot of messing with things, and thinking back on what I had done, I think I have the scenario that causes this, and it's related to the way different commands access the "file" system.

I was playing with the 0-Preconfig script, and executing just it (using the green arrow). This creates and mounts the images so it can do some basic checking. It doesn't UNMOUNT the images. When you run the project, the MAIN configuration script tries to clean up the temp area, and it is allowed to remove the mounted directories...this is done using the cmd command below...

If,EXISTDIR,%ProjectTemp%,Shellexecute,Hide,cmd.exe,"/C rd /s /q #$q%ProjectTemp%#$q"

The problem is that this doesn't remove the mounts! And later on, in the places where it checks to see if directories "exist", they appear to exist, but only to Winbuilder, and not to the explorer or the command window!

This causes the commands that try to create the directories to not get executed, and in fact, Imagex returns a status of 2 in this case (i.e. images already mounted).

To correct this, I had to manually recreate the paths, and then unmount the images.

I added in some traps in the 0-preconfig to trap this, and it tries to call the unmounting, but by that time, that also fails, since the path was "removed"...At this point, a reboot or manually creating the paths and unmounting is needed...

So, not sure where the "bug" lies here. Seems to me that you shouldn't be able to do an "rd" command if there are files mounted, or that you should not get a file "exists" if a mounted (but removed) path exists, and also not sure if this is a winbuilder thing or windows7 (x64) version OS issue...

If it is a WB bug, then we can just add it to the list of things to eventually look into (i.e. shouldn't be able to think that the dir "exists" if you can't see it with explorer) Of course if this is because the WIN API's give back the wrong answer, not much we can do about it.

To reproduce this, mount a Wim, then execute the above command - and see that the dirs are removed, but the wim is still mounted!

#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 25 December 2010 - 09:53 PM

I have had similar bad experience with mounted WIMs.

IMO the rd command does not actualize the internal 'Mounted' list, inspite you do not see something in the explorer. (Just my foolish feeling, no proof)

For me, I wrote a tool "cleanMountEx" which can solve most cases simplier and easier than your proposed method to rebuild "something mounted" and then to unmount.

You can download the tool here: http://nativeex.exec...leanMountEx.zip

Peter

#3 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 25 December 2010 - 10:01 PM

You can download the tool here: http://nativeex.exec...leanMountEx.zip

Thanks - I agree that recreating the path is a big PAIN in the @$$...It might be a good thing to look at as a part of the initialization before we remove the temp area...

And from what your saying, it looks like this is just a bug in the OS level... :whistling:

#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 25 December 2010 - 10:09 PM

It might be a good thing to look at as a part of the initialization before we remove the temp area...

I'll think about a cleanMountEx (command line) option to unmount an eventually mounted image before doing the mount with imagex to the same directory ...

Peter

#5 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10547 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 December 2010 - 12:56 AM

Hi Sbaeder,

I am also experiencing similar troubles as the ones you mention when handling WIM files under Windows 7 x64.

On my case, a simple mount and adding some changes is already enough to prevent the file from being correctly written back and even fully unmounted when instructed to do so.

I need to reboot the machine to repeat my experiments otherwise the folder used to mount the image remains locked.

I'll think about a cleanMountEx (command line) option

A nice GUI for that tool would come handy as well.. :)

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 December 2010 - 11:22 AM

A nice GUI for that tool would come handy as well.. :D

cleanMountEx is a GUI app. I was thinking about starting it with a command line switch to do something and not to come up as dialog. :)

More you can see here:

BTW: IMHO Wonko would add here "Read existing posts before posting" ;)

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users