6 Replies Latest reply on Oct 14, 2010 6:49 AM by Jared Barneck

    PXE deployment via batch file

    Apprentice

      Hi all,

      I made a batch file to deploy a PXE ( to make it able to install it via provisioning)

      What I do I make a drive mapping (L:) to the LDMAIn share run the following commands in the batch file:

       

       

      MsiExec.exe /q /X{F238CE99-6614-4072-9D20-1D2FA7ED951A}
      xcopy "L:\landesk\vboot\ldlinux.img" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\files\bootmenu.1" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\files\bstrap.0" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\files\dosundi.1" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\bootmenu.0" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\dosundi.0" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\bzImage" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\pxelinux.0" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\default.boot" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\default.menu" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "l:\ldlogon\provisioning\linux\linuxpe.default.cfg" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\bcd" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\boot.sdi" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\boot.wim" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\bootmgr.exe" "C:\Program Files\LANDesk\LDCLient\" /Y
      xcopy "L:\landesk\vboot\pxeboot.0" "C:\Program Files\LANDesk\LDCLient\" /Y
      cd "%programfiles%\landesk\ldclient"
      sdclient.exe /p="http://LDMS/landesk/files/osdrep.msi" /msi /N /An /Ac /g="{F238CE99-6614-4072-9D20-1D2FA7ED951A}"
      LDISCN32.EXE /NTT=LDMS:5007 /S="LDMS" /F /SYNC /NOUI

       

      Everything looks to go fine, but when I start a machine in network boot, it cannot find the boot file ( see screenshot).

       

      When I use the normal PXE deployment script everything works fine. However, I don't see any differents in the batch file or the deployment script.

      What am I missing?? Thanks for your help!

       

      Jan

        • 1. Re: PXE deployment via batch file
          Employee

          Hi Jan ,

           

          R U sure you have the WinPE images on the machine after you deploy the PXE rep using the batch ?

          I think you should compare the C:\Program Files\LANDesk\PXE\ cotent with a working one. At first sigth view , looks that some *.img file

          is not listed in your batch.

           

          -Frank

          1 of 1 people found this helpful
          • 2. Re: PXE deployment via batch file
            Apprentice

            Hi Frank,

             

            The file startrom.0 was missing from the undi\winpe, undi\wpemenu and undi\prov_win directories.

            The strange thing is that those are not files that are being copied in the PXE_REP script, but proberbly generated via OSDREP.MSI.

            Thanks,

             

            Jan

            • 3. Re: PXE deployment via batch file
              Employee

              Hi Jan ,

               

              I would also reccomend to copy the files first and THEN , run the OSDREP.MSI

               

              Do you still get the same errors after that  ?

               

              Frank

              • 4. Re: PXE deployment via batch file
                Jared Barneck SupportEmployee

                Actually, let me show you the script I have:

                 

                ;  This file was generated by Desktop Manager
                [MACHINES_NT]
                REMEXEC0=MsiExec.exe /q /X{F238CE99-6614-4072-9D20-1D2FA7ED951A}
                REMCOPY1=%DTMDIR%\landesk\vboot\ldlinux.img, %LDMS_CLIENT_DIR%\ldlinux.img, TOREMOTE
                
                ;{These files installed by OSDRep.msi in the older version
                REMCOPY2=%DTMDIR%\landesk\files\bootmenu.1, %LDMS_CLIENT_DIR%\bootmenu.1, TOREMOTE
                REMCOPY3=%DTMDIR%\landesk\files\bstrap.0, %LDMS_CLIENT_DIR%\bstrap.0, TOREMOTE
                REMCOPY4=%DTMDIR%\landesk\files\dosundi.1, %LDMS_CLIENT_DIR%\dosundi.1, TOREMOTE
                REMCOPY5=%DTMDIR%\landesk\vboot\bootmenu.0, %LDMS_CLIENT_DIR%\bootmenu.0, TOREMOTE
                REMCOPY6=%DTMDIR%\landesk\vboot\dosundi.0, %LDMS_CLIENT_DIR%\dosundi.0, TOREMOTE
                REMCOPY7=%DTMDIR%\landesk\vboot\bzImage, %LDMS_CLIENT_DIR%\bzImage, TOREMOTE
                REMCOPY8=%DTMDIR%\landesk\vboot\pxelinux.0, %LDMS_CLIENT_DIR%\pxelinux.0, TOREMOTE
                REMCOPY9=%DTMDIR%\landesk\vboot\default.boot, %LDMS_CLIENT_DIR%\default.boot, TOREMOTE
                REMCOPY10=%DTMDIR%\landesk\vboot\default.menu, %LDMS_CLIENT_DIR%\default.menu, TOREMOTE
                ;}
                
                REMCOPY11=\\%CUSTJOBHOSTIP%\ldlogon\provisioning\linux\linuxpe.default.cfg, %LDMS_CLIENT_DIR%\linuxpe.default.cfg, TOREMOTE
                
                ;{These files are needed by winpe2.0
                REMCOPY12=%DTMDIR%\landesk\vboot\bcd, %LDMS_CLIENT_DIR%\bcd, TOREMOTE
                REMCOPY13=%DTMDIR%\landesk\vboot\boot.sdi, %LDMS_CLIENT_DIR%\boot.sdi, TOREMOTE
                REMCOPY14=%DTMDIR%\landesk\vboot\boot.wim, %LDMS_CLIENT_DIR%\boot.wim, TOREMOTE
                REMCOPY15=%DTMDIR%\landesk\vboot\bootmgr.exe, %LDMS_CLIENT_DIR%\bootmgr.exe, TOREMOTE
                REMCOPY16=%DTMDIR%\landesk\vboot\pxeboot.0, %LDMS_CLIENT_DIR%\startrom.0, TOREMOTE
                ;}
                
                REMEXEC17=<qt/>%LDMS_CLIENT_DIR%\sdclient.exe<qt/> /p="http://%CUSTJOBHOSTIP%/landesk/files/osdrep.msi" /msi /N /An /Ac /g="{F238CE99-6614-4072-9D20-1D2FA7ED951A}"
                REMEXEC18=<qt/>%LDMS_CLIENT_DIR%\LDISCN32.EXE<qt/> /NTT=%CUSTJOBHOSTIP%:5007 /S="%CUSTJOBHOSTIP%" /F /SYNC /NOUI
                
                [MACHINES_95]
                SETSTATUS=1240, ERR
                
                [OWNER]
                TYPE=OSDOTHERS
                

                 

                Now looking at your batch file, I see that you didn't do REMCOPY16 correctly.  You forgot the rename the file on transfer.

                 

                 

                 

                xcopy "L:\landesk\vboot\pxeboot.0" "C:\Program Files\LANDesk\LDCLient\startrom.0" /Y
                
                • 5. Re: PXE deployment via batch file
                  Apprentice

                  You are absolutly right, missed that one ! Thanks !!

                   

                  Jan

                  • 6. Re: PXE deployment via batch file
                    Jared Barneck SupportEmployee

                    No problem.

                     

                    That one caught me a time or two as it may be the only one that does a rename for whatever reason.