Difference between revisions of "Set up PXE boot VM"
From HallCWiki
(→PXE boot VM) |
(→x86_64) |
||
Line 35: | Line 35: | ||
== Set up the filesystem and NFS export == | == Set up the filesystem and NFS export == | ||
=== x86_64 === | === x86_64 === | ||
− | * The root/ NFS mount is defined in | + | * The root/ NFS mount is defined in /tftpboot/linux-diskless/pxelinux.cfg/default |
− | * | + | * Copy the file system over from cdaqfs1 to cdaqpxe: |
<pre> | <pre> | ||
cdaqfs1: /diskless/CentOS7/x86_64 | cdaqfs1: /diskless/CentOS7/x86_64 | ||
</pre> | </pre> | ||
+ | * Change the root mount NFS server IP to cdaqpxe in /tftpboot/linux-diskless/pxelinux.cfg/default | ||
+ | * Change the snapshot mount NFS server at /diskless/CentOS7/x86_64/root/etc/sysconfig/readonly-root | ||
+ | * Copy the home mount over from cdaqfs1 to cdaqpxe: | ||
+ | <pre> | ||
+ | cdaqfs1: /home/diskless/hccoda | ||
+ | </pre> | ||
+ | * Change the home mount NFS server at /diskless/CentOS7/x86_64/root/etc/auto.master.d/auto.home | ||
+ | * Set up the NFS exports at cdaqpxe: /etc/exports |
Revision as of 10:49, 2 July 2024
Contents
PXE boot VM
- The ROCs and VTPs are booted using PXEboot. The PXEboot is hosted in a virtual machine located at the Hall ESX clusters. The VM name is "cdaqpxe.jlab.org"
Set up the PXE boot
- Install required packages: yum install nfs-utils tftp-server syslinux-tftpboot syslinux
- Enable tftp as root: (an explanation about tftp.service and tftp.socket: [1])
systemctl enable tftp.socket systemctl start tftp.socket
- Create PXE boot directory:
cd /tftpboot mkdir linux-diskless
- Set up PXE boot configurations
cd /tftpboot/linux-diskless cp /usr/share/syslinux/pxelinux.0 . (This turns out not working. Instead, do: scp root@cdaqfs1:/tftpboot/linux-diskless/pxelinux.0 ) scp -r root@cdaqfs1:/tftpboot/linux-diskless/pxelinux.cfg .
- Copy boot images from cdaqfs1 to /tftpboot/linux-diskless/:
scp -r root@cdaqfs1:/tftpboot/linux-diskless/boot .
- Edit tftp systemd configuration file to let the tftp directory point to the /tftpboot:
vi /usr/lib/systemd/system/tftp.service
and change:
ExecStart=/usr/sbin/in.tftpd -s /tftpboot
Set up the filesystem and NFS export
x86_64
- The root/ NFS mount is defined in /tftpboot/linux-diskless/pxelinux.cfg/default
- Copy the file system over from cdaqfs1 to cdaqpxe:
cdaqfs1: /diskless/CentOS7/x86_64
- Change the root mount NFS server IP to cdaqpxe in /tftpboot/linux-diskless/pxelinux.cfg/default
- Change the snapshot mount NFS server at /diskless/CentOS7/x86_64/root/etc/sysconfig/readonly-root
- Copy the home mount over from cdaqfs1 to cdaqpxe:
cdaqfs1: /home/diskless/hccoda
- Change the home mount NFS server at /diskless/CentOS7/x86_64/root/etc/auto.master.d/auto.home
- Set up the NFS exports at cdaqpxe: /etc/exports