How to bypass “Cannot find Signature” when flashing your Antminer firmware

Bypassing “Cannot find Signature” Error

Follow this steps to enable flashing new firmware on your Antminer over the Web Interface. In order for this method to work, you must have at least available SSH. If you don’t have access to the SSH, then the only way of recovering is using the SD flash method.

Let’s begin:

1. You will need to use a ssh tool like putty.

2. Type the ip address of the miner in putty, keep port 22

3. * if message pop up > click Yes

4. Use – username: root / password: admin (or your own password if you have changed it)

5. Copy and paste this line, then press enter…

cd /www/pages/cgi-bin

6. Now execute the following code to edit the file.

vi upgrade.cgi

7. Use the down arrow and find this code…

if [ ! -f runme.sh.sig ]; then
        echo "Cannot Find Signature!!!" >> /tmp/upgrade_result
else
        openssl dgst -sha256 -verify /etc/bitmain-pub.pem -signature  runme.sh.sig  runme.sh >/dev/null  2>&1
        res=$?
        if [ $res -eq 1 ]; then
                echo "Installer Not Signtured!!!" >> /tmp/upgrade_result
        else
                if [ -f runme.sh ]; then
                        sh runme.sh
                else
                        echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
                fi
        fi
fi

#if [ -f runme.sh ]; then
#       sh runme.sh
#else
#       echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
#fi

8. Click “i” on your keyboard to enter Edit Mode

9. Change the code in step (7) to this code…

  • you don’t have to delete or add any code, this is just commenting and un-commenting parts of the included code
  • add # to the first 15 lines, and remove # from the next 5 lines…
  • adding # meaning the line is commented aka won’t be executed, so what you doing is simply making the miner ignore that IF function that looks for the signature.
  • It should look like the code below
# if [ ! -f runme.sh.sig ]; then
      #  echo "Cannot Find Signature!!!" >> /tmp/upgrade_result
#else
 #  openssl dgst -sha256 -verify /etc/bitmain-pub.pem -signature  runme.sh.sig  runme.sh >/dev/null  2>&1
# res=$?
# if [ $res -eq 1 ]; then
 #   echo "Installer Not Signtured!!!" >> /tmp/upgrade_result
 #else
#    if [ -f runme.sh ]; then
#   sh runme.sh
 # else
# echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
# fi
 # fi
#fi

if [ -f runme.sh ]; then
   sh runme.sh
else
       echo "Incorrect firmware!!!!" >> /tmp/upgrade_result
fi

10. After you are done editing the code, hit ESC key (escape) on your keyboard.

11. Type the following code and hit Enter. This command is to save and exist the modified file.

:wq

12. Type the following code and hit Enter. This command is to exist the SSH session.

:q

13. Now you will be able to flash your desired firmware.

Note: *do this at your own risk. If you have any questions feel free to ask.

Donations:

LiteCoin Address: MQRFZp3fjZi4d5F6mYABKDBMHtayJZZdK9
BitCoin Address: 1GXdZy1YyjSMeZXZWCnuPiiQFbEKaHNMbs

5 thoughts on “How to bypass “Cannot find Signature” when flashing your Antminer firmware”

  1. my code in vnish 3.9.0 looks very different im, having trouble removing the signature error with putty as im not sure what to comment uncomment

    please help

    Reply
    • You just have to edit not only one file but couple – upgrade.cgi and upgrade_clear.cgi. In both you have to change the same parameter. Just yesterday i had the same problem and didn’t have any want to use an SD card near the asic. So i downloaded both files from L3+ with Vnish 3.9.0 via WinSCP, edited them and uploaded back. After that installed (as i remember) 3.8.8 and after that MSK 018. That’s all. If you want to do this with SD card you can download remsig SD card file from vnish.net official web site.

      #if [ ! -f runme.sh.sig ]; then
      # echo “Cannot Find Signature!!!”>> /tmp/upgrade_result
      # ok=0
      #else
      # openssl dgst -sha256 -verify /etc/vnish.pem -signature runme.sh.sig runme.sh >/dev/null 2>&1
      # res=$?
      # if [ $res -ne 0 ]; then
      # openssl dgst -sha256 -verify /etc/bitmain.pem -signature runme.sh.sig runme.sh >/dev/null 2>&1
      # res=$?
      # fi
      # if [ $res -ne 0 ]; then
      # echo “Installer Not Signtured!!!” >> /tmp/upgrade_result
      # ok=0
      # else
      # fi
      #fi

      #
      if [ -f runme.sh ]; then
      sh runme.sh
      else
      echo “Incorrect firmware!!!!” >> /tmp/upgrade_result
      fi
      #

      The same rows in both files.

      Reply

Leave a Comment