|
Project: Linux Howtos
Remote installation over NFS
By Trevor Warren <trevor@freeos.com>
Posted: ( 2000-11-03 22:43:23 EST by )
Just as the choice for various architectures exists, Linux also provides
you the choice over the method of installation. If your machine lacks
a CDROM drive, you could always install Linux from another machine
on your network that does have one.
At the outset I would like to tell you that this article is aimed at those who have had previous installation experience on any distribution of Linux. Even if you don't fall into that category, it still doesn't hurt to know a little bit more about the OS of your choice. Now roll up your sleeves and let's get started. It was most likely that you installed your first Linux box from a bootable CDROM. Maybe your motherboard didn't support booting from the CDROM and you had to make a bootable floppy instead. Now that wasn't all you knew about the methods of installing Linux locally. You even knew that Linux could be installed over a network but could never get yourself to do it. In this article I will take you through one method of remote installation -- over NFS. This article does not cover installation of Linux but only a method of remote installing Linux. Therefore problems regarding Installation are out of the scope of this article. Just as the choice for various architectures exists, Linux also provides you the choice over the method of installation. If your machine lacks a CDROM drive, you could always install Linux from another machine that does have one. You can also install over FTP or via HTTP. I'm using Red Hat here but using SuSE isn't much different either. Installing Linux over an NFS share I'm describing the method of installing Linux over a local LAN using NFS because it's the easiest to setup and use. So here goes: Take hold of a blank floppy and your RedHat installation CDROM. Insert your Red Hat CDROM into the drive and mount it with the following command. bash#mount /mnt/cdrom Now check if you have a NFS server installed with the following command: bash#rpm -qa | grep nfs If the output of the command is something like this ... nfs-utils-0.1.6-2.i386.rpm ... you have a NFS server installed on your Linux box. If this command doesn't produce any output but you know you have a different NFS server installed, just skip the following step. Su to root and enter into the directory /mnt/cdrom/RedHat/RPMS with the following command. bash#su - bash#cd /mnt/cdrom/RedHat/RPMS Having changed into the directory issue the following command to install the NFS server. bash#rpm -ivh nfs-utils-0.1.6-2.i386.rpm. Now let's configure the shares in the /etc/exports file. The /etc/exports file contains a list of the directories that you would want to export over the network. Open your favorite text editor and just make the following entry in your /etc/exports file /mnt/cdrom 192.168.0.x Here you would replace the x with the IP of the machine you are installing Linux on. As an alternative, you can just export the directory to everyone on your subnet in the following format /mnt/cdrom address/netmask /mnt/cdrom 192.168.0.0/255.255.255.0 This entry allows every machine from the subnet 192.168.0.0 to access your NFS share over the network. After having edited the /etc/exports file all you have to do is re-start the NFS server with the following command. bash#/etc/rc.d/init.d/nfs restart Now check that the directory can be mounted by other hosts on your network bash#mount 192.168.0.1:/mnt/cdrom /mnt/nfstest Replace the IP address here by the IP address of the machine exporting the cdrom. If you are able to mount the directory and access the contents then you have successfully installed and configured the NFS server with the share /mnt/cdrom over the Local Area Network. Now you need to create the boot floppy that contains the kernel required for network booting. bash#cd /mnt/cdrom/images Issue the following command to create the boot floppy bash#dd if=./bootnet.img of=/dev/fd0 At this point take a deep breath and relax for the moment of truth is just about to strike you. Three cheers to you for having just accomplished a big and tough task. Starting the Installation Now insert the floppy you have made into your client machines. Before booting off this floppy, make sure that the client machines' BIOS is set to the following. A,C,CDROM On booting from the floppy you are asked all the usual questions The only point of difference is the choice of Installation medium which is the third screen of Install. At that point you enter the IP address of your NFS Server and the path to the NFS share, which is /mnt/cdrom. The installation then proceeds as normal. I would highly appreciate any feedback that you can send across.
Other articles by Trevor Warren
Current Rating: [ 6.67 / 10 ]
Number of Times Rated: [ 55 ]
|