NFS, FTP, HTTP, TFTP server, DHCP, PXE server
First configure DHCP server
> cat /etc/dhcpd.conf option domain-name "my.lab"; option domain-name-servers 172.16.253.5; option routers 192.168.124.1; option ntp-servers 192.168.124.3; option arch code 93 = unsigned integer 16; # RFC4578 default-lease-time 3600; ddns-update-style none; subnet 192.168.124.0 netmask 255.255.255.0 { range 192.168.124.100 192.168.124.199; next-server 192.168.124.3; default-lease-time 3600; max-lease-time 3600; if option arch = 00:07 or option arch = 00:09 { filename "/EFI/x86/bootx64.efi"; } else if option arch = 00:0b { filename "/EFI/armv8/bootaa64.efi"; } else { filename "/bios/x86/pxelinux.0"; } }
host passacaglia { allow booting; allow bootp; next-server 192.168.1.205 hardware ethernet 0:0:c0:5d:bd:95; filename "vmunix.passacaglia"; server-name "toccata.fugue.com"; }
restart service dhcpd
/srv/install/x86/sles12/sp2/cd1
linux-7geb:~ # rpm -ql syslinux | grep pxelinux.0 /usr/share/syslinux/pxelinux.0
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot
mkdir /var/lib/tftpboot/pxelinux.cfg
configure tftp
linux-7geb:/mnt/suse/noarch # zypper install tftpboot-installation-SLES-12-SP3-x86_64
mkdir -p /srv/tftpboot/BIOS/x86 mkdir -p /srv/tftpboot/EFI/x86/boot mkdir -p /srv/tftpboot/EFI/aarch64/boot mkdir -p /srv/install/x86/OS_VERSION/SP_VERSION/cd1 mkdir -p /srv/install/aarch64/OS_VERSION/SP_VERSION/cd1
root # mount -o loop PATH_TO_ISO /srv/install/ARCH/OS_VERSION/SP_VERSION/cd1/
Copy the kernel, initrd and message files required for x86 BIOS and UEFI boot to the appropriate location.
root # cd /srv/install/x86/OS_version/SP_version/cd1/boot/x86_64/loader/
At this point, you need to copy the necessary boot files for the x86 BIOS environment to the appropriate boot location
# cd /srv/install/x86/sles12/sp2/cd1/boot/x86_64/loader/ # cp -a linux initrd message /srv/tftpboot/bios/x86/
While still in the loader directory, create the directory for the configuration file and copy it in:
# mkdir /srv/tftpboot/bios/x86/pxelinux.cfg # cp -a isolinux.cfg /srv/tftpboot/bios/x86/pxelinux.cfg/default
Copy pxelinux.0 to the same structure:
# cp /usr/share/syslinux/pxelinux.0 /srv/tftpboot/bios/x86/
Now that the files are all in place, edit the configuration to ensure all the correct boot options are also in place. Start with editing /srv/tftpboot/bios/x86/pxelinux.cfg/default . See the example below:
> cat /srv/tftpboot/bios/x86/pxelinux.cfg/default default harddisk # hard disk label harddisk localboot -2 # install label install kernel linux append initrd=initrd showopts install=nfs://192.168.124.3/srv/install/x86/sles12/sp2/cd1 display message implicit 0 prompt 1 timeout 600
Now edit /srv/tftpboot/bios/x86/message to reflect the default file you edited before. See the example below:
# cat /srv/tftpboot/bios/x86/message Welcome to the Installer Environment! To start the installation enter 'install' and press <return>. Available boot options: harddisk - Boot from Hard Disk (this is default) install - Installation
Copy all required grub2 files for UEFI booting.
# cd /srv/install/x86/sles12/sp2/cd1/EFI/BOOT # cp -a bootx64.efi grub.efi MokManager.efi /srv/tftpboot/EFI/x86/
Copy the kernel and initrd files to the directory structure.
# cd /srv/install/x86/OS_version/SP_version/cd1/boot/x86_64/loader/ # cp -a linux initrd /srv/tftpboot/EFI/x86/boot
Create the file /srv/tftpboot/EFI/x86/grub.cfg with at least the following content:
# cat /srv/tftpboot/EFI/x86/grub.cfg set timeout=5 menuentry 'Install SLES12 SP2 for x86_64' { linuxefi /EFI/x86/boot/linux install=nfs://192.168.124.3/srv/install/x86/sles12/sp2/cd1 initrdefi /EFI/x86/boot/initrd }