How to set up an nfs, ftp or http share to host Linux OS source files for DS for Dell scripted installs

Article:HOWTO10255  |  Created: 2009-06-08  |  Updated: 2009-06-08  |  Article URL http://www.symantec.com/docs/HOWTO10255
Article Type
How To



Question
How do I set up an nfs, ftp or http share to host my Linux source files for a Deployment Solution for Dell Servers Scripted Install?

Answer

Performing scripted Linux installations is a bit more involved than scripted Windows installations. Network Linux installations require the OS source files to be available on a network share. This article explains how to set up your network so you can perform scripted installations using Linux. You'll be surprised by how well the Linux scripted installation process works. Once your network is properly configured, scripted installations of Linux are easy!

The general contents of this article are applicable to most distributions of Linux that support scripted network installations. Since Deployment Solution for Dell Severs only supports Red Hat Enterprise Linux and SUSE Enterprise Linux, I will focus on those.

Setting up a network share

The first step is to set up a network share. Most distributions of Linux support HTTP, FTP, or NFS. For HTTP or FTP we'll use Microsoft's IIS, but you can use any HTTP or FTP server.

HTTP

Internet Information Services needs to be installed on the server hosting the files. This can be the same server as the Deployment Server and point to the [DS share]\Dell\OSSup directory where you can copy the source files using the Configuration Utility.

