Getting installation files onto Server Core

Reading Time: 6 minutes

Server Core installations of Windows Server 2008 require a different mindset when it comes to installing software or drivers. It starts with downloading stuff and getting the installation files onto your Server Core box.

 

The challenge

Most of the times when you read an installation manual on the web the first (technical) step is to download the installation files to your hard disk. In normal Windows installations this reads: "Start an Internet browser, browse to website, click download link". In Server Core this presents a problem, since Internet Explorer isn't present. Installing Mozilla FireFox is a good idea, to cope with the absence of Internet Explorer. Mozilla FireFox actually works on Server Core, but tell me: how to get the installation files for FireFox onto your Server Core box in the first place…

 

The solutions

There are a couple of ways to cope with the challenge. Depending on the way you're utilizing Server Core (and your budget) there are a couple of viable options. I'll explain them, together with their little quirks:

Using your LAN

Since Server Core acts as a file server without installing anything a good way to transfer bits between a workstation and your Server Core box is using an existing LAN connection. This scenario requires a workstation installation on which you do most of the work and basically fits in a scenario where an admin manages his (or her) servers with management consoles and RDP sessions. Apart from the requirements of a workstation box, a server box and a working LAN infrastructure there's no cost involved using this method.

The only thing you need to do is make sure every layer of the OSI model permits the usage of file sharing. Configuring your infrastructure plumbing and the firewall on the workstation isn't really hard (or part of this blogpost) but the IP configuration and the firewall on your Server Core box might be tricky to configure.

Configuring networking

Every installation of Windows Server 2008 automatically defaults to contacting a DHCP server to obtain an IP address. If your network doesn't contain a DHCP server your Windows Server 2008 installation will use Automatic Private IP Addressing (APIPA), as described in RFC 3927 and Microsoft KnowledgeBase article 220874.

