ოპერაციული სისტემების ჩატვირთვა ქსელიდან pxelinux-ის საშუალებით
ქსელიდან ჩატვირთვა ძალიან მოსახერხებელია - მაგალითად, IT Support-ის მუშაობა გაადვილდება, თუ ორგანიზაციის ფარგლებში CD/DVD/Usb Flash -ების გარეშე შეძლებს ისეთი უტილიტების გაშვებას, როგორებიცაა victoria, memtest86+, Acronis Trueimage, Acronis Disk Director (+ ძალიან ბევრი სასარგებლო რამ)
ამ პოსტში შევეცდები დავწერო ნაბიჯ-ნაბიჯ ინსტრუქცია, რომელიც შედეგად მოგვცემს ქსელიდან Victoria, Memtest86+, Acronis Disk Director და Acronis Trueimage უტილიტების ჩატვირთვის შესაძლებლობას PXE-ს საშუალებით.
ქსელიდან ჩატვირთვისთვის საჭიროა:
- ქსელის ბარათი, რომელსაც ექნება PXE ტექნოლოგიის მხარდაჭერა
- სისტემის BIOS-ს ან EFI-ს უნდა ჰქონდეს ქსელიდან ჩატვირთვის შესაძლებლობა
- DHCP სერვერი - ჩვენს შემთხვევაში გამოყენებული იქნება ICS DHCPD
- TFTP სერვერი - ჩვენს შემთხვევაში გამოყენებული იქნება tftp-hpa
- Bootloader, რომელიც ჩაიტვირთება PXE კოდის მიერ და თავის მხრივ შეძლებს ოპერაციული სისტემის ჩატვირთვას - ჩვენს შემთხვევაში გამოყენებული იქნება pxelinux (syslinux-ის ვარიანტი PXE ტექნოლოგიით ჩატვირთვისთვის)
ჩატვირთვის თანამიმდევრობა ასეთია:
- ქსელის ბარათზე არსებული ROM-იდან იტვირთება PXE კოდი, რომელიც ცდილობს ქსელის ინტერფეისის დაკონფიგურებას DHCP-ს საშუალებით
- DHCP სერვერი, სხვა პარამეტრებთან ერთად, კლიენტებს უგზავნის ორ დამატებით პარამეტრს: 66 - TFTP Server Name და 67 - Boot File Name (დამატებითი ინფორმაცია აქაა)
- PXE კოდი 66 პარამეტრით მიღებული TFTP სერვერიდან იწერს, ტვირთავს და მართვას გადასცემს 67 პარამეტრით მიღებულ ფაილს (Bootloader-ს), რომელიც თავის მხრივ აგრძელებს ოპერაციული სისტემის ჩატვირთვას.
პაკეტების სანამ ინსტალაციას დაწყებამდე უმჯობესია ჯერ გავაახლოთ ყველა დაინსტალირებული პაკეტი აქტუალურ ვერსიამდე და ამის შემდეგ დავიწყოთ ჯადოქრობა და დავაინსტალიროთ dhcp სერვერი 😀
როგორც ზემოთ აღვნიშნე, გამოვიყენებ ISC DHCP Daemon -ს. სამუშაოები მიმდინარეობს Centos 7x67 -ზე.
ჯერ მოვძებნოთ შესაბამისი პაკეტი :)
[root@centos-7 ~]# yum search dhcp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.srv.magticom.ge
* epel: epel.mirror.srv.magticom.ge
* extras: centos.mirror.srv.magticom.ge
* updates: centos.mirror.srv.magticom.ge
============================== N/S matched: dhcp ===============================
dhcp-common.x86_64 : Common files used by ISC dhcp client and server
dhcp-devel.i686 : Development headers and libraries for interfacing to the DHCP
: server
dhcp-devel.x86_64 : Development headers and libraries for interfacing to the
: DHCP server
dhcp-libs.i686 : Shared libraries used by ISC dhcp client and server
dhcp-libs.x86_64 : Shared libraries used by ISC dhcp client and server
dhcping.x86_64 : DHCP daemon ping program
nagios-plugins-dhcp.x86_64 : Nagios Plugin - check_dhcp
wide-dhcpv6.x86_64 : DHCP Client and Server for IPv6
dhclient.x86_64 : Provides the ISC DHCP client daemon and dhclient-script
dhcp.x86_64 : Dynamic host configuration protocol software
dibbler-client.x86_64 : Dibbler, DHCPv6 client
dibbler-relay.x86_64 : Dibbler, DHCPv6 relay
dibbler-requestor.x86_64 : Dibbler, DHCPv6 request generator
dibbler-server.x86_64 : Dibbler, DHCPv6 server
dnsmasq.x86_64 : A lightweight DHCP/caching DNS server
dnsmasq-utils.x86_64 : Utilities for manipulating DHCP server leases
kea.x86_64 : DHCPv4, DHCPv6 and DDNS server from ISC
kea-devel.x86_64 : Development headers and libraries for Kea DHCP server
kea-libs.x86_64 : Shared libraries used by Kea DHCP server
munin-netip-plugins.noarch : Network-wide graphing framework (dhcpd3 and ntp
: plugins)
Name and summary matches only, use "search all" for everything.
[root@centos-7 ~]#
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.srv.magticom.ge
* epel: epel.mirror.srv.magticom.ge
* extras: centos.mirror.srv.magticom.ge
* updates: centos.mirror.srv.magticom.ge
============================== N/S matched: dhcp ===============================
dhcp-common.x86_64 : Common files used by ISC dhcp client and server
dhcp-devel.i686 : Development headers and libraries for interfacing to the DHCP
: server
dhcp-devel.x86_64 : Development headers and libraries for interfacing to the
: DHCP server
dhcp-libs.i686 : Shared libraries used by ISC dhcp client and server
dhcp-libs.x86_64 : Shared libraries used by ISC dhcp client and server
dhcping.x86_64 : DHCP daemon ping program
nagios-plugins-dhcp.x86_64 : Nagios Plugin - check_dhcp
wide-dhcpv6.x86_64 : DHCP Client and Server for IPv6
dhclient.x86_64 : Provides the ISC DHCP client daemon and dhclient-script
dhcp.x86_64 : Dynamic host configuration protocol software
dibbler-client.x86_64 : Dibbler, DHCPv6 client
dibbler-relay.x86_64 : Dibbler, DHCPv6 relay
dibbler-requestor.x86_64 : Dibbler, DHCPv6 request generator
dibbler-server.x86_64 : Dibbler, DHCPv6 server
dnsmasq.x86_64 : A lightweight DHCP/caching DNS server
dnsmasq-utils.x86_64 : Utilities for manipulating DHCP server leases
kea.x86_64 : DHCPv4, DHCPv6 and DDNS server from ISC
kea-devel.x86_64 : Development headers and libraries for Kea DHCP server
kea-libs.x86_64 : Shared libraries used by Kea DHCP server
munin-netip-plugins.noarch : Network-wide graphing framework (dhcpd3 and ntp
: plugins)
Name and summary matches only, use "search all" for everything.
[root@centos-7 ~]#
როგორც ჩანს, ესაა - dhcp.x86_64 : Dynamic host configuration protocol software
[root@centos-7 ~]# yum info dhcp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.srv.magticom.ge
* epel: epel.mirror.srv.magticom.ge
* extras: centos.mirror.srv.magticom.ge
* updates: centos.mirror.srv.magticom.ge
Available Packages
Name : dhcp
Arch : x86_64
Epoch : 12
Version : 4.2.5
Release : 47.el7.centos
Size : 511 k
Repo : base/7/x86_64
Summary : Dynamic host configuration protocol software
URL : http://isc.org/products/DHCP/
License : ISC
Description : DHCP (Dynamic Host Configuration Protocol) is a protocol which
: allows individual devices on an IP network to get their own
: network configuration information (IP address, subnetmask,
: broadcast address, etc.) from a DHCP server. The overall purpose
: of DHCP is to make it easier to administer a large network.
:
: To use DHCP on your network, install a DHCP service (or relay
: agent), and on clients run a DHCP client daemon. The dhcp package
: provides the ISC DHCP service and relay agent.
[root@centos-7 ~]#
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.srv.magticom.ge
* epel: epel.mirror.srv.magticom.ge
* extras: centos.mirror.srv.magticom.ge
* updates: centos.mirror.srv.magticom.ge
Available Packages
Name : dhcp
Arch : x86_64
Epoch : 12
Version : 4.2.5
Release : 47.el7.centos
Size : 511 k
Repo : base/7/x86_64
Summary : Dynamic host configuration protocol software
URL : http://isc.org/products/DHCP/
License : ISC
Description : DHCP (Dynamic Host Configuration Protocol) is a protocol which
: allows individual devices on an IP network to get their own
: network configuration information (IP address, subnetmask,
: broadcast address, etc.) from a DHCP server. The overall purpose
: of DHCP is to make it easier to administer a large network.
:
: To use DHCP on your network, install a DHCP service (or relay
: agent), and on clients run a DHCP client daemon. The dhcp package
: provides the ISC DHCP service and relay agent.
[root@centos-7 ~]#
დავაინსტალიროთ:
[root@centos-7 ~]# yum install dhcp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.srv.magticom.ge
* epel: epel.mirror.srv.magticom.ge
* extras: centos.mirror.srv.magticom.ge
* updates: centos.mirror.srv.magticom.ge
Resolving Dependencies
Running transaction check
Package dhcp.x86_64 12:4.2.5-47.el7.centos will be installed
Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dhcp x86_64 12:4.2.5-47.el7.centos base 511 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 511 k
Installed size: 1.4 M
Is this ok [y/d/N]: y
Downloading packages:
dhcp-4.2.5-47.el7.centos.x86_64.rpm | 511 kB 00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 12:dhcp-4.2.5-47.el7.centos.x86_64 1/1
Verifying : 12:dhcp-4.2.5-47.el7.centos.x86_64 1/1
Installed:
dhcp.x86_64 12:4.2.5-47.el7.centos
Complete!
[root@centos-7 ~]#
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.srv.magticom.ge
* epel: epel.mirror.srv.magticom.ge
* extras: centos.mirror.srv.magticom.ge
* updates: centos.mirror.srv.magticom.ge
Resolving Dependencies
Running transaction check
Package dhcp.x86_64 12:4.2.5-47.el7.centos will be installed
Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
dhcp x86_64 12:4.2.5-47.el7.centos base 511 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 511 k
Installed size: 1.4 M
Is this ok [y/d/N]: y
Downloading packages:
dhcp-4.2.5-47.el7.centos.x86_64.rpm | 511 kB 00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 12:dhcp-4.2.5-47.el7.centos.x86_64 1/1
Verifying : 12:dhcp-4.2.5-47.el7.centos.x86_64 1/1
Installed:
dhcp.x86_64 12:4.2.5-47.el7.centos
Complete!
[root@centos-7 ~]#
მოვძებნოთ კონფიგურაციის ფაილი, დოკუმენტაციის მიხედვით ეს არის dhpd.conf
[root@levglonti-workstation ~]# rpm -ql dhcp-server|grep dhcpd.conf
/etc/dhcp/dhcpd.conf
/usr/share/doc/dhcp-server/dhcpd.conf.example
/usr/share/doc/dhcp-server/ldap/dhcpd-conf-to-ldap
/usr/share/man/man5/dhcpd.conf.5.gz
[root@levglonti-workstation ~]#
/etc/dhcp/dhcpd.conf
/usr/share/doc/dhcp-server/dhcpd.conf.example
/usr/share/doc/dhcp-server/ldap/dhcpd-conf-to-ldap
/usr/share/man/man5/dhcpd.conf.5.gz
[root@levglonti-workstation ~]#
დათვალიერებამ აღმოაჩინა, რომ ამ ფაილში არაფერი განსაკუთრებული არ წერია :) საყვარლად მითითებულია, რომ გავეცნოთ სამაგალითო კონფიგურაციის ფაილს და შესაბამის man გვერდს
[root@levglonti-workstation ~]# cat /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp-server/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
[root@levglonti-workstation ~]#
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp-server/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
[root@levglonti-workstation ~]#
ჩემი საჭიროებების ანალიზის შემდეგ მიღებული კონფიგურაციის ფაილი ასე გამოიყურება:
option domain-name "my.lan";
option domain-name-servers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.254;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
next-server 192.168.1.2;
filename "pxelinux.0";
}
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.254;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
next-server 192.168.1.2;
filename "pxelinux.0";
}
ყურადღებას გავამახვილებ ბოლო ორ ხაზზე:
next-server 192.168.1.2 - განსაზღვრავს სერვერის მისამართს, რომლისგანაც უნდა მოხდეს ჩამტვირთველის (ე.წ. bootloader) გადმოწერა. როგორც წესი, კომუნიკაცია ხდება tftp პროტოკოლით. ამ შემთხვევაში ეს არის 192.168.1.2
filename "pxelinux.0" - განსაზღვრავს ჩამტვირთველის (bootloader -ის) შემცველი ფაილის სახელს. ამ შემთხვევაში ეს არის pxelinux.0
შემდეგი ნაბიჯი იქნება tftp სერვერის დაყენება და გამართვა.
[root@horizont-server ~]# yum search tftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.centos.ge
* epel: mirror.23media.de
* extras: mirror.centos.ge
* updates: mirror.centos.ge
============================== N/S matched: tftp ===============================
syslinux-tftpboot.x86_64 : SYSLINUX modules in /var/lib/tftpboot, available for
: network booting
tftp.x86_64 : The client for the Trivial File Transfer Protocol (TFTP)
tftp-server.x86_64 : The server for the Trivial File Transfer Protocol (TFTP)
Name and summary matches only, use "search all" for everything.
[root@horizont-server ~]#
Loading mirror speeds from cached hostfile
* base: mirror.centos.ge
* epel: mirror.23media.de
* extras: mirror.centos.ge
* updates: mirror.centos.ge
============================== N/S matched: tftp ===============================
syslinux-tftpboot.x86_64 : SYSLINUX modules in /var/lib/tftpboot, available for
: network booting
tftp.x86_64 : The client for the Trivial File Transfer Protocol (TFTP)
tftp-server.x86_64 : The server for the Trivial File Transfer Protocol (TFTP)
Name and summary matches only, use "search all" for everything.
[root@horizont-server ~]#
დაბრუნებული სიიდან დაგვჭირდება tftp-server და syslinux-tftpboot პაკეტების დაყენება. ამ უკანასკნელში შედის syslinux ჩამტვირთველი და მისი მოდულები.
[root@horizont-server ~]# yum install tftp-server syslinux-tftpboot
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.centos.ge
* epel: mirror.23media.de
* extras: mirror.centos.ge
* updates: mirror.centos.ge
Resolving Dependencies
--> Running transaction check
---> Package syslinux-tftpboot.x86_64 0:4.05-13.el7 will be installed
--> Processing Dependency: syslinux for package: syslinux-tftpboot-4.05-13.el7.x86_64
---> Package tftp-server.x86_64 0:5.2-13.el7 will be installed
--> Running transaction check
---> Package syslinux.x86_64 0:4.05-13.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
syslinux-tftpboot x86_64 4.05-13.el7 base 429 k
tftp-server x86_64 5.2-13.el7 base 44 k
Installing for dependencies:
syslinux x86_64 4.05-13.el7 base 989 k
Transaction Summary
================================================================================
Install 2 Packages (+1 Dependent package)
Total download size: 1.4 M
Installed size: 3.7 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): syslinux-4.05-13.el7.x86_64.rpm | 989 kB 00:02
(2/3): syslinux-tftpboot-4.05-13.el7.x86_64.rpm | 429 kB 00:06
(3/3): tftp-server-5.2-13.el7.x86_64.rpm | 44 kB 00:06
--------------------------------------------------------------------------------
Total 211 kB/s | 1.4 MB 00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : syslinux-4.05-13.el7.x86_64 1/3
Installing : syslinux-tftpboot-4.05-13.el7.x86_64 2/3
Installing : tftp-server-5.2-13.el7.x86_64 3/3
Verifying : syslinux-4.05-13.el7.x86_64 1/3
Verifying : tftp-server-5.2-13.el7.x86_64 2/3
Verifying : syslinux-tftpboot-4.05-13.el7.x86_64 3/3
Installed:
syslinux-tftpboot.x86_64 0:4.05-13.el7 tftp-server.x86_64 0:5.2-13.el7
Dependency Installed:
syslinux.x86_64 0:4.05-13.el7
Complete!
[root@horizont-server ~]#
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.centos.ge
* epel: mirror.23media.de
* extras: mirror.centos.ge
* updates: mirror.centos.ge
Resolving Dependencies
--> Running transaction check
---> Package syslinux-tftpboot.x86_64 0:4.05-13.el7 will be installed
--> Processing Dependency: syslinux for package: syslinux-tftpboot-4.05-13.el7.x86_64
---> Package tftp-server.x86_64 0:5.2-13.el7 will be installed
--> Running transaction check
---> Package syslinux.x86_64 0:4.05-13.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
syslinux-tftpboot x86_64 4.05-13.el7 base 429 k
tftp-server x86_64 5.2-13.el7 base 44 k
Installing for dependencies:
syslinux x86_64 4.05-13.el7 base 989 k
Transaction Summary
================================================================================
Install 2 Packages (+1 Dependent package)
Total download size: 1.4 M
Installed size: 3.7 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): syslinux-4.05-13.el7.x86_64.rpm | 989 kB 00:02
(2/3): syslinux-tftpboot-4.05-13.el7.x86_64.rpm | 429 kB 00:06
(3/3): tftp-server-5.2-13.el7.x86_64.rpm | 44 kB 00:06
--------------------------------------------------------------------------------
Total 211 kB/s | 1.4 MB 00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : syslinux-4.05-13.el7.x86_64 1/3
Installing : syslinux-tftpboot-4.05-13.el7.x86_64 2/3
Installing : tftp-server-5.2-13.el7.x86_64 3/3
Verifying : syslinux-4.05-13.el7.x86_64 1/3
Verifying : tftp-server-5.2-13.el7.x86_64 2/3
Verifying : syslinux-tftpboot-4.05-13.el7.x86_64 3/3
Installed:
syslinux-tftpboot.x86_64 0:4.05-13.el7 tftp-server.x86_64 0:5.2-13.el7
Dependency Installed:
syslinux.x86_64 0:4.05-13.el7
Complete!
[root@horizont-server ~]#
გადავხედოთ tftp სერვისის უნიტის ფაილს:
[root@horizont-server ~]# cat /usr/lib/systemd/system/tftp.service
[Unit]
Description=Tftp Server
Requires=tftp.socket
Documentation=man:in.tftpd
[Service]
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot
StandardInput=socket
[Install]
Also=tftp.socket
[root@horizont-server ~]#
[Unit]
Description=Tftp Server
Requires=tftp.socket
Documentation=man:in.tftpd
[Service]
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot
StandardInput=socket
[Install]
Also=tftp.socket
[root@horizont-server ~]#
შეგვიძლია დავრწმუნდეთ, რომ სერვერის root კატალოგი არის /var/lib/tftpboot
pxelinux-ის დოკუმენტაციის თანახმად, pxelinux.0, ldlinux.c32 და სხვა მოდულები უნდა განთავსდნენ tftp სერვერის root კატალოგში (შესაძლებელია ასევე ქვეკატალოგებშიც, მაგრამ ამ შემთხვევაში საჭირო იქნება შესაბამისი path-ების კორექტირება).
დავათვალიეროთ, რა ფაილები ჩაწერა syslinux-tftpboot პაკეტმა /var/lib/tftpboot კატალოგში:
[root@horizont-server ~]# ls /var/lib/tftpboot/
cat.c32 ethersel.c32 int18.com menu.c32 sanboot.c32
chain.c32 gfxboot.c32 kbdmap.c32 pcitest.c32 sdi.c32
cmd.c32 gpxecmd.c32 linux.c32 pmload.c32 sysdump.c32
config.c32 gpxelinux.0 ls.c32 poweroff.com ver.com
cpuid.c32 hdt.c32 lua.c32 pwd.c32 vesainfo.c32
cpuidtest.c32 host.c32 mboot.c32 pxechain.com vesamenu.c32
disk.c32 ifcpu64.c32 memdisk pxelinux.0 vpdtest.c32
dmitest.c32 ifcpu.c32 memdump.com reboot.c32 whichsys.c32
elf.c32 ifplop.c32 meminfo.c32 rosh.c32 zzjson.c32
[root@horizont-server ~]#
cat.c32 ethersel.c32 int18.com menu.c32 sanboot.c32
chain.c32 gfxboot.c32 kbdmap.c32 pcitest.c32 sdi.c32
cmd.c32 gpxecmd.c32 linux.c32 pmload.c32 sysdump.c32
config.c32 gpxelinux.0 ls.c32 poweroff.com ver.com
cpuid.c32 hdt.c32 lua.c32 pwd.c32 vesainfo.c32
cpuidtest.c32 host.c32 mboot.c32 pxechain.com vesamenu.c32
disk.c32 ifcpu64.c32 memdisk pxelinux.0 vpdtest.c32
dmitest.c32 ifcpu.c32 memdump.com reboot.c32 whichsys.c32
elf.c32 ifplop.c32 meminfo.c32 rosh.c32 zzjson.c32
[root@horizont-server ~]#
როგორც ჩანს, pxelinux.0 და ldlinux.c32 აქაა. დავიწყოთ pxelinux-ის კონფიგურაციის გამართვა. დოკუმენტაციის თანახმად, ზოგადი კონფიგურაციის ფაილი არის /var/lib/tftpboot/pxelinux.cfg/default
ამ ფაილის სინტაქსი იმეორებს syslinux-ის კონფიგურაციის სინტაქსს. ქვემოთ მოვიყვან კონფიგურაციის ფაილის მაგალითს, რომელიც ჩატვირთვის დროს უჩვენებს მენიუს და საშუალებას მოგვცემს ჩავტვირთოთ acronis trueimage, acronis disk director, memtest86+ და viktoria უტილიტები.
ამ მიზნების მისაღწევად კონფიგურაციაში გამოვიყენებ syslinux-ის მოდულებს - menu.c32 (მენიუს საჩვენებლად) და memdisk (iso და img ტიპის იმიჯების ოპერატიულ მეხსიერებაში ჩასატვირთად - ძალიან მოსახერხებელია, იმიტომ რომ კონკრეტული დისტრიბუტივის ჩატვირთვის მექანიზმის/კონფიგურაციის გარჩევის აუცილებლობა იხსნება, სისტემა ისევე იტვირთება, თითქოს ჩატვირთვის მოწყობილობა cd/dvd ან floppy იყოს)
default menu.c32
prompt 0
timeout 600
menu title "Levglonti's LAN Boot Service"
label Victoria
kernel memdisk
kernel memdisk
initrd /utils/viktoria-3.5.img
append floppy raw
label memtest
kernel memdisk
initrd /utils/MEMTEST.IMG
append floppy raw
label Acronis Trueimage 2013
kernel memdisk
initrd /utils/atih2013.iso
append iso raw
label Acronis Disk Director
kernel memdisk
initrd /utils/adds.iso
append iso raw
ალბათ შენიშნავდით, რომ ეს იმიჯები განთავსებული უნდა იყოს /var/lib/tftpboot/utils კატალოგში. ასევე გასათვალისწინებელია, რომ Linux-ში ფაილის სახელში სიმბოლოების რეგისტრს მნიშვნელობა აქვს.
ბოლო ეტაპზე საჭიროა ჩავრთოთ dhcp და tftp სერვერები და გადავამოწმოთ სტატუსი:
[root@horizont-server ~]# systemctl start {dhcpd,tftp}
[root@horizont-server ~]# systemctl status {dhcpd,tftp} -l
● dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
Active: active (running) since ორშ 2017-03-27 22:38:40 +04; 1min 34s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Main PID: 39649 (dhcpd)
Status: "Dispatching packets..."
CGroup: /system.slice/dhcpd.service
└─39649 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid
მარ 27 22:38:40 horizont-server dhcpd[39649]: No subnet declaration for virbr0 (192.168.122.1).
მარ 27 22:38:40 horizont-server dhcpd[39649]: ** Ignoring requests on virbr0. If this is not what
მარ 27 22:38:40 horizont-server dhcpd[39649]: you want, please write a subnet declaration
მარ 27 22:38:40 horizont-server dhcpd[39649]: in your dhcpd.conf file for the network segment
მარ 27 22:38:40 horizont-server dhcpd[39649]: to which interface virbr0 is attached. **
მარ 27 22:38:40 horizont-server dhcpd[39649]:
მარ 27 22:38:40 horizont-server dhcpd[39649]: Listening on LPF/eno1/34:64:a9:95:61:60/192.168.1.0/24
მარ 27 22:38:40 horizont-server dhcpd[39649]: Sending on LPF/eno1/34:64:a9:95:61:60/192.168.1.0/24
მარ 27 22:38:40 horizont-server dhcpd[39649]: Sending on Socket/fallback/fallback-net
მარ 27 22:38:40 horizont-server systemd[1]: Started DHCPv4 Server Daemon.
● tftp.service - Tftp Server
Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
Active: active (running) since ორშ 2017-03-27 22:38:48 +04; 1min 26s ago
Docs: man:in.tftpd
Main PID: 39657 (in.tftpd)
CGroup: /system.slice/tftp.service
└─39657 /usr/sbin/in.tftpd -s /var/lib/tftpboot
მარ 27 22:38:48 horizont-server systemd[1]: Started Tftp Server.
მარ 27 22:38:48 horizont-server systemd[1]: Starting Tftp Server...
[root@horizont-server ~]#
[root@horizont-server ~]# systemctl status {dhcpd,tftp} -l
● dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
Active: active (running) since ორშ 2017-03-27 22:38:40 +04; 1min 34s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Main PID: 39649 (dhcpd)
Status: "Dispatching packets..."
CGroup: /system.slice/dhcpd.service
└─39649 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid
მარ 27 22:38:40 horizont-server dhcpd[39649]: No subnet declaration for virbr0 (192.168.122.1).
მარ 27 22:38:40 horizont-server dhcpd[39649]: ** Ignoring requests on virbr0. If this is not what
მარ 27 22:38:40 horizont-server dhcpd[39649]: you want, please write a subnet declaration
მარ 27 22:38:40 horizont-server dhcpd[39649]: in your dhcpd.conf file for the network segment
მარ 27 22:38:40 horizont-server dhcpd[39649]: to which interface virbr0 is attached. **
მარ 27 22:38:40 horizont-server dhcpd[39649]:
მარ 27 22:38:40 horizont-server dhcpd[39649]: Listening on LPF/eno1/34:64:a9:95:61:60/192.168.1.0/24
მარ 27 22:38:40 horizont-server dhcpd[39649]: Sending on LPF/eno1/34:64:a9:95:61:60/192.168.1.0/24
მარ 27 22:38:40 horizont-server dhcpd[39649]: Sending on Socket/fallback/fallback-net
მარ 27 22:38:40 horizont-server systemd[1]: Started DHCPv4 Server Daemon.
● tftp.service - Tftp Server
Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
Active: active (running) since ორშ 2017-03-27 22:38:48 +04; 1min 26s ago
Docs: man:in.tftpd
Main PID: 39657 (in.tftpd)
CGroup: /system.slice/tftp.service
└─39657 /usr/sbin/in.tftpd -s /var/lib/tftpboot
მარ 27 22:38:48 horizont-server systemd[1]: Started Tftp Server.
მარ 27 22:38:48 horizont-server systemd[1]: Starting Tftp Server...
[root@horizont-server ~]#
როგორც ჩანს, ყველაფერი რიგზეა. ახლა systemd-ს მივუთითოთ, რომ სისტემის შემდეგი გაშვებისას ავტომატურად გაუშვას ეს სერვისები:
[root@horizont-server ~]# systemctl enable {dhcpd,tftp}
Created symlink from /etc/systemd/system/multi-user.target.wants/dhcpd.service to /usr/lib/systemd/system/dhcpd.service.
Created symlink from /etc/systemd/system/sockets.target.wants/tftp.socket to /usr/lib/systemd/system/tftp.socket.
[root@horizont-server ~]#
Created symlink from /etc/systemd/system/multi-user.target.wants/dhcpd.service to /usr/lib/systemd/system/dhcpd.service.
Created symlink from /etc/systemd/system/sockets.target.wants/tftp.socket to /usr/lib/systemd/system/tftp.socket.
[root@horizont-server ~]#
ესაა საბოლოო ეტაპი. ამის შემდეგ საჭიროა კომპიუტერი ფიზიკუად ამ სერვერის ქსელში იყოს და ჩატვირთვის მოწყობილობად არჩეულ იქნას ქსელის ბარათი.
იმედი მაქვს, რომ ყველაფერი კარგად ჩაივლის. თუ რაიმე არ გამოვა, დაწერეთ კომენტარები და ერთად შევეჭიდოთ :)
სასარგებლო ბმულები:
ძველი პოსტი მსგავს თემაზე: LTSP Server-ის გამართვა Fedora 12-ზე
FB-ზე ჩანაწერი syslinux-ით usb ჩამტვირთველი მოწყობილობის შესახებ
Dynamic Host Configuration Protocol (DHCP) and Bootstrap Protocol (BOOTP) Parameters
Syslinux & Pxelinux -ის დოკუმენტაცია
პროგრამა Victoria
პროგრამა Memtest86+
Comments
Post a Comment