📜 ⬆️ ⬇️

PXE Boot in 15 minutes

Hello% username%!

Today I will tell how in 15 minutes you can deploy a network boot with a convenient boot menu and a minimum of useful utilities.


')

We will need a server running Linux in my Ubuntu case, a little bit of enthusiasm and free time.

I hope the article will be useful to you and I will get an invite to Habr :)
Thanks sky_lord !


TFTP Server


Install the packages: tftp tftpd-hpa

sudo apt-get install tftp tftpd-hpa

The next step is to configure the root directory of the TFTP server and the server itself:
open the /etc/inetd.conf file, and make sure that the next line is present, and also that it does not appear in front of it #:

tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /tftpboot

/ tftpboot is the folder of your server, and the files should be there. Create it

sudo mkdir /tftpboot


We are checking. I currently have /tftpboot/pxelinux.0 in the / tftpboot folder

tftp 10.22.22.22
tftp> get pxelinux.0
Received 16300 bytes in 0.0 seconds
tftp>


As you can see from the response of the TFTP client, we successfully received a file of 16,300 bytes in 0 seconds.


DHCP server


Install the package: dhcp3-server

sudo apt-get install dhcp3-server

Now we need to configure it for this we open the file /etc/dhcp3/dhcpd.conf in a convenient way. In my case it is:

nano /etc/dhcp3/dhcpd.conf

My file /etc/dhcp3/dhcpd.conf:

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
server-name "10.22.22.22";

subnet 10.22.22.0 netmask 255.255.255.0 {
pool {

range 10.22.22.1 10.22.22.21;

next-server 10.22.22.22; # tftp

filename "pxelinux.0"; #
}
}


Attention! if Static addresses for clients are configured on your DHCP server, the DHCP server will ignore the above configuration and “give” to the client only those parameters that are entered in the client's static settings section.
Details: man dhcpd.conf

Restart dhcp server:

sudo /etc/inti.d/dhcp3-server restart

Filling


Now it's time to fill the tftpboot directory with the tools and loader we need. The menu will be loaded using the syslinux boot loader, or rather, pxelinux.0
The menu is created using the /tftpboot/pxelinux.cfg/default file
Immediately make a reservation - you should not "copy-paste" configs as they contain comments and I do not know how syslinux will accept them.

An example of the /tftpboot/pxelinux.cfg/default file:

default /boot/vesamenu.c32 # .

#
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color disabled 0 #ffffffff #00000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu background #1F45A5

#
menu title PXE Network Boot Menu

prompt 0 # 0.

timeout 1200 # .


label Boot from first hard disk # .
localboot 0x80


label Thinstation #
kernel /pxe/thinstation/vmlinuz #
append ramdisk_blocksize=4096 initrd=/pxe/thinstation/initrd root=/dev/ram0 ramdisk_size=524288 splash=silent
vga=791 console=ttyS3 # ( isolinux.cfg iso )


menu begin #
menu title Acronis Products #


label .. #
menu exit


label Acronis True Image Echo Enterprise
kernel /pxe/acronis/echoen/kernel
append initrd=/pxe/acronis/echoen/ramdisk /s ramdisk_size=40000 quiet vga=791

label Acronis Disk Director 10
kernel /pxe/acronis/diskdirector/kernel
append initrd=/pxe/acronis/diskdirector/ramdisk /s ramdisk_size=40000 quiet vga=791

menu end #


. 100% pxe ( Acronis)

Acronis, , :

Acronis True Image Echo Enterprise Server:
C:\Program Files\Acronis\TrueImageEchoEnterpriseServer\BartPE\Files


2 : kernel.dat ramdisk.dat

\tftpboot\pxe\acronis\echoen

kernel ramdisk.

Acronis Disk Director:
C:\Program Files\Acronis\Acronis Disk Director



\tftpboot\pxe\acronis\diskdirector .



!

PXE ROM

http://img3.imageshack.us/img3/2897/vpc2k7pxeboot.png

.



!


Syslinux: syslinux.zytor.com/wiki/index.php/PXELINUX
Thinstation: ru.wikipedia.org/wiki/Thinstation

default /boot/vesamenu.c32 # .

#
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color disabled 0 #ffffffff #00000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu background #1F45A5

#
menu title PXE Network Boot Menu

prompt 0 # 0.

timeout 1200 # .


label Boot from first hard disk # .
localboot 0x80


label Thinstation #
kernel /pxe/thinstation/vmlinuz #
append ramdisk_blocksize=4096 initrd=/pxe/thinstation/initrd root=/dev/ram0 ramdisk_size=524288 splash=silent
vga=791 console=ttyS3 # ( isolinux.cfg iso )


menu begin #
menu title Acronis Products #


label .. #
menu exit


label Acronis True Image Echo Enterprise
kernel /pxe/acronis/echoen/kernel
append initrd=/pxe/acronis/echoen/ramdisk /s ramdisk_size=40000 quiet vga=791

label Acronis Disk Director 10
kernel /pxe/acronis/diskdirector/kernel
append initrd=/pxe/acronis/diskdirector/ramdisk /s ramdisk_size=40000 quiet vga=791

menu end #


. 100% pxe ( Acronis)

Acronis, , :

Acronis True Image Echo Enterprise Server:
C:\Program Files\Acronis\TrueImageEchoEnterpriseServer\BartPE\Files


2 : kernel.dat ramdisk.dat

\tftpboot\pxe\acronis\echoen

kernel ramdisk.

Acronis Disk Director:
C:\Program Files\Acronis\Acronis Disk Director



\tftpboot\pxe\acronis\diskdirector .



!

