1 2 Previous Next 16 Replies Latest reply on Jul 8, 2010 12:41 PM by AspenSkier

    Restoring image with multiple partitions with imagew

    Apprentice

      i have captured an image with 2 partitions,  but when restoring the image on a smaller drive, i get a error:

       

      "The Selected destination is not large enough to restore %lu MiBs"

       

      Is there a way to set the first partition size to 40GB and the second partition to use the remaining disk space with imagew?

        • 1. Re: Restoring image with multiple partitions with imagew
          Apprentice

          The imaging tool is sector based which means it must restore the image in exactly the same way, so your image needs to have the partitions the right size or the image needs to be smaller than any of the potential target drives.

           

          Mark McGinn

          Verismic Software - http://www.verismic.com

          Precision Engineering for Systems Management

          Check Our New Power Manager Solution

          • 2. Re: Restoring image with multiple partitions with imagew
            Apprentice

            I recaptured the image with 20gb partitions,  And it will now work on smaller drives.  But it is splitting the drive in equal parts.  so if i put it on a 160gb drive, it makes two 80GB partitions.  And the same image on a 300gb drive made two 150GB partitions.  Is there a way to limit the first partition to 40gb and the second partition to use the remaining space on the drive?

            • 3. Re: Restoring image with multiple partitions with imagew
              Specialist

              I could use an answer to this one as well...

               

              ...how to use ImageW.exe version 2 to restore 2 partitions to a drive with the appropriate command line switches to specifiy what size each partition needs to be.

               

              I have the document which lists the command line switches available to imagew.exe, however it doesn't offer any examples to illustrate this particular scenario.  In fact it just lists swiches and descriptions, but nowhere does it suggest how multiple switches can be combined.

              • 4. Re: Restoring image with multiple partitions with imagew
                Jared Barneck SupportEmployee

                I think you have to use two separate commands.

                 

                The first command lays down the first image as is and doesn't expand the drive.  There should be a switch to expand the drive or not.

                 

                Then you have to use a second command to lay down an image to the free space.  I did this like three years ago with ImageW version 1 when 8.7 first released with WinPE and we didn't support multiple partitions.  Sorry, I don't remember much other than using two commands and the second command did something to put the partition in free space.

                • 5. Re: Restoring image with multiple partitions with imagew
                  Specialist

                  Okay...that is a good tip.

                   

                  I'm trying to break up the imaging operation into 2 parts within my provisioning template.

                   

                  the first part is as follows:

                   

                  imagew.exe /r /o /d:[email protected] /rs:50000 /f:I:\myimage.tbi

                   

                  where the /r is for RESTORE,

                  /o is for auto over-write of whatever may be on the drive,

                  /d:[email protected] is for specifying the 1st partition of the image file

                  /rs:50000 is to specify a 50GB partition size

                  /f is for the image file

                   

                  the second part is as follows:

                   

                  imagew.exe /r /o /d:[email protected] /x /rb:0 /f:I:\myimage.tbi

                   

                  where the /r is for RESTORE,

                  /o is for auto over-write of whatever may be on the drive,

                  /d:[email protected] is for specifying the 2nd partition of the image file

                  /x is to expand the partition to fill the remainder of freespace on the drive

                  /rb:0 is for a reboot, but I don't see "0" in the options for this switch (this was placed in the command by LDMS 9.0)

                  /f is for the image file

                   

                   

                   

                  The problem here is that when I execute this I get an error for the /d:[email protected] switch, showing [80001803h]the action failed, retun 8

                   

                  Using Imagew.exe, I have verified that my source image file has 2 partitions in it, 01 and 02.  I just can't seem to get imageW to accept the switch.

                   

                  -any additional ideas?

                  • 6. Re: Restoring image with multiple partitions with imagew
                    EMiranda Expert

                    try /d:[email protected]

                     

                    when i use imagew v2 and there times when i capture images and i only want a specific partition and I use /d:[email protected] and it works the way i want it.

                    • 7. Re: Restoring image with multiple partitions with imagew
                      Specialist

                      yeah I started out with /d:[email protected] and got the same error, so I tried 01 because the documentation for ImageW.exe said something about decimal or hex format of the partition number and it got me thinking I needed to try permutations of 1.  I also saw 01 listed in the image when I launched ImageW.exe to validate the image file.

                       

                      I'll try it again anyway.

                       

                      tried again with the same results.

                       

                      as soon as the image deployment window comes up I get this error

                       

                      UNABLE TO FIND THE DESIRED PARTITION ENTRY

                       

                       

                      I then get an error calling out the /d:[email protected] switch.

                       

                      so this still isn't working for me.

                       

                       

                      this is what is in the template:

                       

                      /r /o /d:[email protected] /rs:50000 /f:I:\myimage.tbi

                       

                       

                      I've tried repositioning the /o to go after the /d entry to no avail.

                      • 8. Re: Restoring image with multiple partitions with imagew
                        EMiranda Expert

                        I only read your last post to help you resolve your issue, i want to back up here and go to your orginal issue.  The 2nd partition that is D:\ drive. Is there any data on this drive? Do you just want a C:\  with your system image and then D:\ added for user data?

                        • 9. Re: Restoring image with multiple partitions with imagew
                          Specialist

                          Just so that you know, I'm not the OP; I have hijacked this long-silent discussion because it is identical to my current problem.

                           

                          Yes, I want C:\ to be a system drive and the 1st partition with a 2nd partition going to DATA.  The 2nd drive is supposed to be X:\, but that drive letter is already in use with WinPE so I'll have to assign it after the OS is down and running.

                          • 10. Re: Restoring image with multiple partitions with imagew
                            EMiranda Expert

                            and just to be clear your D:\ drive (DATA) is empty?

                             

                            1st partition = C:\drive (WINDOWS)

                            2nd partition = D:\drive (DATA) (EMPTY)

                             

                            there is a 2nd drive?

                            • 11. Re: Restoring image with multiple partitions with imagew
                              Specialist

                              There is a 2nd drive; it is NOT empty, but it doesn't have much it in it.  Mostly a pre-defined folder structure with very few files.

                              • 12. Re: Restoring image with multiple partitions with imagew
                                EMiranda Expert

                                I gotcha...now i never tried this...but this is kind of what I am piecing together in my head, let me know what you think...

                                 

                                Capture:

                                 

                                Disk 1:

                                 

                                • Capture the image of only the 1st partition, in your capture command you do this by /d:[email protected] (that is how i do it)

                                 

                                Disk 2:

                                 

                                • Capture the image on the whole 2nd disk, in this capture command you do /d:1 (if d:0 is the first hard drive, i can assume that d:1 is the second)

                                 

                                 

                                Restore

                                 

                                • First restore the 1st partition and make sure you take out the REMEXEC35=ldrun diskinfo extend_last_partition command from your OSD script because we dont want to extend the drive the whole partition
                                • Next use Diskpart to create and partition your 2nd Partition on the first disk (D:\Drive)
                                • Diskpart commands like this..
                                • Diskpart
                                • Select Disk 0
                                • Create Partition Primary
                                • Assign
                                • format FS=NTFS QUICK

                                 

                                Now you should have your 1st Disk with C: Drive with the size of the partition that you created it with, D: Drive with the Remaining space

                                 

                                Now do another imagew restore command to restore the 2nd image to /d:1

                                 

                                after that it could possibly be the way you want it, you might have to use diskpart again after the 2nd image is layed down to assign your 2nd drive a drive letter.

                                 

                                I dont have anything to test with...so just a thought...

                                • 13. Re: Restoring image with multiple partitions with imagew
                                  Specialist

                                  I'm terribly sorry; I got derailed along the way and mis-typed.

                                   

                                   

                                  I have only a single physical hard disk drive; this drive has two PARTITIONS which eventually need C:\ and X:\ drive LETTER assignments.

                                   

                                  This whole discussion is about multiple partitions, NOT multiple hard disk drives.

                                   

                                  sorry.

                                  • 14. Re: Restoring image with multiple partitions with imagew
                                    EMiranda Expert

                                    phewwww lol

                                     

                                    well i think the above would have worked...ill stick with it

                                     

                                     

                                    have you tried capturing your image in 2 different images

                                     

                                    1 with /d:[email protected]

                                    1 with /d:[email protected]

                                     

                                    then lay down 1st partition and then lay down 2nd partition

                                     

                                    to get around the X: drive assignment, you can add your diskpart assign command in your sysprep (guirunonce.ini or cmdlines.txt)  that should change your drive letter, i dont think you will have much luck doing it inside of winpe.

                                     

                                     

                                     

                                    ohh and anyone else feel free to chime in

                                    1 2 Previous Next