PXEBoot

From Michael's Information Zone
Jump to navigation Jump to search

TFTP / VSFTP

[1]

Amazon Linux

  • Install packages
sudo yum install -y syslinux tftp-server vsftpd
  • Copy boot files, create directories, and create config file.
sudo cp -r /usr/share/syslinux/* /var/lib/tftpboot
sudo mkdir /var/lib/tftpboot/pxelinux.cfg
sudo mkdir /var/lib/tftpboot/clonezilla
  • Contents of /var/lib/tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local

menu title ########## PXE Boot Menu ##########

label 1
menu label ^1) Test label

label 2
menu label ^2) Boot Local
  • Download clonezilla files
wget https://plug-mirror.rcac.purdue.edu/osdn//clonezilla/74519/clonezilla-live-2.7.1-22-amd64.zip
cd /var/ftp/pub
sudo unzip ~/clonezilla-live-2.7.1-22-amd64.zip
  • Copy CloneZilla kernel to tfpt
sudo cp /var/ftp/pub/clonezilla/live/vmlinuz /var/lib/tftpboot/clonezilla/
sudo cp /var/ftp/pub/clonezilla/live/initrd.img /var/lib/tftpboot/clonezilla/

DRBL

  • Note that I could not get this to work for my needs. The system is meant for diskless booting and running of an entire OS, too complicated for simply booting install media.

Amazon Linux

[2][3] This is not a supported configuration. During install it checks for the OS version and if the corresponding repos are installed. These steps will trick it into running the installer.

  • Install required packages and repos
sudo amazon-linux-extras install epel
sudo yum install https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/memtest86+-5.01-2.el7.x86_64.rpm
sudo yum install http://free.nchc.org.tw/drbl-core/x86_64/RPMS.drbl-stable/drbl-2.32.10-drbl1.noarch.rpm
  • Create repo file to trick installer /etc/yum.repos.d/CentOS-Base.repo
[Notused]
Name=NotUsed
enabled=0
  • Create release file to trick installer /etc/redhat-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/" 

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
EOF

  • Run installer
sudo drblsrv -i

Notes

No package memtest86+ available.
No package ecryptfs-utils available.
Do you want to install the network installation boot images so that you can let the client computer install some GNU/Linux distributions (Debian, Ubuntu, RedHat Linux, Fedora Core, Mandriva, CentOS and OpenSuSE...) via a network connection?  !!NOTE!! This will download a lot of files (Typically > 100 MB) so it might take a few minutes. If the client computer has a hard drive that you may install GNU/Linux onto, put a Y here. If you answer "no" here, you can run "drbl-netinstall" to install them later.
Installing dhcp, tftp, nfs, yp, mkpxeinitrd-net...
Searching if mkinitrd initscripts lvm2 ntfs-3g xorriso genisoimage mkisofs lshw hwinfo aoetools dmidecode lzop lzma xz xz-utils pixz lzip pigz pbzip2 lbzip2 plzip lrzip pv hfsutils hfsprogs dmsetup dmraid kpartx device-mapper tofrodos dos2unix unix2dos dhcp3-server isc-dhcp-server gdisk btrfs-progs ufsutils disktype efibootmgr syslinux-utils tftp-server iptables-services grub-efi-amd64-bin grub-efi-arm64-bin grub-efi-ia32-bin grub2-efi-modules grub2-efi-x64-modules grub2-efi-ia32-modules monitoring-plugins-basic nmap dnsmasq memtest86+ freedos lz4 zstd nscd shim-signed grub-efi-amd64-signed grub-efi-arm64-signed ldmtool ecryptfs-utils partimage thin-provisioning-tools device-mapper-persistent-data dracut firstboot available...