Network Installation Objectives Manage linux installation from network
Network Installation • Objectives – Manage linux installation from network install server • Contents – Preparing for a network installation – Setting up the install server for http, nfs, ftp – Copy files, what is needed – Service Location Protocol – Configuring your DHCP server – Creating boot diskettes • Practical – Install one linux from network • Summary
Prepairing network installation • Your network server need one or more of the following – NFSD – HTTPD – VSFTPD – DHCPD – NAMED – SLP • You will need to setup each server after your need – Full flexibility you can mix netowk installation modes on same server – Local machine Policy must allow you to setup, usally only root can do. – Named and DHCPD can run on any machine in network – SLP can be very dangerous and expose servers weakness
Setting up the install server • Installation server – – Types which can be used: NFS HTTP FTP (SFTP) You can support all at same time if you like or any combination You must configure and start your selected servers It will eat up about 3. 4 Gigabyte for each distribution of Su. SE • Create installation root tree # mkdir -p /export/network-install/Su. SE/9. 3 # mkdir -p /export/network-install/Su. SE/ISO • HTTP, FTP and NFS preparation – – # # # Copy all contents of each 5 Su. SE cdrom’s to server Su. SE/9. 3 –catalog. Just insert first CD and do the copy, remove it and insert the next one. cp –var /media/SUSE 930_F 01 /export/network-install/Su. SE/9. 3 cp -var /media/SUSE 930_002 /export/network-install/Su. SE/9. 3 cp -var /media/SUSE 930_003 /export/network-install/Su. SE/9. 3 cp -var /media/SUSE 930_004 /export/network-install/Su. SE/9. 3 cp -var /media/SUSE 930_005 /export/network-install/Su. SE/9. 3 – Watch out for any I/O read errors while copy!
Setting up the install server continued • Install tree preparation – Rename all CD’s directories to CD 1, CD 2 and so on # # # cd mv mv mv /export/network-install/Su. SE/9. 3 SUSE 930_F 01 CD 1 SUSE 930_002 CD 2 SUSE 930_003 CD 3 SUSE 930_004 CD 4 SUSE 930_005 CD 5 – If your were using Yast preparing your install server, all files will reside in one common directory – Now we are ready to setup the ”sharepoint” with nfs, http, ftp or smb.
Setting up your kernel. NFS server • NFS is dependent on forward and revers name-lookup (DNS) – The client to be installed must resolve in both forward and reverse Server: /etc/hosts = Client: /etc/hosts Example) 192. 168. 1. 1 server. net 05. se 192. 168. 1. 101 client. net 05. se • NFS make use of portmap Check if portmap & nfs is running # /etc/init. d/portmap status # /etc/init. d/nfsserver status Activate NFS and portmap at boot # insserv /etc/init. d/nfsserver # insserv /etc/init. d/portmap • NFS configuration Add to /etc/exports, use <tab> not <space> /exports/network-install/Su. SE/9. 3/ Activate your ”export” *(ro, root_squash, sync) # exportfs -vra Test to mount your NFS share # mount –t nfs localhost: /exports/network-install/Su. SE/9. 3 /mnt/a
Setting up SLP for kernel. NFS server • SLP Registry file /etc/slp. reg. d/install. suse. nfs. reg – SLP need to know what resource to annonce # Register the NFS Installation Server service: install. suse: nfs: //$HOSTNAME/exports/network-install/Su. SE/9. 3/CD 1, en, 65535 description=NFS Installation Source for Su. SE 9. 3 • Service & Description – Name of resource registry file: install. suse – Service and directory to mount: nfs: //$HOSTNAME/exports/Su. SE/9. 3/CD 1 – Description seen in resource browsers: NFS Installation Source for Su. SE 9. 3 • Activate the SLP resource annonce • Check that SLP reporst install. suse # rcslpd start # slptool findsrvs service: install. suse: nfs: //server. net 05. se/exports/ network-install/Su. SE/9. 3/CD 1, 65535 • Activate slp at boot # insserv /etc/init. d/slpd
Setting up your vs. FTPd server • Configure VSFTPd anonymous installations Add to /etc/vsftpd. conf # # Anonymous FTP Root Directory # anon_root=/exports/network-install/Su. SE # • Standard anonymous ftp root is /srv/ftp – We changed this with the anon_root above • If you need non anonymous installations Add to /etc/vsftpd. conf uncomment local_enable=YES chroot_local_user=YES Add special ftp install users with homedir inside install dir # useradd -g users ftpinstall # passwd ftpinstall # usermod -d /exports/secret-install ftpinstall
Setting up SLP for vs. FTPd server • SLP Registry file /etc/slp. reg. d/install. suse. ftp. reg – SLP need to know what resource to annonce # Register the FTP Installation Server service: install. suse: ftp: //$HOSTNAME/9. 3/CD 1, en, 65535 description=FTP Installation Source for Su. SE 9. 3 • Service & Description – Name of resource registry file: install. suse – Service and directory to open: ftp: //$HOSTNAME/9. 3/CD 1, en, 65535 – Description seen in resource browsers: ftp Installation Source for Su. SE 9. 3 • Activate the SLP resource annonce • Check that SLP reporst install. suse # rcslpd start # slptool findsrvs service: install. suse: ftp: //server. net 05. se/9. 3/CD 1, en, 65535 • Activate slp at boot # insserv /etc/init. d/slpd
Setup your Apache 2 Webserver • Apache 2 need to be installed – In this case it is no use to install from anything else than YAST – Later we will do a more into the deepth installation of Apache 2 1) Start yast and install only package apache 2 2) Select apache 2 and solve all dependencies that might appair. (in my case 3) • Apache Document. Root lives in /srv/www/htdocs – We will use a subdirectory in that path, more exactly alias to our installation root tree • Install source in our case will be apache alias directory – Add after Alias /icons/ … </Directory> # Network Install Server Alias /Su. SE/ "/exports/network-install/Su. SE/" <Directory "/exports/network-install/Su. SE"> Options Indexes Multi. Views Follow. Symlinks Allow. Override None Order allow, deny Allow from all </Directory> • Restart apache # rcapache 2 restart • Test that you can see your sources http: //<inst-server-ip>/Su. SE/
Setting up SLP for Apache 2 • SLP Registry file /etc/slp. reg. d/install. suse. http. reg – SLP need to know what resource to annonce # Register the HTTP Installation Server service: install. suse: http: //$HOSTNAME/Su. SE/9. 3/CD 1, en, 65535 description=HTTP Installation Source for Su. SE 9. 3 • Service & Description – Name of resource registry file: install. suse – Service and directory to browse: http: //$HOSTNAME/Su. SE/9. 3/CD 1 – Description seen in resource browsers: HTTP Installation Source • Activate the SLP resource annonce • Check that SLP reporst install. suse for Su. SE 9. 3 # rcslpd start # slptool findsrvs service: install. suse: http: //server. net 05. se/ Su. SE/9. 3/CD 1, 65535 • Activate slp at boot # insserv /etc/init. d/slpd
Configuring your DHCP server • For most comfort in network installation use a DHCP server! – It can be any DHCP server, but in our case we uses the install server – It delivers IP parameters to clients using dhcpcd, from e definded scope – It can also deliver deligated IP addresses based on client MAC • Install your DHCP server – First check if you have it # rpm -qa | grep dhcpcd-1. 3. 22 pl 4 -202. 2 yast 2 -dhcp-server-2. 11. 6 -3 – We had only the client and yast shell for the server – Install the dhcp libs and dhcpd-server # yast dhcp-server – I do it all at once this time, yes by YAST! • Do not start your DHCP server yet – The dhcp server can by mistake deliver IP parameters to someone else – We will need to deliver IP parameters based on client MAC if using PXE boot. – Isolate your server and client from the rest of the network or release client IP address from server and wait……
Configuring your DHCP server • Configure the dhcpd-server with yast the first time – It is a mess to do anything else, Su. SE has clobbed the DHCPD server to much – SUSE LINUX Enterprise Server is more designed to work with dhcpd servers – Basic DHCP Setup will need: domain-name net 05. se //Choose your domain name. primary-name-server 192. 168. 1. 1 //Choose your 1: st DNS (secondary-name-server 80. 84. 37. 3 //Choose your 2: ond DNS) default-gateway 192. 168. 1. 1 //Choose your gateway ip-address-range 192. 168. 1. 100 - 192. 168. 1. 100 //Choose your range Check start dhcp server manually – Yast will prepare /etc/sysconfig/dhcpd and /etc/dhcpd. conf for you. • After installation and yast session you will have a sample /etc/dhcpd. conf! • You will need to add client MAC to this! option domain-name ”net 05. se"; option domain-name-servers 192. 168. 1. 1, 80. 84. 37. 3; option routers 192. 168. 1. 1; option ntp-servers 192. 168. 1. 2; default-lease-time 14400; ddns-update-style none; subnet 192. 168. 1. 0 netmask 255. 0 { range 192. 168. 1. 200 192. 168. 1. 250; default-lease-time 14400; max-lease-time 172800; }
Configuring your DHCP server • Adding client MAC to /etc/dhcpd. conf – Will allow client to recieve same IP address at all time – Nessesary for PXE boot host client { hardware ethernet 00: A 0: C 5: B 7: 56: BD; fixed-address 192. 168. 1. 101; option broadcast-address 192. 168. 1. 255; } • If we like we can now remove the IP range. – Doing so will stop DHCP server to deliver IP addresses to any other host exept the one with correct MAC option domain-name ”net 05. se"; option domain-name-servers 192. 168. 1. 1, 80. 84. 37. 3; option routers 192. 168. 1. 1; option ntp-servers 192. 168. 1. 2; default-lease-time 14400; ddns-update-style none; subnet 192. 168. 1. 0 netmask 255. 0 { # range 192. 168. 1. 200 192. 168. 1. 250; default-lease-time 14400; max-lease-time 172800; } • Its now time to start your DHCP server # rcdhcpd start – Dont do this if you do not know what you are doing.
Creating boot diskettes in Su. SE • To boot the client you need floppies or CD (CD 1) • Creating bootfloppies – Insert CD 1 and # cd # /media/SU 930_F 01/boot/mkbootdisk /media/SU 930_F 01 – Will create bootfloppies images in /root # ls boot? bootdisk 1 bootdisk 2 bootdisk 3 bootdisk 4 bootdisk 5 bootdisk 6 bootdisk 7 – bootdisk 1 contain msdos filesystem and syslinux bootloader – syslinux can be modified after booting needs • Creating floppies is easely done with dd – For each image make one floppy # dd if=bootdisk 1 of=/dev/fd 0 2880+0 records in 2880+0 records out
Creating boot diskettes in Windows • To boot the client you need the bootdisk images – They can be found on internet if you do not keep them • Using Windows rawwritewin
Creating boot diskettes in Linux • It is basically the same procedure as in Windows – Create bootdisk – Create network drivers disk • These are the steps – Mount first cdrom and insert a floppy # mount /mnt/cdrom # dd if=/mnt/cdrom/images/bootdisk. img of=/dev/fd 0 2880+0 records in 2880+0 records out – Remove first floppy and inser a new blank floppy # mount /mnt/cdrom # dd if=/mnt/cdrom/images/drvnet. img of=/dev/fd 0 2880+0 records in 2880+0 records out # eject cdrom
Manual Network installation with SLP 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. Boot on CD 1 or boot floppies Move to INSTALL Press F 3 and select SLP Hit Enter, a list should appair with possible install servers Choose one install server (FTP, HTTP or NFS) Hit Enter again, observe how syslinux try to get up the network and start loading. After a while, the standard installation will start. System analyzis is performed, after that CD 1 content is fetched from the install server After CD 1 is installed, system will reboot, remove CD 1 Installation will now continue with CD 2 to CD 5 if needed. You will be asked for root password Client network interfaces is analyzed Allow VNC if question comes Make the internet connection checkout if you need internet On-line update can take as long time as whole installation up to now. Add one local user NO AUTOLOGIN! Su. SE Splash text arrives, just accept and continue Devices are now configured System will continue loading to runlevel 5 or runlevel 3 depending on your selections in step 7 -9 and you try to login as root
Manual Network installation no SLP 1. 2. 3. Boot on CD 1 or boot floppies Move to INSTALL Press F 3 and select (FTP, HTTP or NFS) Depending on your choise you will now be asked Use DHCP addresses Not using any proxy Install server IP address or name + path to install sources Username + Password (if using ftp) FTP PATH is in our case /9. 3/CD 1 HTTP PATH is in our case /Su. SE/9. 3/CD 1 NFS PATH is in our case /exports/network-install/suse/9. 3/CD 1 4. 5. 6. Hit Enter after you choises, observe how syslinux try to get up the network and start loading. After a while, the standard installation will start. Rest of installation will be standard, jump to 7 on previous page.
- Slides: 18