Tuesday, August 21, 2007

Network Installation Tutorial for Open Suse 10.2

I am writing this small tutorial for Installing Linux on network since it was harrowing task for me so I wish some one might benefit from it
I have taken Open Suse 10.2
but the steps would rather be same for most of the distributions In case you are not willing to read the whole tutorial go to the end of it and see the check list might be that is sufficient for you and some commands are given there

-----------------------------------------------------------------------


depending on the boot sequence configured in the computer’s BIOS
The Preboot Execution Environment (in short PXE) is a protocol that enables a computer to be booted on the network.
PXE is saved in ROM on newer network cards some cheap boards do not support it ,
so before you do all this just check wether your board is capable of booting on LAN

To Start with you need

* PXE boot capable machine
* SUSE DVD or CD or ISO files.
o dhcp-
o tftp - to share the boot image
o syslinux - to supply the boot image (pxelinux.0)

Open Suse 10.2 yast2 tftp-server is the correct format do not use the "-" after yast2 instead type without first dash
yas2 tftp-server (note the presence of space and dash -)
yast2 dhcp-server
yast2 nfs-server

o yast2-tftp-server - Graphical configurator for a TFTP server (note in these commands in
o yast2-dhcp-server - Graphical configurator for a DHCP server
o yast2-nfs-server - Graphical configurator for a NFS server.


to see wether DHCP running or not type
rcdhcpd status


-------------------------------------------------------------------------------------------------
In case you don't have syslinux go to software management and install it from your DVD in case of CD it will tell u appropriate CD to use

before doing all this just check that
DHCP
TFTP
NFS
syslinux
are installed on your machine

-----------------------------------------------
You will also tell PXELINUX to boot the linux kernel we will copy from the openSUSE 10.2 DVD.
in case u dont have a TFTP directory in / then make it and then issue following command
cp /usr/share/syslinux/pxelinux.0 /tftpboot

then from Suse 10.2 DVD or first CD u can copy kernel images to boot from
cp /media/SU1020.001/boot/i386/loader/initrd /tftpboot/
cp /media/SU1020.001/boot/i386/loader/linux /tftpboot/

Then
mkdir /tftpboot/pxelinux.cfg
cd /tftpboot/pxelinux.cfg
touch default
chmod 777 default
-----------------------------------------------------------------
The boot configuration in the file default should be as follows:


default linux
label linux
kernel linux
append initrd=initrd install=nfs://IP Of SUSE TFTP SERVER/media/SU1020.001
implicit 0
display message
prompt 1
timeout 1


Note in above files I have used /media/SUSE1020.001
you need the DVD inside the DVDROM for this in case you know how to mount the ISO
you can replace with your own installation directory skip the next step if you dont know how to mount an ISO

Skip the following step if you are first time doing network boot
----------------------------------------------------------------
mount -t iso9660 /windows/E/openSUSE-10.2-GM-DVD-i386-iso/openSUSE-10.2-GM-DVD-i386.iso /install -o loop

where /install is the directory where you want to mount the ISO image and
then go to NFS server settings share this /install ( int this the ISO is already mounted you can check that)
then go to /tftpboot/pxelinux.cfg/default and here change the entry
install=nfs://IP of ur TFTP server/directory that has your ISO mounted/ (Note / at last is required

and then also you can boot this is a general process
to create your own boot menu i.e.
to install Fedora Core 5 ,Debian,Windows at the same time on different machines a file called boot.msg can be created and appropriate changes can be done but that is so confusing that I am not mentioning here
------------------------------------------------------------------------------------------





but with this configuration the dhcp server won’t know about the existence of the tftp server, so we have to add 2 the next-server and filename options. Finally the configuration should look like this:
configure the DHCP and add the following lines in it

next-server IP of TFTP server;
filename "pxelinux.0"

option domain-name ;
mydomainname;;
ddns-update-style none;
default-lease-time 14400;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.1 192.168.0.254;
default-lease-time 14400;
max-lease-time 172800;
next-server 192.168.0.1;
filename "pxelinux.0";
}
--------------------------------------------------------------------------------------
Sample dhcp.conf where TFTP server IP is 44
option domain-name "IPG2004";
option domain-name-servers 192.168.0.44, 192.168.0.44;
option routers 192.168.0.44;
ddns-update-style none;
default-lease-time 14400;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.1 192.168.0.254;
default-lease-time 14400;
max-lease-time 172800;
next-server 192.168.0.44;
filename "pxelinux.0";
}
------------------------------------------------------------------------------------------------
Sample "default" file in directory /tftpboot/pxelinux.cfg

default linux
label linux
kernel linux
append initrd=initrd install=nfs://192.168.0.44/install/
implicit 0
display Hi This is Tapas Linux
prompt 1
timeout 1

------------------------------------------------------------------------------------

In case any thing goes wrong
1) check syslinux was installed to check type as root
#rpm -q syslinux
the output would tell wether syslinux was there or not
2)the client machine should be enabled in BIOS to boot from Network press F12 or F10 to boot from Lan if you see a DHCP request on your machine then the DHCP server is up and running
3)check DHCP server is on and running
4)check TFTP server in xinetd services is running or not
5)check NFS entries in which file has been exported is it the same as the files in installation DVD
6 )check the IP of your DHCP and TFTP server in
/etc/dhcp.conf and /tftpboot/pxelinux.cfg/default
also check the file nams specified
7)check the image that you have mounted is at having chmod 777 permissions in /install directory
8) in case you are using a firewall and you are a newbie then it is better you disable the firewall expert people might check the iptables to see they have allowed above services
9) In case you are getting non graphical screen to install on client machine that means that ROM on your Lan card does not have enough memory to support graphical installation
or the entries in NFS server on the TFTP machine or DHCP or NFS where ever is your exported directory are in suscpicion

Important Links to be read

3 comments:

Balakrishnan.B said...

Thanks for the tutorial.
I need to install windows xp or vista or 7 on a notebook pc which doesnt have optical drive. I dont have a windows server comp too. All i have is an ubuntu 8.10 comp.
Is there a way to install windows xp on another machine which supports network boot using my linux machine?

Planners said...

Good one on "Network Installation Tutorial for Open Suse 10.2" and it helps a lot.

I have used the AV Planners Inc for all "screen install" and their serivice is the best.
You can know more about them in "http://www.avplannersinc.com/index.php/av-installation".

Thanks,
mark - screen install

Tapas said...

You need some thing known as unattended