Install failed Mikrotik RB

No install.

  • Step:1
http://192.168.1.1/cgi-bin/luci/

Bad Gateway
The process did not produce any response

SSH connection:

root@OpenWrt:~# free
              total        used        free      shared  buff/cache   available
Mem:          26908        9644        6560          60       10704       14972
Swap:             0           0           0

Upload via scp:

openwrt-19.07.9-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sy
supgrade.bin /tmp/
root@OpenWrt:~# free
              total        used        free      shared  buff/cache   available
Mem:          26908        9496        1668        5100       15744         604
Swap:             0           0           0
  • Step: 2
root@OpenWrt:~# sysupgrade  -v /tmp/openwrt-19.07.9-ar71xx-mikrotik-rb-nor-flash
-16M-squashfs-sysupgrade.bin

log:

Killed
Failed to parse message data
sh: out of range
Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Killed
  • Step:3
root@OpenWrt:~# sysupgrade -n  -v /tmp/openwrt-19.07.9-ar71xx-mikrotik-rb-nor-fl
ash-16M-squashfs-sysupgrade.bin

log:

Killed
Failed to parse message data
sh: out of range
Commencing upgrade. Closing all shell sessions.
Killed
  • Step: 4
root@OpenWrt:~# mtd -r write /tmp/openwrt-19.07.9-ar71xx-mikrotik-rb-nor-flash-1
6M-squashfs-sysupgrade.bin

log:

Usage: mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]

The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
        unlock                  unlock the device
        refresh                 refresh mtd partition
        erase                   erase all data on device
        verify <imagefile>|-    verify <imagefile> (use - for stdin) to device
        write <imagefile>|-     write <imagefile> (use - for stdin) to device
        jffs2write <file>       append <file> to the jffs2 partition on the devi                                 ce
        fixtrx                  fix the checksum in a trx header on first boot
        fixseama                fix the checksum in a seama header on first boot
        fixwrgg                 fix the checksum in a wrgg header on first boot
Following options are available:
        -q                      quiet mode (once: no [w] on writing,
                                           twice: no status messages)
        -n                      write without first erasing the blocks
        -r                      reboot after successful command
        -f                      force write without trx checks
        -e <device>             erase <device> before executing the command
        -d <name>               directory for jffs2write, defaults to "tmp"
        -j <name>               integrate <file> into jffs2 data when writing an                                  image
        -s <number>             skip the first n bytes when appending data to th                                 e jffs2 partiton, defaults to "0"
        -p <number>             write beginning at partition offset
        -l <length>             the length of data that we want to dump
        -o offset               offset of the image header in the partition(for                                  fixtrx)
        -c datasize             amount of data to be used for checksum calculati                                 on (for fixtrx / fixseama / fixwrg / fixwrgg)

Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
         mtd -r write linux.trx linux

Well, step 4 clearly contains a syntax error...

1 Like

What do you mean?

If sysupgrade is not available.
# Flash firmware
mtd -r write /tmp/firmware_image.bin firmware

I lost

firmware
?

The partition name is firmware ?

Compare your command with the syntax help screen.

Which MikroTik device exactly are we talking about, and which instructions are you following?

1 Like

Instructions from:

p.s. I've missed mtd -r write /tmp/firmware_image.bin firmware

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.