Menyiapkan Suatu Server Instalasi
Lampiran ini ditujukan bagi pengguna dengan pengalaman Linux sebelumnya. Bila Anda pengguna baru, Anda mungkin ingin memasang memakai media boot minimal atau DVD distribusi. |
Ringkasan Instalasi PXE
Preboot Execution Environment, atau PXE, adalah suatu teknologi yang memungkinkan komputer boot secara langsung dari sumber daya yang disediakan melalui jaringan. Memasang Fedora melalui jaringan berarti Anda tidak perlu membuat media, dan Anda dapat memasang ke beberapa komputer atau mesin virtual secara simultan. Proses tersebut melibatkan sejumlah komponen dan fitur yang bekerja bersama untuk menyediakan sumber daya yang diperlukan.
Kebanyakan komputer modern memiliki kapabilitas boot jaringan. Biasanya, suatu tombol fungsi yang ditekan selama boot akan memunculkan suatu menu pemilihan boot. Dalam lingkungan yang dirancang untuk administrasi tanpa pengawasan, sistem seringkali dikonfigurasi agar pertama kali mencoba boot dari jaringan, lalu boot dari penyimpanan lokal, dan server instalasi dikonfigurasi untuk hanya menawarkan instalasi ketika diperlukan. Manual komputer Anda akan memberikan instruksi spesifik tentang menata prioritas boot.
Ketika suatu sistem meminta sebuah alamat selama boot jaringan, server DHCP juga menyediakan lokasi berkas untuk boot. Suatu jaringan mesti hanya punya satu server DHCP.
Karena lingkungan pra-boot sangat sederhana, berkas-berkas mesti disediakan dalam cara yang sangat sederhana. Trivial File Transfer Protocol, atau TFTP, menyediakan sistem dengan bootloader yang diperlukan untuk melanjutkan proses instalasi.
Karena tugas mem-boot suatu sistem operasi terlalu rumit bagi lingkungan pra-boot, suatu bootloader dipakai untuk memuat kernel dari berkas-berkas terkait. Itu juga menyediakan informasi konfigurasi ke installer, dan dapat menawarkan sebuah menu untuk memilih dari konfigurasi yang berbeda.
The kernel is the core of any Linux operating system, and the initramfs provides the kernel with required tools and resources. These files are also provided by tftp.
A Fedora repository must be available for the installation. The example in this section uses the public Fedora mirrors as the repository source, but you can also use a repo on the local network provided by NFS, FTP, or HTTP. Repositories can be configured using the inst.repo= boot option; see Specifying the Installation Source for details.
Konfigurasi Server DHCP
-
Install the dhcp server package.
# dnf install dhcp
-
Create a simple configuration for the dhcp server at
/etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 { authoritative; default-lease-time 600; max-lease-time 7200; ddns-update-style none; option domain-name-servers 192.168.1.1; option routers 192.168.1.1; }
-
Test your configuration and address any problems you discover.
systemctl start dhcpd journalctl --unit dhcpd --since -2m --follow
-
Add entries to point clients to their bootloader and the server that provides it to your subnet configuration in
/etc/dhcp/dhcpd.conf
. Because DHCP clients provide the server with identifying information along with their address request, BIOS clients and UEFI clients can each be directed to the correct bootloader.# refer to RFC4578 for possible arch option values option arch code 93 = unsigned integer 16; subnet 192.168.1.0 netmask 255.255.255.0 { if option arch = 00:07 { filename "uefi/shim.efi"; } else { filename "pxelinux.0"; } next-server 192.168.1.2; ...
-
Restart the dhcp service to check the configuration and make changes as needed.
systemctl restart dhcpd journalctl --unit dhcpd --since -2m --follow
Installing the tftp server
-
Install the tftp server package.
# dnf install tftp-server
-
Start and enable the
tftp socket
.systemd
will automatically start thetftpd
service when required.# systemctl start tftp.socket # systemctl enable tftp.socket
Providing and configuring bootloaders for PXE clients
-
Get the syslinux bootloader for BIOS clients.
-
Install the syslinux package.
# dnf install syslinux
-
Create a directory for the bootloader files, and make them available there.
# mkdir -p
/var/lib/tftpboot/pxelinux.cfg
# cp/usr/share/syslinux/{pxelinux.0,vesamenu.c32,ldlinux.c32,libcom32.c32,libutil.c32}
/var/lib/tftpboot/
-
-
Get the bootloader files for UEFI systems
-
Install the shim and grub2-efi packages. If your server is a BIOS system, you must install the packages to a temporary install root. Installing them directly on a BIOS machine will attempt to configure the system for UEFI booting and cause problems.
# dnf install shim grub2-efi-x64 --installroot=/tmp/fedora --releasever 30
-
Create a directory for the bootloader files, and make them available there.
# mkdir -p
/var/lib/tftpboot/uefi
# cp/tmp/fedora/boot/efi/EFI/fedora/{shim.efi,grubx64.efi}
/var/lib/tftpboot/uefi/
-
-
Create a boot menu for BIOS clients at
/var/lib/tftpboot/pxelinux.cfg/default
.default vesamenu.c32 prompt 1 timeout 600 label linux menu label ^Install Fedora 30 64-bit menu default kernel f30/vmlinuz append initrd=f30/initrd.img inst.stage2=https://download.fedoraproject.org/pub/fedora/linux/releases/30/Server/x86_64/os/ ip=dhcp label server menu label ^Install Fedora 30 ( Minimal Image ) menu default kernel f30/vmlinuz append initrd=f30/initrd.img inst.stage2=https://download.fedoraproject.org/pub/fedora/linux/releases/30/Server/x86_64/os/ ip=dhcp ks=https://example.com/fedora/kickstarts/minimal.ks label local menu label Boot from ^local drive localboot 0xffff
-
Create a boot menu for UEFI clients at
/var/lib/tftpboot/pxelinux/uefi
.function load_video { insmod efi_gop insmod efi_uga insmod video_bochs insmod video_cirrus insmod all_video } load_video set gfxpayload=keep insmod gzio menuentry 'Install Fedora 64-bit' --class fedora --class gnu-linux --class gnu --class os { linuxefi f30/vmlinuz ip=dhcp inst.repo=https://download.fedoraproject.org/pub/fedora/linux/releases/30/Server/x86_64/os/ initrdefi f30/initrd.img } menuentry 'Install Fedora 30 Server' --class fedora --class gnu-linux --class gnu --class os { kernel f30/vmlinuz append initrd=f30/initrd.img inst.repo=https://download.fedoraproject.org/pub/fedora/linux/releases/30/Server/x86_64/os/ ip=dhcp ks=https://git.fedorahosted.org/cgit/spin-kickstarts.git/plain/fedora-install-server.ks?h=f21 }
Getting the kernel and initrd
-
Create a directory for the files.
# mkdir -p
/var/lib/tftpboot/f30
-
Download the kernel.
# wget https://download.fedoraproject.org/pub/fedora/linux/releases/30/Server/x86_64/os/images/pxeboot/vmlinuz -O /var/lib/tftpboot/f30/vmlinuz
-
Download the initrd
# wget https://download.fedoraproject.org/pub/fedora/linux/releases/30/Server/x86_64/os/images/pxeboot/initrd.img -O /var/lib/tftpboot/f30/initrd.img
Providing repositories
The examples in this section use the public Fedora mirrors as the package source. For faster installations, installing to many systems, or more isolated environments, you may wish to maintain a local repository.
Fedora Infrastructure maintains instructions for a configuring a local mirror at https://fedoraproject.org/wiki/Infrastructure/Mirroring. The preferred method for providing repositories is via HTTP, and you can refer to the Fedora System Administrator’s Guide, available at https://docs.fedoraproject.org/, to configure httpd
.
Advanced network installations with Cobbler
For more complex environments, Fedora offers the cobbler installation server. Tasks like managing kickstart configurtations, coordinating repositories, maintaining dns records, dhcp servers, and even puppet manifests are effectively automated by cobbler.
While levaraging all of the features provided by cobbler can be relatively simple, the full functionality of this powerful tool is too broad to be documented in this guide. The cobbler community provides documentation at https://cobbler.github.io/ to accompany the packages in the Fedora repository.
Alternatively, you may also be interested in Foreman. You can find official documentation as well as downloads on the project website at https://www.theforeman.org/.