network install servers

Darin Perusich Darin.Perusich at cognigencorp.com
Wed Dec 22 11:56:08 EST 2004


for peter and jesse, hehe.

this is going to be a quick and dirty overview on setting up a network 
install server. i'm not going to get into hands off auto-installs 
because they are pretty system specific.

you'll need a server or servers running bind, dhcp, tftp, syslinux, and 
nfs or ftp or http, i'm going to assume that bind and dns are running on 
the same server and are setup, server1. everything will be on a second 
machine, server2. i run SuSE so packages and file locations may be 
different from your dirsto.

server2 (192.168.0.10)
----------------------
install packages atftp, syslinux, apache, and nfs-utils if not already 
installed. you will need a lot of space to copy your distribution to 
local disk from cdrom or mirrored from an ftp mirror.

1. setup directory structure for installation media, assuming / is huge.

	mkdir -p /pub/suse/i386/9.1

2. mount cdrom and copy the contents to the above location. repeat for 
each cd.

	mount /media/cdrom; cd /media/cdrom
	tar -cf - . |(cd /pub/suse/i386/9.1 && tar -xf -)

2a. mirror from an ftp site

	wget -b -m -nH --directory-prefix=/pub/suse/i386/9.1 \
	--exclude-directories=/pub/suse/i386/9.1/suse/src \
	ftp://mirror.mcs.anl.gov/pub/suse/i386/9.1

3. setup and populate atftp

	chkconfig --add atftp
	mkdir -p /tftpboot/pxelinux.cfg
	/etc/init.d/atftp start
	cp /usr/share/syslinux/pxelinux.0 /tftpboot
	cp /pub/suse/i386/9.1/boot/loader/initrd /tftpboot
	cp /pub/suse/i386/9.1/boot/loader/linux /tftpboot
	cd /tftpboot/pxelinux.cfg
	create file called 'default', exclude --SNIP--
	--SNIP--
		default linux
		label linux
		kernel linux
		append load_ramdisk=1 initrd=initrd 
install=nfs://192.168.0.10/pub/suse/i386/9.1
	--SNIP--
	append and install MUST be on the same line.

4. setup nfs
	echo "/pub/suse *(ro,sync,anonuid=0)" >> /etc/exports
	/etc/init.d/nfslock start
	/etc/init.d/nfsserver start

server1 (192.168.0.254)
-----------------------
an existing dns and dhcp infrastructure already exist, we are adding to 
the dhcp configuration for the network install server.

/etc/dhcpd.conf
	...
	subnet 192.168.0.0 netmask 255.255.255.0 {
		...
		...
		next-server 192.168.0.10;
		filename "/pxelinux.0";
	}

at this point to should be able perform a network installation, i don't 
think i've forgotten anything. the computer MUST be able to preform a 
network boot. if your machine cannot boot over off it's network card but 
still has one you're still in good shape if you can boot floppy or 
cdrom. to boot cdrom burn /pub/suse/i386/9.1/boot/boot.iso and select 
network install. if you only have a floppy grab the grubfloppy image at 
ftp://ftp.suse.com/pub/people/nashif/grubfloppy.img, mount it, and 
modify menu.lst like the /tftboot/pxelinux.cfg/default from above. suse 
provides very good auto installation resources at 
http://www.suse.de/~nashif/autoinstall/.

i realise some of the info is more geared torwards suse but you should 
be able to easily modify it for FC, redhat, solaris, etc. if you don't 
want to copy the distro locally simply get the IP address of a mirror 
and use it. this works will when going a network boot off cdrom or 
floppy, this is was i do at home.

good luck.
	
-- 
Darin Perusich
Unix Systems Administrator
Cognigen Corp.
darinper at cognigencorp.com



More information about the nflug mailing list