Jump to content

kai4785

Member
  • Posts

    24
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by kai4785

  1. I'm looking for confirmation on a theory. I am trying to run Windows Server 2008 R2 in a virtual machine, which is to say that the Disk and Network drivers are not included in the standard Win2k8R2 dvd. I intend to do full unattended installations inside the KVM Guests using the Virtio device drivers from RedHat.

    The problem is that if I PXE boot WinPE, the Network card does not have an appropriate driver. If I install the drivers into the winpe.wim file ( with the instructions here http://technet.microsoft.com/en-us/library/dd744355%28WS.10%29.aspx ), the WinPE environment has drivers, but after the install, the OS is missing the drivers.

    If I use a different virtual NIC (say e1000 from Intel), WinPE has the NIC driver, but not the disk driver. If I use the unattended XML file to point to the 'Out-of-Box Drivers' from WSIM,

            <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DriverPaths>
    <PathAndCredentials wcm:keyValue="ff025ef0" wcm:action="add">
    <Path>Y:\images\win2k8r2_distribution_share\Out-of-Box Drivers</Path>
    </PathAndCredentials>
    </DriverPaths>
    </component>

    The Disk driver is not only used in WinPE, but it's also installed to the OS.

    I would like to be able to add both drivers during the unattended process. Do I need to use DSIM to install the drivers into both winpe.wim and install.wim? Or is there another way to force the installer to make sure it installs drivers from the network share if the OS install image does not have them?

  2. I think this is exactly what I'll need. If I can get this integrated the way that I think I want it to, you've just made me a very happy camper.

    Leave it to me to complain for weeks about how certain things can't be done, and then walk away for a month only minutes before a solution is presented. Curse my luck!

    This VBscript can download HTTP files without any 3rd party tools. If you ask nicely, maybe someone would modify this to work with an external csv or text file. Then it could download all your files, and you'd be able to edit your list with notepad.

    See robvanderwoude.com for greater detail

    HTTPDownload "http://download.microsoft.com/download/4/A/A/4AA524C6-239D-47FF-860B-5B397199CBF8/windows-kb890830-v3.6.exe", "C:\"

    Sub HTTPDownload( myURL, myPath )
    ' This Sub downloads the FILE specified in myURL to the path specified in myPath.
    '
    ' myURL must always end with a file name
    ' myPath may be a directory or a file name; in either case the directory must exist
    '
    ' Written by Rob van der Woude
    ' http://www.robvanderwoude.com
    '
    ' Based on a script found on the Thai Visa forum
    ' http://www.thaivisa.com/forum/index.php?showtopic=21832

    ' Standard housekeeping
    Dim i, objFile, objFSO, objHTTP, strFile, strMsg
    Const ForReading = 1, ForWriting = 2, ForAppending = 8

    ' Create a File System Object
    Set objFSO = CreateObject( "Scripting.FileSystemObject" )

    ' Check if the specified target file or folder exists,
    ' and build the fully qualified path of the target file
    If objFSO.FolderExists( myPath ) Then
    strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev( myURL, "/" ) + 1 ) )
    ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, "\" ) - 1 ) ) Then
    strFile = myPath
    Else
    WScript.Echo "ERROR: Target folder not found."
    Exit Sub
    End If

    ' Create or open the target file
    Set objFile = objFSO.OpenTextFile( strFile, ForWriting, True )

    ' Create an HTTP object
    Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )

    ' Download the specified URL
    objHTTP.Open "GET", myURL, False
    objHTTP.Send

    ' Write the downloaded byte stream to the target file
    For i = 1 To LenB( objHTTP.ResponseBody )
    objFile.Write Chr( AscB( MidB( objHTTP.ResponseBody, i, 1 ) ) )
    Next

    ' Close the target file
    objFile.Close( )
    End Sub

  3. Ok, got it, here's my new ultravnc.ini file:

    [Permissions]
    [admin]
    AuthRequired=0
    HTTPConnect=0
    [ultravnc]
    [poll]
    TurboMode=1
    PollUnderCursor=0
    PollForeground=1
    PollFullScreen=0
    OnlyPollConsole=0
    OnlyPollOnEvent=1
    MaxCpu=40
    EnableDriver=0
    EnableHook=1
    EnableVirtual=0
    SingleWindow=0
    SingleWindowName=

  4. Ya, that was my sad conclusion. However, I wasn't satisfied. I knew there were other VNC Servers to use, and I knew that UltraVNC was the first to support Vista/7 machines, which is why I still use UltraVNC on my machines at home.

    So here's how I was able to get UltraVNC to work properly in WinPE.

    Download the .zip file with binaries: X64 bins 1.0.8.2 Full

    Extract to your favorite location. The only files you need from the zip are:

    vnchooks.dll
    winvnc.exe

    Then you need a new file called 'ultravnc.ini'

    [Permissions]
    [admin]
    [ultravnc]
    passwd=142EBA5011866EF243
    passwd2=142EBA5011866EF243
    [poll]
    TurboMode=1
    PollUnderCursor=0
    PollForeground=1
    PollFullScreen=0
    OnlyPollConsole=0
    OnlyPollOnEvent=1
    MaxCpu=40
    EnableDriver=0
    EnableHook=1
    EnableVirtual=0
    SingleWindow=0
    SingleWindowName=

    Unfortunately I don't have a good way to tell you how to generate the password. I'm also looking into a password-less setup. I'll post an update when I do. I generated this password when I installed the VNCServer on my machine, to steal the ultravnc.ini file.

    Put all 3 in any folder you want, and execute '<path>\winvnc.exe -install' . I've had success running from a network share (ie: Y:\Boot\custom_winpe_files\winvnc.exe -install) as well. You can pack these into your winpe.wim file if you care:

    imagex /mountrw C:\winpe_amd64\winpe.wim 1 C:\winpe_amd64\mount
    copy /Y C:\Boot\custom_WinPE_files\uvnc\* c:\winpe_amd64\mount\Windows\System32\
    Imagex /unmount /commit c:\winpe_amd64\mount

    There's lots of stuff you can put into your ultravnc.ini. Here's a link to their documentation: ultravnc.ini

  5. I'm running 64bit WinPE so I can install Windows Server 2008 R2 (which only comes in 64bit flavors). When I run winvnc4.exe, I get the error:

    "The subsystem needed to support the image type is not present."

    I've looked around for a few minutes, but haven't found anything useful yet.

    Are you guys getting this to work in 64bit WinPE?

  6. Great, I have a use for both of them.

    Is there a better way to list what components can be run in what Pass? For example, the current component list is alphabetical by component name. Is there a way to list each pass, and valid components for that pass?

  7. @midiboy

    Funny, I accidentally did exactly what you want to do. I wanted a fully automated install, including choosing the version of OS to install. Where I got to first was fully unattended, minus choosing the OS, and adding Key.

    Simply remove The windowsPE->ImageInstall->OSImage->InstallFrom component, and the Product Key from your Unattended XML. In both cases, if they are missing, the installer will prompt for the answers. You can leave the "InstallTo" and the "DiskConfiguration" components.

  8. Do you want to just partition the disk, and still offer the user the ability to select the disk? I think it needs to go into your boot-image (WinPE.wim or install.wim) in startnet.cmd (either a call to a new script, or right in there). I think that's there in the install.wim, but I'm sure it's there in the WinPE.wim.

    I can't find anything for the unattended xml file that gives you the ability to run custom scripts in the WinPE stage. I am curious what you end up doing.

  9. Perhaps the option to run custom scripts at different stages of the install would be my best option. Do you have any scripts that you know work on a Windows Server 2008 that I could test in WinPE? I would prefer to avoid anything highly custom (like installing wget, or any other non-Microsoft software) and limit myself to the tools available via WAIK.

    @arwidmark

    MDT is over kill for my needs. I don't need a management infrastructure. I'm releasing the servers I build into the "wild" so to speak. Once they are installed, I never see them again. A simple OS install will fit my needs. Meaning, I would prefer to use a thumb tack when appropriate, instead of running around with a Nail gun for all my picture hanging needs :)

  10. In order to do an Unattended Win2k8R2 install via the network from a Linux server, I boot into WinPE with an added batch script to mount the network share where the unpackaged DVD iso is, and run 'setup.exe /Unattend:file.xml' from the network share directory.

    I would like to be able to track the progress of the install. With Linux, I have a 'pre' and 'post' install section where I can add custom scripts, and in both cases, the program 'wget' is available, so I just use it. I can envision two possible solutions, but I don't know how to implement either of them.

    1) Use WinPE to run a script that will simply make a request to a specified URL. I will probably send the mac address of the machine as the unique identifier through a GET variable to make things simpler. The equivalent of

    wget http://pxe/update.php?mac=12-34-56-78-90-12

    2) Enable Remote Logging somehow. If WinPE can use Syslog (which I doubt) I'd love it.

    Right now what I'm doing is watching DHCP requests, and counting them as they show up. I'm absolutely sure there's a much better way.

  11. I totally feel your pain. I've spent many many hours trying to do exactly what you're doing. The good news is that I just finished up putting my final touches on this project last week.

    So here's the parts of the puzzle I think you might be missing. As a point of clarification, there are two lines in the following script that will probably fail. I modified the original 'startnet.cmd' file to add a call to 'mac.bat', and then added the 'mac.bat' script to my WinPE.wim file. I use these two script to mount my SMB share, cd to the installer directory, and run setup.exe with an unattended file. If you'd like a copy of those scripts, I can add them, but you don't need them to start WinPE.

    Also, don't forget to change the GUID to the return value of the BCD creation command. I've yet to go back to the script, and rewrite it to capture the GUID. I plan to do it at some point, just haven't gone back to it yet.

    # Run this from the Windows Machine that has WAIK installed.

    #Mount the TFTP root of the Linux Server via SMB
    net use Y: \\pxe\REMINST

    # Create and copy over the WinPE image (renamed to boot.wim)
    copype.cmd amd64 c:\winpe_amd64
    imagex /mountrw C:\winpe_amd64\winpe.wim 1 C:\winpe_amd64\mount
    copy /Y c:\winpe_amd64\mount\Windows\Boot\PXE\*.* Y:\Boot
    copy /Y Y:\Boot\pxeboot.n12 Y:\Boot\startrom.0
    copy /Y Y:\images\WINDOWS_ISOS\startnet.cmd c:\winpe_amd64\mount\Windows\System32\startnet.cmd
    copy /Y Y:\images\WINDOWS_ISOS\mac.bat c:\winpe_amd64\mount\Windows\System32\mac.bat
    Imagex /unmount /commit c:\winpe_amd64\mount
    copy /Y c:\winpe_amd64\winpe.wim Y:\Boot\boot.wim
    copy /Y "c:\Program Files\Windows AIK\Tools\PETools\amd64\boot\boot.sdi" Y:\Boot

    #Create the BCD
    Bcdedit -createstore c:\winpe_amd64\BCD
    Bcdedit -store c:\winpe_amd64\BCD -create {ramdiskoptions} /d "Ramdisk options"
    Bcdedit -store c:\winpe_amd64\BCD -set {ramdiskoptions} ramdisksdidevice boot
    Bcdedit -store c:\winpe_amd64\BCD -set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
    Bcdedit -store c:\winpe_amd64\BCD -create /d "Fibernet WinPE Boot Image for Unattended Installs" /application osloader

    #The last command returns a unique GUID string that needs to be used in later commands:
    # The entry {ea0be71a-4bf4-11df-aecf-c21c162604c3} was successfully created.
    Bcdedit -store c:\winpe_amd64\BCD -set {6a81174a-4d52-11df-b87f-e53851c295c4} systemroot \Windows
    Bcdedit -store c:\winpe_amd64\BCD -set {6a81174a-4d52-11df-b87f-e53851c295c4} detecthal Yes
    Bcdedit -store c:\winpe_amd64\BCD -set {6a81174a-4d52-11df-b87f-e53851c295c4} winpe Yes
    Bcdedit -store c:\winpe_amd64\BCD -set {6a81174a-4d52-11df-b87f-e53851c295c4} osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
    Bcdedit -store c:\winpe_amd64\BCD -set {6a81174a-4d52-11df-b87f-e53851c295c4} device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
    Bcdedit -store c:\winpe_amd64\BCD -create {bootmgr} /d "Windows BootManager"
    Bcdedit -store c:\winpe_amd64\BCD -set {bootmgr} timeout 30
    Bcdedit -store c:\winpe_amd64\BCD -displayorder {6a81174a-4d52-11df-b87f-e53851c295c4}
    copy c:\winpe_amd64\BCD Y:\Boot

    You want to do the amd64 one because it will do both the amd64 and x86 installs. The opposite is not true.

    Then my tftp remap file, and xinetd.d/tftp file.

    # cat /etc/tftpd.rules 
    r ^\\cdrom\\i386\\pcntpci5.sys pcntpci5.sys
    r ^\\\\i386 i386
    rg \\ /
    r KDCOM.DL_ kdcom.dl_
    r KDCOM.DLL kdcom.dll
    r BOOTVID.dl_ bootvid.dl_
    r BOOTVID.dll bootvid.dll
    r SETUPREG.HIV setupreg.hiv
    r SPDDLANG.SY_ spddlang.sy_
    r SPDDLANG.SYS spddlang.sys
    r WMILIB.SY_ wmilib.sy_
    r WMILIB.SYS wmilib.sys
    r 1394BUS.SY_ 1394bus.sy_
    r 1394BUS.SYS 1394bus.sys
    r PCIIDEX.SY_ pciidex.sy_
    r PCIIDEX.SYS pciidex.sys
    r USBPORT.SY_ usbport.sy_
    r USBPORT.SYS usbport.sys
    r USBD.SY_ usbd.sy_
    r USBD.SYS usbd.sys
    r HIDCLASS.SY_ hidclass.sy_
    r HIDCLASS.SYS hidclass.sys
    r HIDPARSE.SY_ hidparse.sy_
    r HIDPARSE.SYS hidparse.sys
    r SCSIPORT.SY_ scsiport.sy_
    r SCSIPORT.SYS scsiport.sys
    r CLASSPNP.SY_ classpnp.sy_
    r CLASSPNP.SYS classpnp.sys
    r TDI.SY_ tdi.sy_
    r TDI.SYS tdi.sys
    r OPRGHDLR.SY_ oprghdlr.sy_
    r OPRGHDLR.SYS oprghdlr.sys
    r VIDEOPRT.SY_ videoprt.sy_
    r VIDEOPRT.SYS videoprt.sys
    r HALAACPI.DL_ halaacpi.dl_
    r HALAACPI.DLL halaacpi.dll
    r iaStor iastor
    r Fasttx2k fasttx2k
    r S150sx8 s150sx8
    r QL2300 ql2300
    r Si3112 si3112
    r SiSRaid sisraid
    r RTL8139.SY_ rtl8139.sy_
    r RTL8139.SYS rtl8139.sys
    r 3waredrv.sys 3wareDrv.sys
    r 3waredrv.sy_ 3wareDrv.sy_
    r bootmgr.exe /Boot/bootmgr.exe
    r /boot/ /Boot/


    # cat /etc/xinetd.d/tftp
    # default: off
    # description: The tftp server serves files using the trivial file transfer \
    # protocol. The tftp protocol is often used to boot diskless \
    # workstations, download configuration files to network-aware printers, \
    # and to start the installation process for some operating systems.
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -vv -c -s /tftpboot -m /etc/tftpd.rules
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }

    That should do it for you. I can pretty much guarantee that I can help you resolve this issue. Go back to the Ubuntu forums and other places you've posted the same issue, and close the threads with a link back to this one.

  12. The hard lesson I only just learned was that your (auto)unattend.xml file is paired with the install.wim file that you are using to install/image from.

    Personally, I run a Linux shop, and do automated installs of Linux quite frequently, so I already had a PXE environment built. Adding Windows 2008 R2 to the mix is possible, and took quite a bit of reading official documentation to get working. I can author the XML files with WAIK, and store the XML file on a network share, then run 'setup.exe /unattend:\<path>\Whatever.xml' from WinPE. I can open the install.wim file from the DVD, or from the Network Share folder where I unpackaged the DVD. Both generate correct XMLs that should work.

  13. Why does moving some of the elements around work that way? That's totally confusing. I'm using WSIM to generate the XML, why would it give me bogus XML? Or am I missing something? Anyway, I'm happy that it does work, and I suppose that's the best answer :)

    Can you give me an example of both the amd64_microsoft-Windows-DNS-Client_neutral and amd64_Microsoft-Windows-TCPIP_neutral components for the specialize pass that show how to use the MAC address for the Identifier? I would also like to move that route eventually for systems that have more than one NIC. I would really appreciate it.

  14. I had the same issue. If you're in Windows 7 WAIK, you can right click on each component and their children and select Help (or just F1). If you look at the help for the Product Key, you get this nice little nugget.

    Comparison of Product Key settings

    Microsoft-Windows-Setup\UserData\ProductKey\Key

    Specifies the Windows image to install during Windows Setup. If this setting is used by itself, Windows Welcome will prompt for a product key.

    Microsoft-Windows-Shell-Setup\ProductKey

    Specifies a Product Key to activate Windows. If this setting is used, Windows Welcome will not prompt for a product key. This setting can be used with Microsoft-Windows-Setup\UserData\ProductKey\Key, and the two product keys can be different.

    If you are using a Volume License Multiple Activation Key (MAK), it must be specified using this setting.

  15. I've tried using WAIK to configure a static IP via an unattended xml file, but I continue to get an error during "Completing installation" about setup being able to read the XML file. I checked it against my Server 2008 unattended xml file, and they are pretty much exactly the same.

    Here's my unattended xml file component that's giving me issues. If I delete this component, the install proceeds normally, and I just get DHCP.

            <component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Interfaces>
    <Interface wcm:action="add">
    <Ipv4Settings>
    <DhcpEnabled>false</DhcpEnabled>
    </Ipv4Settings>
    <UnicastIpAddresses>
    <IpAddress wcm:action="add" wcm:keyValue="1">192.168.100.66/24</IpAddress>
    </UnicastIpAddresses>
    <Routes>
    <Route wcm:action="add">
    <Identifier>0</Identifier>
    <Metric>20</Metric>
    <NextHopAddress>192.168.100.1</NextHopAddress>
    <Prefix>0.0.0.0/0</Prefix>
    </Route>
    </Routes>
    <Identifier>Local Area Connection</Identifier>
    </Interface>
    </Interfaces>
    </component>

  16. Really? Was my original post that ambiguous? Or is there just nobody here who has used WAIK to create a WINPE image, and used it to build an unattended install?

    Odin719: No, I don't need the xml syntax for the unattended.xml file. I have an xml file that works fine when the installation is done from CD. The problem is in the WINPE pxe image somewhere. The only name I can find for what is missing is from the WAIK, and it's called a 'component' there.

  17. I have been able to successfully modify the .wim image. That article describes the same method I used to make changes to the startnet.cmd file, and create my custom mac.bat batch file.

    My problem is that I don't know what I need to change on the .wim image in order to have the desired effects. The only way I know to describe my problem is with what I see in the Windows Automated Installer Kit (WAIK). It lists a component in the lower left hand window in the install.wim file on the CD that is not listed in the winpe.wim file that is created with copype.

    If you know how to change, modify, add, or remove one of these components, you would have a very eager listener.

  18. I'll start by admitting that my only experience with windows outside of what it takes to make my video games work on my XP pro version at home has been to create unattended installations for work. I am a Redhat Linux administrator being asked to do with windows what I have been doing with linux for a while now.

    I've been successful with windows server 2003 web and standard editions by following the tutorials here:

    http://www.aerospacesoftware.com/ris-howto.html

    There aren't any problems I haven't solved with the help of this forum and other resources, and am happy with it.

    I have followed the tutorial here for Server 2008:

    http://sysadminman.net/blog/archives/8

    I have created a windows PE image, and it does everything exactly as I want it to, with the exception of the exclusion of the ability to partition and format a disk using the unattended.xml file. To give you a run down, the only things I have done different than the instructions on the tutorial give are:

    1) Fixed a few case-sensitive and path problems with the tutorial's setup and my own.

    2) Added a mac.bat script and modified the startnet.cmd file. Here's the contents of each file:

    \Windows\System32\startnet.cmd

    winpeinit
    mac.bat

    \Windows\System32\mac.bat

    @echo on

    rem Here we have the initial ipconfiguration
    ipconfig /all

    rem We want to check every 5 seconds to see if we can ping the pxe server.
    rem If we can't, we want to wait another 5 seconds.
    rem I hate GOTOs. They suck. Pray this works.

    GOTO PXE

    :PING
    echo Waiting 5 seconds
    ping 1.1.1.1 -n 5 -w 1000 >NUL
    :PXE
    ping -n 1 pxe | FIND "TTL" >NUL
    IF ERRORLEVEL 1 GOTO PING

    rem Here is the ipconfig /all that we will be parsing. Pray it's correct.
    ipconfig /all

    ipconfig /all | FIND /I "Physical" > ip.txt
    FOR /F " tokens=11* delims=, " %%i in (ip.txt) DO SET mac=%%j

    ipconfig /all | FIND /I "Default Gateway" > gateway.txt
    FOR /F " tokens=12* delims=, " %%i in (gateway.txt) DO SET gateway=%%j

    ipconfig /all | FIND /I "DNS SERVERS" > dns.txt
    FOR /F " tokens=14* delims=, " %%i in (dns.txt) DO SET dns=%%j

    echo MAC: %mac% GATEWAY: %gateway% DNS: %dns%

    rem Are you still praying? You should be
    ping -n 1 %dns%
    ping -n 1 %gateway%
    ping -n 1 pxe

    rem This will work if you prayed hard enough.
    NET USE Y: \\pxe\reminst /Persistent:Yes
    Y:
    cd \images\win2k8_standard
    setup /unattend:\Boot\%mac%.xml

    You need to know that the reminst share is rooted in /tftpboot/ which is my tftpd's root directory.

    When I deploy a server, I already know what it's mac address is, so I can create the unattended xml file with the mac address as the name so each server gets it's own unattended script.

    This should satisfy questions about my setup. Now the real problem is the XML code to create and format a partition is clearly documented, but does not work with my winpe.wim image. If I use WAIK to open the \sources\install.wim file from the cd, I can add the component 'x86_Microsoft-Windows-Setup_neutral' to my unattended file. Under that is 'DiskConfiguration' and so forth. When I use WAIK to open my winpe.wim image that I created using 'copype' I no longer have that component listed in my 'Windows Image' section. I also used the install.wim file from the cd to create an unattended xml file. When I load that xml file while I have the winpe.wim image loaded, the validation fails because it can't find the 'x86_Microsoft-Windows-Setup_neutral' component.

    Everything else from my unattended.xml file works properly. When I boot from this image, all I have to do is partition and format the disk, and the rest completes perfectly. Why is the disk partitioner component missing from the winpe.wim image, and can I add it in?

×
×
  • Create New...