setup_chkboot() {
    echo "probing testing environment"
    mountpoint="/boot"
    partition="$(findmnt --noheadings --target "${boot}" --output SOURCE)"
    disk="$(lsblk --paths -noheadings --output pkname "${partition}")"

    echo " mountpoint: ${mountpoint}"
    echo " partition: ${partition}"
    echo " disk: ${disk}"

    echo "adjusting configuration file"
    sed -e "s@^\\(BOOTDIR\\)=.*@\\1=${mountpoint}@g" \
        -e "s@^\\(BOOTPART\\)=.*@\\1=${partition}@g" \
        -e "s@^\\(BOOTDISK\\)=.*@\\1=${disk}@g" \
        -i "/etc/default/chkboot"

    chkboot -u

    echo "ready to test"
}
