Installation and Configuration of CentOS7 Diskless OS for x86_64 and armv7

Table of Contents

1. Installation and Configuration Intro

The following guide describes the installation and configuration of CentOS7 for use with diskless clients running x86_64 (e.g. VME Controllers) or armv7 (VTPs). It's my hope that this will be useful to anyone left to do this on their own.

This guide assumes that you have a DHCP that can be configured with these parameters

filename "pxelinux.0";

Where next-server should reflect the IPv4 address of your (tftp) host machine.

It also assumes that your host machine and VME/VTP have DNS entries.

dnsmasq is a program that can be used to handle TFTP, DHCP, and DNS. Here's a good write-up I found describing it's use with pxelinux: PXELinux using Proxy DHCP

1.1. The Boot Process

1.1.1. VME

BIOS configured for PXE (check your settings from these pages)

  1. DHCP provides info to connect to bootloader
    • ip address
    • tftp server address (your machine's hostname)
    • tftp filename to load (pxelinux.0)
  2. pxelinux
    • boot environment configured pxelinux.cfg/<address files>
    • tftp to get kernel and initial ramdisk
  3. kernel
    • loads up operating system filesystem using NFS

1.1.2. VTP

uboot loaded on power up

  1. uboot
    • environment loaded from env.txt on microSD
    • tftp to get kernel and initial ramdisk
  2. kernel
    • loads up operating system filesystem using NFS

2. Host packages to install

nfs-utils, tftp-server, syslinux-tftpboot, syslinux
  • I installed these on my host system using yum
yum install nfs-utils tftp-server syslinux-tftpboot syslinux

3. Download

3.1. centos7_dist

  • Clone the centos7_dist repo from github
git clone --depth 1

or on site

git clone --depth 1 /site/coda/contrib/devel/centos7_dist

3.2. tgz’s

Download and install the root and tftp pair for your module(s).

  • VTP (armv7):
  • VME (x86_64):
  • I downloaded these and moved them into the tgz directory


4. Configure the distribution

4.1. VME OS

I put together the following configuration for my system:

# The local paths for NFS exports to diskless paths: /, /home, and snapshot files
#   using base path
#       /usr/local/diskless
# Uncomment and set, if running the diskless_* scripts on a machine
#  that's not the indented NFS server.  Otherwise the default is NFS_SERVER_HOSTNAME=$(hostname -s)




# The hostname of our vme controller

# root filesystem and kernel boot files

# kernel boot files specific to TGZ_TFTP version

# tftp files

# Template files

    This is where the centos7 x86_64 filesystem will be unpacked.

    • I updated this path to this location on my host system

    • I only have one VME controller at the moment, it's hostname will be But's short hostname is what is needed here:
    • These ought to be defined in an sample configuration file provided with the tgz's. They contain the root filesystem, and boot files needed for the diskless client.

    Sometimes this path will be different for different types of tftp servers.

    • I'm using tftp-server on RHEL 7. So this path is the default:

The scripts will generate the necessary configuration files and commands to install them (as root or with sudo)


  • I ran this command using my config file as the only argument

    ./ walkthrough_example.cfg
    # Generating yp.conf
    # ... Generated: output/yp.conf
    # Generating home.autofs
    # ... Generated: output/auto.home
    # Generating readonly-root
    # ... Generated: output/readonly-root
    # #   Extract TGZ_ROOT=tgz/root_x86_64-rc5.tgz to
    # #   NFS_ROOT_PATH=/usr/local/diskless/CentOS7/x86_64/root
    install -b -p -m 755 -d /usr/local/diskless/CentOS7/x86_64/root
    tar xzf tgz/root_x86_64-rc5.tgz -C /usr/local/diskless/CentOS7/x86_64/root
    # #  Make the snapshot and home directories
    install -b -p -m 755 -d /usr/local/diskless/CentOS7/x86_64/snapshot
    install -b -p -m 755 -d /usr/local/diskless/CentOS7/x86_64/home
    # #   To install yp.conf
    install -b -p -m 644 output/yp.conf /usr/local/diskless/CentOS7/x86_64/root/etc/yp.conf
    # #   To Install auto.home
    install -b -p -m 644 templates/home.autofs /usr/local/diskless/CentOS7/x86_64/root/etc/auto.master.d/home.autofs
    install -b -p -m 644 output/auto.home /usr/local/diskless/CentOS7/x86_64/root/etc/auto.master.d/auto.home
    # #   To Install readonly-root
    install -b -p -m 644 output/readonly-root /usr/local/diskless/CentOS7/x86_64/root/etc/sysconfig/readonly-root
  • This one generates a number of config files for the client OS and provides the installation commands to be run in sequence using sudo or as the root user.


  • This script generates the exports files needed for NFS

    ./ walkthrough_example.cfg
    # Generating NFS exports...
    #   ... Generated: output/centos7-x86_64.exports
    # To install NFS exports:
    install -b -p -m 644 output/centos7-x86_64.exports /etc/exports.d/centos7-x86_64.exports


  • This script generates the configuration and installation commands for PXE and TFTP.

    ./ walkthrough_example.cfg
    # Generating pxelinux config files
    #   ... Linked: output/81391D92 to centos7-x86_64.default
    # To Install pxelinux config files
    install -b -p -m 755 -d /var/lib/tftpboot/pxelinux.cfg/
    install -b -p -m 644 output/centos7-x86_64.default /var/lib/tftpboot/pxelinux.cfg/
    # Link: /var/lib/tftpboot/pxelinux.cfg/81391D92 to centos7-x86_64.default
    ln -sf centos7-x86_64.default /var/lib/tftpboot/pxelinux.cfg/81391D92
    # Extract TGZ_TFTP=tgz/tftp_x86_64-rc2.tgz to
    # TFTP_KERNEL_PATH=/var/lib/tftpboot/CentOS7-x86_64-Diskless
    install -b -p -m 755 -d /var/lib/tftpboot/CentOS7-x86_64-Diskless/
    tar xzvf tgz/tftp_x86_64-rc2.tgz -C /var/lib/tftpboot/CentOS7-x86_64-Diskless

4.2. VTP OS

If you've got a VTP, the configuration will be very similar, mostly swapping x86_64 with armv7.


    I only have one VTP, it's hostname will be It's short hostname is all that's needed here:


    This parameter is used in the generation of the VTPs environment file. The MAC address is unique for each VTP, and can be obtained from Ben Raydo.


Execute the scripts that were called for the VME OS using the armv7 config file.


This script generates the uboot env.bin that needs to be loaded onto the microSD used by the VTP

./ walkthrough_vtp_example.cfg
# Generating U-Boot Environment
#  output/env.bin now ready for VTP microSD
  • Copy the resulting file output/env.bin to the VTPs microSD FAT partition.

5. Enable and start the NFS-server service

  • As root, execute

    systemctl enable nfs-server.service
    systemctl start nfs-server.service

6. Enable and start the TFTP server

  • As root, execute

    systemctl enable tftp
    systemctl start tftp

7. First Login

7.1. Setup daq account

  • I logged in as root and set up the home directory for the daq account and set its password
ssh root@davme6
/usr/sbin/mkhomedir_helper daq
passwd daq
  • Change the root password while you're at it.
  • Now you can log in as the daq user
ssh daq@davme6

Author: Bryan Moffit <>

Created: 2022-06-30 Thu 20:33