Since services define a server (else you'd better call it a workstation) and services need to be found it's a best practice to provide your server with an appropriate name and a fixed IP address.

Changing the name of your Server Core box is easy when you use the netdom command. Assuming your fresh Server Core installation isn't part of an Active Directory I suggest you use the following command:

netdom renamecomputer localhost /NewName:NewNameForYourServer

After renaming the box you can change its IP configuration. In my opinion using the netsh command resembles using the windows to configure these settings. (There are other methods to change the IP address though)

To change the IP v4 address for your Local Area Connection, type:

netsh interface ip set address "Local Area Connection" static IPAddress SubNetMask IPAddressOfDefaultGateway 1
netsh interface ip set dns "Local Area Connection" static
IPAddressOfDNSServer

You can check the configuration with the ipconfig /all command.

Configuring the firewall

I already explained Server Core acts as a file server without installing anything. All you need to do is permit file services through the firewall. In the standard firewall configuration there's already a pre-built exception you can enable by typing the following command:

netsh firewall set service fileandprint

If you're not interested in any security the firewall can provide you with, you can disable the firewall all together using the netsh firewall set opmode disable command.

Accessing administrative shares

After the firewall of your server allows you to share files (and printers) you can make contact with the box using \\IPAdressOfYourServerCoreBox\C$ or \\NameOfYourServerCoreBox\C$ in combination with the run command on your workstation. Other administrative shares are at your disposal if you want to access other parts of your Server Core.

Variations

We can all think of multiple variations on this theme. Since Server Core installations of Windows Server 2008 are in fact equipped with msiexec you can easily deploy *.msi packages to the system using Group Policy Objects, System Management Server and System Center Configuration Manager. Nothing has been confirmed yet, but I suspect Novell will eventually release a ZENworks version for Windows Server 2008.

Other variations might include using Windows Vista Easy Transfer cables, like this one (unlikely though, since this is not the intended use), Virtual Private Networking (VPN) or plain old dial-up connections (POTS or ISDN).

Using portable media

Just like FTP portable media have evolved over the years. Twenty years ago we used floppy disks extensively and since those days we saw the invention of the CD, the DVD, the HD-DVD, the USB stick, the FireWire stick, various types of flash memory cards and all sorts of portable disks. You can use these media to get files from a workstation or another server onto your Server Core box.

Again you need a workstation for this scenario, but there's no real need for a network infrastructure. This scenario might be handy when you want to get files to a server which is located in a secure environment or in an exposed environment. When you have a network infrastructure present I suggest you use it, since portable media don't tend to be very reusable like your network is. CD recordables can only be rewritten a thousand times and most commercially available flash products are guaranteed to withstand 100,000 write-erase-cycles.

The portable media method is often referred to as sneakernet and not really considered Least Administrative Effort.

Autorun

Some people might say one of the limitations of Server Core is Autorun doesn't work. Others might argue that not having Autorun functionality helps to maintain security. I'll try to avoid the whole discussion just by telling you not to despair when you insert portable media in your Server Core installation and nothing happens. Just change your working directory, using the cd command, to locate the executable you want to run. (if you really can't find it open Autorun.inf using notepad.exe.

Virtual portable media

If you use your Server Core installations within VMWare, Virtual Server, Xen or another virtualization solution you can also opt to mount ISO files of portable media. Alex Feinman's ISO Recorder powertoy can help you create ISO files from directories.

Using ftp.exe

A Server Core installation of Windows Server 2008 comes with ftp.exe. This little command line utility allows you to browse File Transfer Protocol (FTP) Servers. It's very useful to download stuff to your Server Core installation. While you might expect every download to be offered from HTTP servers,a lot of downloads are still offered for downloading from FTP Servers.

Here's a good reference on the various FTP commands you can use to talk to File Transfer Protocol (FTP) Servers out there.

The big benefit of using this method is you don't need a workstation to download files and getting these files onto your Server Core box: You're downloading files from the Server Core console straight onto your Server Core box. The down side is your Server Core box needs to find its way to the Internet (or your local FTP Server) which might prove as much a hassle as just plainly copying files to the box over the network. The built-in ftp.exe also has has some nasty disadvantages. It doesn't encrypt usernames and passwords, it doesn't allow Secure FTP and it isn't able to resume downloads.

Scripting ftp.exe

A couple of days ago Yuval Sinay made a Community Solution in Microsoft KnowledgeBase on how to script this little utility, which might prove useful when you download loads of stuff onto your Server Core box using this method.

 

Concluding

I showed you three ways to get installation files onto your Server Core installations:

  1. You can use portable media if there's no (trustworthy) network infrastructure present between your workstation and your Server Core box, but this method is pretty costly if you use it a lot.
  2. You can use the File and Print sharing to copy files from and to your Server Core box. It's the least costly method, unless your Server Core boxes are connected to the Internet directly and get compromised.
  3. FTP is useful when you don't have a workstation present. It's a hardcore and lean way to get files to your Server Core box, but it might take some getting used to.

People administering virtual Server Core installation can use the ISO mount functionality to mount ISO files as CD- or DVD-media. Copy-Paste functionality can be used after installing the additions or tools for your specific virtualization product.

Further reading

How to use automatic TCP/IP addressing without a DHCP server
WMIC … and another way to change the IP Address from the Command Line
Cannot change default administrative shares
How to script ftp commands
Alex Feinman's ISO Recorder powertoy download page
Community Solutions at the KnowledgeBase
MVP Profile for Yuval Sinay
ftp.Microsoft.com
Windows Server 2008 Step-by-Step Guides
Step by Step guide for Server Core
Server Core Tips and Tricks Vol. 4
Basic Initial Server Core Tasks
Using Group Policy to Deploy Applications

Disclaimer Beta Software

The information on this webpage applies to software from Microsoft that was in testing phase but utilizable by experienced users by the time the webpage was written. This software has not been released for sale, distribution or usage for the general public. The information on this webpage and the beta software are provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.

leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.