13 Replies Latest reply on Jun 29, 2009 5:48 AM by Funky

    Mountrw and imagex


      I am having trouble mounting an image in provisioning.


      I have a task that if i run on a machine works perfectly.


      imagex /mountrw "m:\network path to wim file" 1 c:\mount


      I have created a c:\mount directory prior to this task running and have checked it is there.


      when i run the same command in provisioning as an Execute file task i get Error mounting image?


      I have tried the execute file task and the used the CMD c/ imagex /mountrw........etc and both give same result of fail.


      Has anyone used mountrw in provisioning successfully?? and if so how did you do it?


      Many thanks

        • 1. Re: Mountrw and imagex

          imagex /mountrw (or /mount - same thing) doesn't "just work". When you install WAIK, some of what gets installed includes a dll and a .sys file that seem to be required to make it work. I'm not sure exactly what it takes to make mount work, but it takes more than the image.exe executable.


          Just so happens, I was trying something similar a few days ago. If I find a way of doing it, I'll publish here...

          • 2. Re: Mountrw and imagex

            Getting warmer but not there yet...


            Again, what you're supposed to do if you want imagex in its full glory is install WAIK. If all you did is copy image.exe, then /capture and /apply will work, but some of the other stuff such as /mount and /mountrw won't. Here's a recipe that works for me in WinXP and Win2003 to get imagex fully functional:


            1. Copy following files: imagex.exe, wimfltr.sys, wimfltr.inf, wimgapi.dll. All of these are part of WAIK. You find them in the same folder after installing WAIK.

            2. Create install.cmd with following content:


            set dir=%~dp0
            rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %dir%wimfltr.inf
            net start wimfltr


            If that first line looks mysterious to you, all it does is set a variable to the folder in which the batch file lives. This is needed because the rundll32 command requires the full pathname of the inf.


            You can now take the 5 files to a WinXP or Win2003 machine, run install.cmd and you get a fully functional imagex. However, when I try this in WinPE, imagex still can't mount. Other people report this working, but only in WinPE 2.x.

            1 of 1 people found this helpful
            • 3. Re: Mountrw and imagex
              zman Master

              Once you get all this straightened out you can use this http://www.autoitscript.com/gimagex/ to help mask all the CLI stuff.

              • 4. Re: Mountrw and imagex

                Jan thats great news!


                I was thinking it was the fact it was being invoked from a remote machine ( the Landesk server ) but it makes sense as my tests were run on a machine with WAIK installed so the extra dll's etc would be accessible.


                Right i am copying them over and setting up the tasks now. havng trouble locating imagex.dll though... it isnt in the WAIK folder \s for some reason.


                Still looking....


                Will post my results too.

                • 5. Re: Mountrw and imagex

                  Oops - sorry - I meant imagex.exe, not imagex.dll. There is no such thing as imagex.dll. I have corrected the post above.

                  • 6. Re: Mountrw and imagex

                    Ha no problem!


                    Right i am just injecting those files into my PE image inc the install.cmd and will create a provisioning task to run and see what happens when it hits the mountrw task...


                    Thanks again

                    • 7. Re: Mountrw and imagex

                      Right i think i have hit a stumbling block...


                      If i run the install.cmd in WinPE manually like so




                      ( i have copied all files inc rundll32 setupapi etc into the x:\ldclient folder )


                      I get this


                      Installation Failed


                      Then i get The service name is invalid when it runs net start wimfltr.


                      I have also looked and I am running Server which i believe does not use WinPE 2.x but 1.1 ?? correct me if i am wrong.


                      So it appears that it wont work for me at all... unless I am diong something wrong OR i can upgrade my version of WinPE on the server - is this possible or not worth touching due to the way Landesk incorporates WinPE..


                      I have HII imaging working like a charm with XP and if i can get the image mounted and the drivers injected before the WIM is deployed I can have Vista also... hence the requirement to modify the Wim file after the machine model \ drivers to be injected are identified.

                      • 8. Re: Mountrw and imagex

                        Ok getting somewhere - again i think!


                        I have got the files to register and started the service wimfltr successfully. I still get a failed message when trying to mount the wim file


                        Now however if i run this from the WinPE console.


                        imagex /mountrw "m:\network path to wim file"  1 c:\mount


                        i get the following error


                        There is not enough space on the disk.. but i am not sure why does anyone know what that is referring to as my HDD is 40GB and has over 30GB free.


                        Any ideas?


                        Is that the limitation of WinPE 1.x  ?

                        • 9. Re: Mountrw and imagex

                          It's probably talking about the RAM drive when it's complaining about disk space - not about the HD. You can start by deleting a couple of files that are only needed at boot time (winpe.bmp, ntoskrnl.exe, ntkrnlmp.exe). That buys you a couple of MB. If that's not enough, increase the free space in your WinPE image.

                          • 10. Re: Mountrw and imagex

                            Just got it working. Turns out you need one more DLL: fltlib.dll. This is not part of WAIK. You find it in on regular WinXP / Win2003, but not on WinPE 1.x. Just copy it from a Win2003 server and you're in business.


                            I didn't have problem with free space on the RAM drive. I had just under 3 MB available on X: at the time it worked. My mount point was on the C: drive and my image was on a network drive.

                            • 11. Re: Mountrw and imagex

                              Correction: when I posted the previous message announcing success, that was for a /mount. When I next tried a /mountrw, I did indeed get that error message "not enough space". I deleted the 3 files that I mentioned above, which increased available space to 8.5 MB. That was enough for a successful /mountrw.

                              • 12. Re: Mountrw and imagex

                                Jan that is superb.


                                I actually delete those three files later on in provisioning so have just moved it forward and indeed it works!




                                Have you tried unmounting the image?


                                I get the space error and i have added 20MB to the PE image now too. So i have 29MB of free space. and i get the error


                                There is not enough space on the disk.


                                My concern is that i may need alot more space in RAM to commit the changes - 29MB free space is alot for the RAMdisk image -


                                I obviously dont want to expand the image to much!

                                • 13. Re: Mountrw and imagex

                                  Ok done it...


                                  I have upped the RAM image to 79MB free space!


                                  I am now going to work my way backwards to see where the cut off point is.


                                  My question is does anyone know if the increase in size to allow the image to unmount is based on the amount of drivers you inject ? And i dont mean physical size of the drivers but the size of a log file it may create when wanting to commit the changes?


                                  I have not specified create log file on commit only on the inject command that runs the driverunattend.xml


                                  I will post the limit for the space required to unmount