Performing a CentOS Network Installation

From Techotopia
Jump to: navigation, search
PreviousTable of ContentsNext
Performing a Clean Disk CentOS InstallationInstalling CentOS with Windows in Dual Boot Environment


You are reading a sample chapter from the CentOS 5 Essentials Essentials book.

Purchase a copy of the fully updated CentOS 8 edition in eBook ($24.99) or Print ($36.99) format

CentOS 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 260 pages. Learn more...

Buy Print Preview Book


In addition to installing directly from the physical CentOS installation media (in the form of a CDROM or DVD) it is also possible to perform a network based CentOS installation whereby the installation image is installed on a remote server and downloaded in packages to the destination computer system during installation. CentOS currently supports installation via HTTP, FTP and NFS. For the purposes of this tutorial we will focus on the use of HTTP (in other words the installation image is available via a web server on a remote host) though the concepts are largely the same for the other network installation options.

CentOS Network Installation Requirements

Before a network installation of CentOS can be performed a number of items are required. Firstly, the CentOS installation image must be loaded onto the remote server and mounted. If the installation media is in the form a CDROM or DVD then the image can be read from that media into a disk based ISO image file using the dd command as follows:

dd if=/dev/media of=/path/to/iso/file/centos-image.iso

Note that in the above example, /dev/media would be replaced by the path to the CDROM device and /path/to/iso/file/ represents the path to a suitable location on the file system to create the image file. Also keep in mind that the installation media may comprise multiple disk images, each of which will need to be imported into the server.

Having created the ISO image file from the installation media, it now needs to be mounted in a location that is accessible to the web server, ftp server or NFS mount point so that it is accessible to the target system. This is achieved using the mount loopback interface:

mount -o loop centos_image.iso /path/to/mount/point

In this case, /path/to/mount/point is replaced by the full path to the location where the CentOS installation image is to be mounted such that it can be accessed via the chosen network installation method. For example, in the case of an HTTP based installation, the chosen mount point might be /var/www/html/centos. Note that the specified mount point directory must already exist before executing this command.

Once the remote server is configured with a copy of the CentOS installation image, the next step is to plan how the installation process will be initiated on the target system. Clearly we will still need to be able to boot from something locally to start the installation. This involves booting from the CentOS network installation image. This image contains the minimum necessary to initiate a network based installation and is only about 10MB in size. This image can be downloaded from the CentOS.org web site download mirrors and is usually named CentOS-<version>-i386-netinstall.iso or CentOS-<version>-x86_64-netinstall.iso, depending on whether you need to perform a 32-bit or 64-bit installation. Once the image is downloaded, burn it to a CDROM.


Configuring the Network Installation

Begin the network installation by placing the network installation CDROM into the drive of the target system and, if necessary, configure the BIOS boot order to boot from this device before the hard disk drive. When the installer has booted enter the following command at the boot prompt and press the enter key:

linux askmethod

A sequence of screens will subsequently appear providing the opportunity to select a language and keyboard type. Once these settings have been defined, a screen will appear requesting the location of the installation media:


Selecting the CentOS Network installation method


Depending on the method by which the installation images are being served by the remote system select either NFS image, FTP or HTTP. For the purposes of this tutorial we will assume the use of HTTP.

Once the installation method has been selected, click OK to proceed to the TCP/IP configuration screen. If the computer has multiple network adaptors, select the one to be used during the installation. On the next screen, configure the required IPv4 and IPv6 settings for the network to which the computer is attached:


Configuring TCP/IP settings for a CentOS network isntallation


The next item of information that the installer needs is the hostname of the server containing the installation images and the path to the directory where the first installation image media was mounted. Enter this information before clicking OK to proceed:


Configuring the Server location for CentOS network installation


In the above figure, the server is identified as having an IP address of 192.168.2.102. Note that this could also be the URL of a website. The directory on the web server is then identified as centos. For the purposes of your own installation these values will obviously need to reflect the environment corresponding to your remote server.


Starting the CentOS Network Installation

Once the network configuration settings are complete, click on the OK button on the last setup screen to begin the installation process. The network installation process will now connect to the remote server and download the first installation image file (this is typically images/stage2.img):


Downloading the first CentOS installation image


The duration of this download will vary subject to the speed of the connection between the local system and the remote server. Once the image has downloaded the installation will proceed as outlined in the previous chapter, with the inevitable exception that it will proceed more slowly than a comparable installation from a local CDROM or DVD drive.


You are reading a sample chapter from the CentOS 5 Essentials Essentials book.

Purchase a copy of the fully updated CentOS 8 edition in eBook ($24.99) or Print ($36.99) format

CentOS 8 Essentials Print and eBook (ePub/PDF/Kindle) editions contain 31 chapters and over 260 pages. Learn more...

Buy Print Preview Book



PreviousTable of ContentsNext
Performing a Clean Disk CentOS InstallationInstalling CentOS with Windows in Dual Boot Environment