The HTTP Server can be accessed as either a web site or a virtual directory. If you set it up as its own web site, the files can be accessed directly from the IP address of the host server (e.g. http://192.168.0.100). If you set it up as a virtual directory of an existing web site, the files will be accessed as a directory off of the IP address (example: http://192.168.0.100/Linux). In our example we will set up a web site, and use the structure in the [DS share]\Dell\OSSup folder.

To set up a Web Site Using IIS

  1. Open ISS Manager, right-click on Web Sites and select New > Web Site.

    Figure 1

    Click to view.

  2. Follow the Wizard by entering a description

    Figure 2

    Click to view.

  3. Pick the IP address to associate with this web site

    Figure 3

    Click to view.

  4. Enter the path to the source files and check the box to allow anonymous access.

    Figure 4

    Click to view.

  5. Assign permissions, read is the only one needed.

    Figure 5

    Click to view.

  6. Right the icon in the tree view for your website (LinuxFiles) in the IIS manager and go to properties.

  7. Click on "HTTP Headers", and then click on MIME Types

  8. Click New to add the following entry: Extension: *
    MIME type: application/octet-stream

  9. Press OK

  10. Save your changes.

    What steps 6 - 10 did is enabled the downloading of non-mime type files. Without doing this, your installations of linux will fail because they cannot download files.

FTP

Setting up an FTP server in Windows to access your Linux source files is fairly straight forward.

Internet Information Services needs to be installed on the server from which you are hosting the source files and the File Transfer Protocol (FTP) component needs to be installed along with it (this isn't installed by default). This can be the same server as the Deployment Server and point to the [DS share]\Dell\OSSup directory where you can copy the source files using the Configuration Utility. The source files can be accessed as its own FTP site (e.g. ftp://192.168.0.100), or as a virtual directory of an existing FTP site (e.g. ftp://192.168.0.100/Linux). In our example we will set up a FTP site, and use the structure in the [DS share]\Dell\OSSup folder.

To Set Up an FTP Site Using IIS

  1. Open IIS Manager, right-click on FTP Sites and select New FTP Site.

    Figure 6

    Click to view.

  2. Follow the Wizard by entering a description

    Figure 7

    Click to view.

  3. Picking the IP address to associate with this FTP site

    Figure 8

    Click to view.

  4. Choose your FTP user isolation, how you configure this is up to you, I chose not to isolate users.

    Figure 9

    Click to view.

  5. Enter the path to the source files

    Figure 10

    Click to view.

  6. Assign Read/Write permissions.

    Figure 11

    Click to view.

By default, anonymous access to the FTP server is allowed. However, you can require authentication to the server by right-clicking on the FTP Site in IIS and selecting properties. Click on the Security Accounts tab and uncheck the box labeled Allow anonymous connections.

NFS

Software

To run an NFS server you will need a Linux server. Any distribution should work. You will need to download and install the NFS software if you do not already have it. The process of doing this is different for each distribution. Try using apt-get, yum, or another package manager to install the NFS software. A simple Internet search with your distribution name and NFS will probably lead you in the right direction.

Configuration

  1. Edit /etc/exports and add entries to this file to share out directories and set permissions. Entries are in the format:
    directory computer1(optionA, optionB, ...) computer2(optionA, optionB, ...)
    • directory: The directory you want to share.
    • computer: The client computers that will have access to the directory. This can be DNS name, or IP address. This can also cover a range of addresses.
    • (optionA, optionB, ...): Describes the level of access to the directory. Valid values are as follows:
      • ro: Directory is read only (default).
      • rw: Directory is read write.
      • no_root_squash: Sets permissions such that root on the client computer has the same rights to the directory as root does on the server. Not recommended unless you have a good reason for needing this.
      • no_subtree_check: Disables a check on subtree checking that can speed up transfers.
      • sync: Prevents reboot of server until all file system writes have completed, default is async.

    Example:

    /share/rhel3as *(ro,sync)/share/rhel4as 192.168.(ro,sync)/share/rhel3es 192.168.0.0/255.255.255.0(rw,sync)/share/rhel4es 192.168.0.1(ro) 192.168.0.2(rw)
    • The first entry will share out the directory /share/rhel3as to anyone, and will give it read only access.
    • The second entry will share out /share/rhel4as to any computer whose IP address starts with 192.168. with read only access.
    • The third entry will share out /share/rhel3es to any computer in the same subnet as 192.168.0.0 with read write access.
    • The fourth entry will share out /share/rhel4es to just the computer with the IP address 192.168.0.1 with read only access, and to the computer with the IP address 192.168.0.2 with read write access.

    Figure 12

    Click to view.

  2. Edit /etc/hosts.allow and /etc/hosts.deny.

    Editing your hosts.allow and hosts.deny files will help your server be more secure. Your NFS server should work even if these files are blank, but it is a good idea to add entries to theses files so unauthorized users can't access your system.

    When a system first attempts to access the server, the server checks the hosts.allow file to see if the computer is listed there. If so, it is allowed access. If not, then the hosts.deny file is checked, and if the computer is listed there it is denied access. If the computer is not listed in either file then the computer is allowed access.

    • hosts.allow

      Simply list the service to allow, and the computers you want to allow.

      Example:

      portmap mountd nfsd statd lockd rquotad : 192.168.

      This allows all computers with IP addresses that start with 192.168 to access the services listed.
      ALL could be substituted to allow access for all computers.

    • hosts.deny

      List the services you want denied, and the computers you want denied.

      Example:

      portmap: ALL

      This denies all computers from using the portmap service. Substituting 192.168. denies only those computers whose IP address starts with 192.168. Remember that the allow file is evaluated before the deny file, meaning even if you deny all computers from the portmap service, the ones in the allow file will still be allowed access.

  3. Start services.

    All that should be required is restarting your server. The start up scripts should detect the changes made to your set up files and start the needed services. If you don't want to reboot your system, you can manually restart the applicable services. Again, this varies by distribution. I use the following script, it may or may not work for your distribution (I'm running Ubuntu Dapper Drake).

    #!/bin/bashexportfs -ra /etc/init.d/portmap restart/etc/init.d/nfs-common restart/etc/init.d/nfs-kernel-server restartexit

If you run into problems, or if you need more information, search the Web for "NFS tutorial."

Copy Source files to network share

If you are hosting your source files on the deployment share you can use the configuration utility to copy the files. From the DS console click Tools > Dell Tools > Configuration Utility. Click the OS Deployment tab and select the OS you want to add files for and click the Copy button. If you have more than one CD you will be asked if you want to copy another CD each time the copy operation completes.

If you are not hosting your source files on the deployment share, or you don't want to use the Configuration Utility, you can simply use a utility such as Windows Explorer to copy the files. For Red Hat simply copy the entire first CD, and only copy the contents of the RedHat\RPMS folder of subsequent CDs (to avoid overwriting files and directories with the same name).

Copy boot files to DS server

If the server hosting the OS source files is not the same as your Deployment Server, or you chose to store the files in a location other than the Deployment share, you will need to copy two files to the Deployment share. These files are used during the scripted installation process to load the OS and launch the install. The files needed depend on the OS. For Red Hat you need the files vmlinuz and initrd.img. For SUSE you need the files linux and initrd. These are also located in different places depending not only on the OS, but the CPU type. Here's a quick list:

OS Type Boot files location Requires files
Red Hat Enterprise Linux 3 & 4, 32-bit & 64-bit \isolinux vmlinux, initrd.img
SUSE Enterprise Linux Server 10 32-bit \boot\i386\loader linux, initrd
SUSE Enterprise Linux Server 10 64-bit \boot\x86_64\loader linux, initrd

The paths listed are relative to the root of the CD. The required files should be placed in the same directory structure as they are found on the CD. These files can be placed anywhere on the Deployment share, but by default the scripts point to [Deployment Share]\Dell\OSSup\[OS NAME] where [OS NAME] is RHEL, RHEL64, SUSE, or SUSE64. If you want to change this location you can use the OS Deployment tab in the configuration utility to do so.

For example, if we were setting up 32-bit RHEL, we'd copy vmlinuz and initrd.img from D:\isolinux (if D is my CD drive) to [Deployment share]\Dell\OSSup\RHEL\isolinux.

Note: The required files are specific to the version of the OS you are installing. Even though the file names are the same that doesn't mean you can use the same files for any version of Linux. You have to use the ones that are found on the CD of the version you are installing.

Use DS for Dell to reference the files

You can now use the Configuration Utility, Configuration Wizard or Job Builder to set up your Linux scripted installs and generate the corresponding jobs.

Conclusion

That should be all you have to do. Now you can just drag and drop the scripted installation job onto the system(s) you want to install Linux on and it should work. If something goes wrong run through these steps again to make sure you didn't miss anything.

Note: You may run into a small problem when installing Linux on a Dell 9th generation server. A combination of the way the Linux kernel iterates through devices at start up and the design of the 9g servers causes the network devices to be reversed (i.e. eth0 is nic2 and eth1 is nic1). As a result when the installer launches it may not be able to get an IP address or be able to connect to your OS source files server (because your answer file specifies eth0 as the interface to use during the install). A simple solution is to disable the second nic in the BIOS until the installation of the OS has completed. Many distributions of Linux have this problem including Red Hat, but I have never had this problem with SUSE.


Legacy ID



47536


Article URL http://www.symantec.com/docs/HOWTO10255


Terms of use for this information are found in Legal Notices