Presentation is loading. Please wait.

Presentation is loading. Please wait.

PXE netboot installation of Linux/SuSE

Similar presentations


Presentation on theme: "PXE netboot installation of Linux/SuSE"— Presentation transcript:

1 PXE netboot installation of Linux/SuSE
Objectives Creating PXE netboot installations Contents DHCP server manual setup TFTP server yast setup boot files from CD1 Syslinux package Net bootloader config Wake on LAN Practicals Perform one PXE installation Summary This section details the configuration tasks needed in complex boot scenarios. It contains ready-toapply configuration examples for DHCP, PXE boot, TFTP, and Wake-on-LAN.

2 DHCP Server for TFTP booting
Beside the regular DHCP settings we need to annonce tvtp server tftp server IP address next-server Net boot image filename Booting client MAC address option domain-name ”net05.se"; option domain-name-servers ; option routers ; option ntp-servers ; default-lease-time 14400; ddns-update-style none; subnet netmask { # Range specify which IP addresses to deliver # range ; default-lease-time 14400; max-lease-time ; } group { next-server ; filename "pxelinux.0"; host Zert120 { hardware ethernet 00:07:E9:64:73:E3; } host Bert120 { hardware ethernet 00:B0:D0:39:63:8C; fixed-address ; } } To announce the TFTP server's location to the network clients and to specify the boot image file to be pulled by the installation target, add two declarations to your DHCP server configuration. A sample full configured dhcpd.conf file: The host statement Bert120 introduces the hostname of the installation target. To bind the hostname and IP address to a specific host, you have to know and specify the system's hardware (MAC) address. Replace all the variables used in this example by the actual values that match your environment. When you restart the DHCP server, it provides a static IP to the host you specified and thus enables you to connect to the system via SSH. If you plan on using SSH for the remote control of a PXE/Wake-on-LAN installation, you need to explicitly specify the IP address DHCP, like for host Bert120.

3 Setup of a TFTP Server Install the tftp package (dependent on xinetd)
TFPT server by H. Peter Anvin Recommendation is to install & configure tftp with yast and check files afterwards! TFTP root directory shour be set as: /srv/tftpboot Create the directory TFTP is xinetd dependent, check /etc/xinetd.d/tftp: Restart the DHCP server Restart the xinetd server # /srv/tftpboot/pxelinux.cfg service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no } tftp standard dir is /tftpboot which also will do if you do not want to follow SuSE standards Setting up a TFTP server can be done either with YaST on the recent versions of SUSE LINUX Enterprise Server or SUSE LINUX Professional operating systems or manually on any other Linux operating system that supports xinetd and TFTP. The TFTP server delivers the boot image to the target system when it boots up and sends a request for it. # /rcdhcpd restart # /rcxinetd restart

4 Preparing the tftp-root with boot files
First we need the boot files copied into the tftp-root Install the syslinux package (with yast) Syslinux contains the nessesary pxeboot.0 file Copy alsothe pxebootloader file to tftp-root The isolinux.cfg is syslinux boot manager options, whcih we need in order to boot over the net, renamed as default: # cd /export/network-install/SuSE/9.3/CD1 # cp -a boot/loader/linux boot/loader/initrd /srv/tftpboot # cp -a boot/loader/message /srv/tftpboot boot/loader/memtest /srv/tftpboot # cp -a /usr/share/syslinux/pxelinux.0 /srv/tftpboot For reference, some technical background information as well as PXE’s complete specifications are available in the Preboot Execution Environment (PXE) Specification (ftp://download.intel.com/labs/ manage/wfm/download/pxespec.pdf). # cd /export/network-install/SuSE/9.3/CD1 # cp -a boot/loader/isolinux.cfg /srv/tftpboot/pxelinux.cfg/default

5 Modify the /srv/tftpboot/pxelinux.cfg/default file
Edit the default and disable graphic bootloader, remove these: gfxboot readinfo framebuffer You then need to add these at proper labels: insmod=e100 netdevice=eth0 install=nfs://ip_instserver/path_instsource/CD1 For automatic start of installation in end of file default linux timeout 100 A sample label can look like this (linux) A link to sample full configured default file: Insert the following entries in the append lines of the default failsafe, noacpi, and linux labels (also revies chapter 15 and 16 in unix-sysadmin: insmod=e100 netdevice=eth0 install=nfs://ip_instserver/path_instsource/CD1 (HTTP, FTP, or SMB sources are addressed in a similar manner, except for the protocol prefix, which should read http or ftp) # install label linux kernel linux append initrd=initrd ramdisk_size=65536 insmod=e100 netdevice=eth0 \ install=nfs:// /exports/network-install/SuSE/9.3/CD1 \ autoyast=nfs:// /exports/network-install/SuSE/9.3/my-host.xml

6 Preparing client and Wake on LAN
Boot order in client BIOS need to be set 1. NetBoot 2. Disk Note that there can be problem after the reboot, netboot willeventually start a new installation over and over again! Installing netdiag allows the wake on LAN By issuing command Target host wakes up and can boot on PXE During client boot Broadcast for DHCP server Getting first IP address Fetching boot image from tftp server and start loading boot manager Boot manager arrives and after timeoutbootmanager loads the default label kernel linux Attempt to mount install and autoyast Installation continues in normal order ether-wake mac_of_target Preparing the Target System for PXE Boot Prepare the system's BIOS for PXE boot by including the PXE option in the BIOS boot order. Do not place the PXE option ahead of the hard disk boot option in the BIOS. If you do, this system tries to reinstall itself every time you boot it. Preparing the Target System for Wake-on-LAN Wake-on-LAN requires the appropriate BIOS option to be enabled prior to the installation. Also, make note of the MAC address of the target system because this data is needed to initiate Wake-on- LAN. Bios settings, Boot order and Boot devices, net boot, pxe boot boot net or similar. Boot with boot order set in bios, look in /var/log/messages of your dhcpd and install server. Client machine should detect the boot server and be offered an DHCP address. Then it very quickly boots, it looks almost the same as in regular CD boots, difference is that we disabledthe graphics to speed up the process. If all goes well, there will arrive SySlinux boot manager, type linux and hit enter or wait until it auto boots linux. Depending on your source is on NFS, FTP or HTTPor any else, it will try to get it mounted/connected. NFS is known to be lazy in the start but goes speedly when is on. First time ever the setup can have trouble. Also it is VERY IMPORTANT that server and client can resolve the hostnames, at least the server, and that the DHCP server offers correct DNS and gateways. # cp autoinst.xml /media/floppy/autoinst.xml


Download ppt "PXE netboot installation of Linux/SuSE"

Similar presentations


Ads by Google