Trouble with Netinstall using Linux

Having fought Netinstall on windows, I thought I’d try Linux. He’s what I found:

Starting with a fully updated Raspberry Pi, and following the instructions directly from the Mikrotik site:

  1. The first instruction “wget https://download.mikrotik.com/routeros/[VERSION]/netinstall-[VERSION].tar.gz” did not work. Got a 404 error. Changing from HTTPS to HTTP did the trick and downloaded OK
  2. Extract the files with “tar -xzf netinstall-[VERSION].tar.gz”. This worked
  3. Run the installation tool with “./netinstall -a 192.168.88.3 routeros-arm64-[VERSION].npk”. Error cannot execute binary file.
  4. Run installation tool with “sudo ./netinstall -a 192.168.88.3 routeros-arm64-[VERSION].npk”. Syntax error “(” unexpected

This is where things stand for me. I’m certainly no Linux expert, and I could use some help. I was hoping that Linux would be a bit easier that Netinstall using Windows.

How do I fix the syntax error noted in 4) above? In general, what am I doing wrong?

Help appreciated.

The netinstall binary is compiled for intel architectures (i686/x86_64) and won’t run on arm devices, like a Raspberry PI.

Thanks. I’ll find an old beige box, load Linux and start again.

Loaded Ubuntu on a X86 machine, and downloaded and extracted the installation package. At the installation line, I got the syntax error “(” Unexpected.

Do I need to edit this script?

Help appreciated.

Does it run correctly without using sudo? It runs fine on a Linux VM in my lab using root.

No it does not work w/o SUDO. This gives an ‘invalid file path’ error.

I looked at the TAR archive, and it only contains 2 files: License.txt and Netinstall. I don’t think I downloaded the right stuff. Could you please list the exact commands you used to download, extract and install the software to the Mikrotik. I’m a Linux learner, but am somewhat comfortable at the command line from the DOS days.

Thanks for any help.

Final update. Thanks to those who helped me, both on the Mikrotik forum and on Reddit.

Netinstall using Linux – what I’ve learned:

  1. Netinstall on Windows is somewhat of a crapshoot. I wanted to try Linux to see is it was any easier. I know a ‘little’ about Linux, so I had to learn more.

  2. Netinstall on a Raspbertry Pi will not work, The Linux Netinstall is x86 only.

  3. I had an old Windows PC, and downloaded the latest Ubuntu build to a USB stick. I booted from the USB drive and made this PC dual boot with the latest Linux build. Partition resizing is automatic. Ubuntu boots up in GUI mode, but all our work will be at the command line.

  4. I configured the PC under Ubuntu for both WiFi and Ethernet. I downloaded both the Netinstall and RouterOS archives over WiFi. Open a terminal window. I used the commands:
    • wget https://download.mikrotik.com/routeros/6.48.6/netinstall-6.48.6.tar.gz
    • wget https://download.mikrotik.com/routeros/6.48.6/routeros-mipsbe-6.48.6.npk

  5. Then I disabled WiFi (upper right corner on Ubuntu)

  6. Then, at the command line, uncompress the archive:
    • tar -xzf netinstall-6.48.6.tar.gz

  7. Then configure the PC ethernet port for fixed IP address 192.168.88.2, Netmask 255.255.255.0, Gateway 192.168.88.1. Upper right corner on Ubuntu. On the pull down menu, go to Settings, Network, Wired, Gear icon.

  8. Then, at the Linux command line:
    • sudo ./netinstall -a 192.168.88.3 routeros-mipbse-6.48.6.npk

  9. You should see a dialog like this:
    • Using server IP: 192.168.88.2
    • Starting PXE server
    • Waiting for RouterBOARD…

  10. Then plug the ethernet cable into port 1 on your Mikrotik device. Hold reset button in, apply power, and wait = light steady, light flashing, light off. When the light goes off, immediately release the reset button. On the Linux terminal windows, you should see:

• PXE client: 01:23:45:67:89:10
• Sending image: mips
• Discovered RouterBOARD…
• Formatting…
• Sending package routeros-mipsbe-6.48.6.npk …
• Ready for reboot…
• Sent reboot command

  1. Just like on Window, this may take a few tries. Keep at it. If unsuccessful, unplug power, and repeat the sudo ./netinstall command (above)
  2. Is it easier / more reliable than Netinstall on Windows? Maybe a little better. Give it a shot.

Two years later your detailed post saved my hAP AC router from boot loop of death :laughing:
Is up and running like new.
Thank you very much.