Updating to the new PXE Shell OS

Updating to the new PXE Shell OS #

This is for SynergyCP 4.x and older. The new PXE Shell OS is included by default in Synergy 5.0+ installations.

Replace your Format Quick template with the following:

if [ -f "/synergy/version" ]; then
    version=`cat /synergy/version`
    echo "Found Version $version Shell OS"
    for disk in $(find /dev/sd[a-z])
    do
        echo "wiping $disk"
        blkdiscard $disk
        wipefs -a -f $disk
    done
    for disk in $(find /dev/nvme[0-9]n[1-9])
    do
        echo "wiping $disk"
        nvme format -f $disk
        wipefs -a -f $disk
    done
else
    echo "Running on old Shell OS or no version file"
    echo "Falling back to old wipe method"
    for disk in $(find /dev/sd[a-z] /dev/nvme[0-9]n[1-9])
    do
        dd if=/dev/zero of=$disk bs=512 seek=$(( $(blockdev --getsz $disk) - 1024 )) count=1024
        dd bs=512 count=63 if=/dev/zero of=$disk
    done
fi
  • Sync your file server children