Environment and It's the ubuntu14.04 system .
Reference file https://www.maketecheasier.com/configure-pxe-server-ubuntu/
Steps
1 Environment Preparation
2 Installation Configuration DHCP tftp NFS
3 PXE Installation and configuration
4 Add PXE Mirror and Export to NFS on the server
5 Summary of problems encountered during installation
1 Environment Preparation
1 Install ubuntu System
2 Configure fixed IP Address
#interfaces (5) file used by Ifup (8) and Ifdown (8)
Autolo
Ifacelo inet Loopback
Autoeth0
Ifaceeth0 inet Static
address10.50.200.22
netmask255.255.255.0
gateway10.50.200.254
2 Installation Configuration DHCP tftp NFS
Apt-getinstall isc-dhcp-serverinetutils-inetd tftpd-hpa syslinux nfs-kernel-server
1 Configure DHCP
Vi/vi/etc/default/isc-dhcp-server
Interfaces= "Eth0"
Vi/etc/dhcp/dhcpd.conf
subnet10.50.200.0 netmask 255.255.255.0 {
range10.50.200.8 10.50.200.10;
Optionsubnet-mask 255.255.255.0;
optionrouters 10.50.200.22; # best to PXE IP otherwise installation is slow
Optionbroadcast-address 10.50.200.255;
FileName "pxelinux.0";
next-server10.50.200.22; #tftp Server IP
}
Start Service/etc/init.d/isc-dhcp-server Start
2 Configuring tftp Service
Vi/etc/inetd.conf
Add to
TFTP dgram UDP wait Root/usr/sbin/in.tftpd/usr/sbin/in.tftpd-s
/var/lib/tftpboot
Vi/etc/default/tftpd-hpa
Tftp_username= "TFTP"
tftp_directory= "/var/lib/tftpboot"
Tftp_address= "[: 0.0.0.0:]:69"
Tftp_options= "--secure"
run_daemon= "Yes"
options= "-l-s/var/lib/tftpboot"
UPDATE-INETD--enable BOOT
/etc/init.d/tftpd-hpastart
Check if the service is starting Netstat-lu
3 Installation Configuration PXE
Sudomkdir/var/lib/tftpboot
Sudomkdir/var/lib/tftpboot/pxelinux.cfg
sudomkdir-p/var/lib/tftpboot/ubuntu/14.04/amd64/
sudocp/usr/lib/syslinux/vesamenu.c32/var/lib/tftpboot/
sudocp/usr/lib/syslinux/pxelinux.0/var/lib/tftpboot/
Vi/var/lib/tftpboot/pxelinux.cfg/default
Defaultvesamenu.c32
TIMEOUT100
PROMPT0
MENU INCLUDE pxelinux.cfg/pxe.conf
NOESCAPE1
Labeltry Ubuntu 14.04 Desktop
MenuLabel Try Ubuntu 14.04 Desktop
Kernel Ubuntu/vmlinuz.efi
Appendboot=casper Netboot=nfs nfsroot=10.50.200.22:/var/lib/tftpboot/ubuntu/14.04/amd64initrd=ubuntu/ Initrd.lz Quiet Splash
Endtext
Labelinstall Ubuntu 14.04 Desktop
MenuLabel Install Ubuntu 14.04 Desktop
Kernel Ubuntu/vmlinuz.efi
Appendboot=casper automatic-ubiquity Netboot=nfs nfsroot=10.50.200.22:/var/lib/tftpboot/ubuntu/14.04/ Amd64initrd=ubuntu/initrd.lz Quiet Splash
Endtext
Vi/var/lib/tftpboot/pxelinux.cfg/pxe.conf
MENU TITLE PXE Server
Noescape 1
Allowoptions 1
PROMPT 0
MENU WIDTH 80
MENU ROWS 14
MENU Tabmsgrow 24
MENU MARGIN 10
MENU COLOR Border 30;44#FFFFFFFF #00000000 std
4 Add Mirror
because our virtual machine is attached to iOS by default, it can be directly from the CD under CP
mount/dev/cdrom/media/
cp-r/media/*/var/lib/tftpboot/ubuntu/14.04/amd64/
cp-r/media/.disk/var/lib/tftpboot/ubuntu/14.04/amd64/
cp/media/casper/initrd.lz/media/casper/vmlinuz.efi/var/lib/tftpboot/ubuntu/
Vi/etc/exports
/var/lib/tftpboot/ubuntu/14.04/amd64* (Ro,async,no_root_squash,no_subtree_check)
Exportfs-a
/etc/init.d/nfs-kernel-server start
PXE That's all the configuration done . can connect with client installation of the system,
5 problems that occur during intermediate operations,
issue 1 tftp cannot be connected
is due to tftp setting error next-server 10.50.200.22; #tftp Server IP
problem 2 can enter installation installation interface but always prompt automstic boot in x second has been circulating and cannot be installed
is because cannot load vmlinuz.efi
1 determine /var/lib/tftpboot/ubuntu There's this file .
[Email Protected]:/var/lib/tftpboot/ubuntu#ll
total27620
drwxrwxrwx3 root root 4096 Apr 13 16:10.
drwxrwxrwx4 root nogroup 4096 Apr 13 15:28.. /
drwxrwxrwx3 root root 4096 Apr 13 15:2814.04/
-r--r--r--1 root root 21699939 Apr 16:10initrd.lz
-r--r--r--1 root root 6567896 Apr 16:10 vmlinuz.efi
2 determine /var/lib/tftpboot/pxelinux.cfg/default The correspondence is not written wrong
Kernel Ubuntu/vmlinuz.efi
question 3 can be installed but the installation stops at
End kernel Panic-not syncing:VFS:Unable to Monut root FS on Unknown-block (2.0)
the problem because /var/lib/tftpboot/pxelinux.cfg/default this is on the same line, Instead of two. (This problem has been troubling for a long time, only to solve)
Appendboot=casper Netboot=nfs nfsroot=10.50.200.22:/var/lib/tftpboot/ubuntu/14.04/amd64initrd=ubuntu/ Initrd.lz Quiet Splash
Ubuntu 14.04 Installing PXE