Buscar

Este contenido no está disponible en el idioma seleccionado.

24.3. Configuring an Exported File System for Diskless Clients

download PDF

Prerequisites

Procedure

  1. The root directory of the exported file system (used by diskless clients in the network) is shared via NFS. Configure the NFS service to export the root directory by adding it to /etc/exports. For instructions on how to do so, see the Section 8.6.1, “The /etc/exports Configuration File”.
  2. To accommodate completely diskless clients, the root directory should contain a complete Red Hat Enterprise Linux installation. You can either clone an existing installation or install a new base system:
    • To synchronize with a running system, use the rsync utility:
      # rsync -a -e ssh --exclude='/proc/*' --exclude='/sys/*' \
             hostname.com:/exported-root-directory
      • Replace hostname.com with the hostname of the running system with which to synchronize via rsync.
      • Replace exported-root-directory with the path to the exported file system.
    • To install Red Hat Enterprise Linux to the exported location, use the yum utility with the --installroot option:
      # yum install @Base kernel dracut-network nfs-utils \
            --installroot=exported-root-directory --releasever=/
      
The file system to be exported still needs to be configured further before it can be used by diskless clients. To do this, perform the following procedure:

Procedure 24.2. Configure File System

  1. Select the kernel that diskless clients should use (vmlinuz-kernel-version) and copy it to the tftp boot directory:
    # cp /boot/vmlinuz-kernel-version /var/lib/tftpboot/
  2. Create the initrd (that is, initramfs-kernel-version.img) with NFS support:
    # dracut --add nfs initramfs-kernel-version.img kernel-version
  3. Change the initrd's file permissions to 644 using the following command:
    # chmod 644 initramfs-kernel-version.img

    Warning

    If the initrd's file permissions are not changed, the pxelinux.0 boot loader will fail with a "file not found" error.
  4. Copy the resulting initramfs-kernel-version.img into the tftp boot directory as well.
  5. Edit the default boot configuration to use the initrd and kernel in the /var/lib/tftpboot/ directory. This configuration should instruct the diskless client's root to mount the exported file system (/exported/root/directory) as read-write. Add the following configuration in the /var/lib/tftpboot/pxelinux.cfg/default file:
    default rhel7
    
    label rhel7
      kernel vmlinuz-kernel-version
      append initrd=initramfs-kernel-version.img root=nfs:server-ip:/exported/root/directory rw
    Replace server-ip with the IP address of the host machine on which the tftp and DHCP services reside.
The NFS share is now ready for exporting to diskless clients. These clients can boot over the network via PXE.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.