PXE ROM

http://img3.imageshack.us/img3/2897/vpc2k7pxeboot.png

.



!


Syslinux: syslinux.zytor.com/wiki/index.php/PXELINUX
Thinstation: ru.wikipedia.org/wiki/Thinstation

default /boot/vesamenu.c32 # .

#
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color disabled 0 #ffffffff #00000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu background #1F45A5

#
menu title PXE Network Boot Menu

prompt 0 # 0.

timeout 1200 # .


label Boot from first hard disk # .
localboot 0x80


label Thinstation #
kernel /pxe/thinstation/vmlinuz #
append ramdisk_blocksize=4096 initrd=/pxe/thinstation/initrd root=/dev/ram0 ramdisk_size=524288 splash=silent
vga=791 console=ttyS3 # ( isolinux.cfg iso )


menu begin #
menu title Acronis Products #


label .. #
menu exit


label Acronis True Image Echo Enterprise
kernel /pxe/acronis/echoen/kernel
append initrd=/pxe/acronis/echoen/ramdisk /s ramdisk_size=40000 quiet vga=791

label Acronis Disk Director 10
kernel /pxe/acronis/diskdirector/kernel
append initrd=/pxe/acronis/diskdirector/ramdisk /s ramdisk_size=40000 quiet vga=791

menu end #


. 100% pxe ( Acronis)

Acronis, , :

Acronis True Image Echo Enterprise Server:
C:\Program Files\Acronis\TrueImageEchoEnterpriseServer\BartPE\Files


2 : kernel.dat ramdisk.dat

\tftpboot\pxe\acronis\echoen

kernel ramdisk.

Acronis Disk Director:
C:\Program Files\Acronis\Acronis Disk Director



\tftpboot\pxe\acronis\diskdirector .



!

PXE ROM

http://img3.imageshack.us/img3/2897/vpc2k7pxeboot.png

.



!


Syslinux: syslinux.zytor.com/wiki/index.php/PXELINUX
Thinstation: ru.wikipedia.org/wiki/Thinstation

default /boot/vesamenu.c32 # .

#
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color disabled 0 #ffffffff #00000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu background #1F45A5

#
menu title PXE Network Boot Menu

prompt 0 # 0.

timeout 1200 # .


label Boot from first hard disk # .
localboot 0x80


label Thinstation #
kernel /pxe/thinstation/vmlinuz #
append ramdisk_blocksize=4096 initrd=/pxe/thinstation/initrd root=/dev/ram0 ramdisk_size=524288 splash=silent
vga=791 console=ttyS3 # ( isolinux.cfg iso )


menu begin #
menu title Acronis Products #


label .. #
menu exit


label Acronis True Image Echo Enterprise
kernel /pxe/acronis/echoen/kernel
append initrd=/pxe/acronis/echoen/ramdisk /s ramdisk_size=40000 quiet vga=791

label Acronis Disk Director 10
kernel /pxe/acronis/diskdirector/kernel
append initrd=/pxe/acronis/diskdirector/ramdisk /s ramdisk_size=40000 quiet vga=791

menu end #


. 100% pxe ( Acronis)

Acronis, , :

Acronis True Image Echo Enterprise Server:
C:\Program Files\Acronis\TrueImageEchoEnterpriseServer\BartPE\Files


2 : kernel.dat ramdisk.dat

\tftpboot\pxe\acronis\echoen

kernel ramdisk.

Acronis Disk Director:
C:\Program Files\Acronis\Acronis Disk Director



\tftpboot\pxe\acronis\diskdirector .



!

PXE ROM

http://img3.imageshack.us/img3/2897/vpc2k7pxeboot.png

.



!


Syslinux: syslinux.zytor.com/wiki/index.php/PXELINUX
Thinstation: ru.wikipedia.org/wiki/Thinstation

default /boot/vesamenu.c32 # .

#
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color disabled 0 #ffffffff #00000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu background #1F45A5

#
menu title PXE Network Boot Menu

prompt 0 # 0.

timeout 1200 # .


label Boot from first hard disk # .
localboot 0x80


label Thinstation #
kernel /pxe/thinstation/vmlinuz #
append ramdisk_blocksize=4096 initrd=/pxe/thinstation/initrd root=/dev/ram0 ramdisk_size=524288 splash=silent
vga=791 console=ttyS3 # ( isolinux.cfg iso )


menu begin #
menu title Acronis Products #


label .. #
menu exit


label Acronis True Image Echo Enterprise
kernel /pxe/acronis/echoen/kernel
append initrd=/pxe/acronis/echoen/ramdisk /s ramdisk_size=40000 quiet vga=791

label Acronis Disk Director 10
kernel /pxe/acronis/diskdirector/kernel
append initrd=/pxe/acronis/diskdirector/ramdisk /s ramdisk_size=40000 quiet vga=791

menu end #


. 100% pxe ( Acronis)

Acronis, , :

Acronis True Image Echo Enterprise Server:
C:\Program Files\Acronis\TrueImageEchoEnterpriseServer\BartPE\Files


2 : kernel.dat ramdisk.dat

\tftpboot\pxe\acronis\echoen

kernel ramdisk.

Acronis Disk Director:
C:\Program Files\Acronis\Acronis Disk Director



\tftpboot\pxe\acronis\diskdirector .



!

PXE ROM

http://img3.imageshack.us/img3/2897/vpc2k7pxeboot.png

.



!


Syslinux: syslinux.zytor.com/wiki/index.php/PXELINUX
Thinstation: ru.wikipedia.org/wiki/Thinstation

Source: https://habr.com/ru/post/82552/


All Articles