meraki mx60 install error

Hello,

i have trief to install openwrt/lede on a meraki MX60.
It loads the initramfs image and then after "Verifying Checksum ... OK"
i get this failure:
Wring Ramdisk IMage Format
Ramdisk image is corrupt or invalid

Please help to get lede running.

now i can bootm the mx60

but i get the following error:

VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    3.802956] Please append a correct "root=" boot option; here are the available partitions:
[    3.811285] 1f00            1024 mtdblock0
[    3.811288]  (driver?)
[    3.817812] 1f01            1024 mtdblock1
[    3.817814]  (driver?)
[    3.824336] 1f02             256 mtdblock2
[    3.824338]  (driver?)
[    3.830859] 1f03         1046272 mtdblock3
[    3.830861]  (driver?)
[    3.837382] 1f04         1048576 mtdblock4
[    3.837384]  (driver?)
[    3.843904] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    3.853094] Rebooting in 1 seconds..

I'm stuck at this exact same error.

Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

What did you do to get past this?

You may have wished to open a new thread...

What version of OpenWrt are you using?

I'm trying 18.06.1 (but I've tried images all the way back to LEDE 17.01.0 with the same error)

openwrt-18.06.1-apm821xx-nand-meraki_mx60-initramfs-kernel.bin

I've verified the sha256sum to be certain the file is not corrupted. I feel like I'm missing something obvious here.

  • Don't use version 17, it had issues setting up the partitions and with the LAN switch after flashing

No, the Meraki firmware doesn't boot.

If I reset the unit I see this at the end of the attempted boot

kernel volume not found
recovery volume not found

Yes, I'm following the riptidewave93 instructions from github.

I got this unit second-hand. I never tried to let it boot to the Meraki firmware. I'm wondering if this thing was broken from the start.

Please explain the step you're on when this issue occurs booting the router, then.

Please copy/paste the boot environment configs - by using the command printenv.

Please enclose the information using the coding </> button in the editor.

Step 3, where I boot the OpenWRT 'buck.bin' via tftp is where the issue occurs.

Here is the output of the tftp transfer and then failure to boot the buck.bin, which is a copy of openwrt-18.06.1-apm821xx-nand-meraki_mx60-initramfs-kernel.bin.

=> setenv serverpath; setenv netloadmethod tftpboot; setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=ooDisabling port 1 (reg 0x66c)ki_checkpart meraki_bootlinux
Disabling port 2 (reg 0x678)
Disabling port 3 (reg 0x684)
Disabling port 4 (reg 0x690)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.1
Filename 'buck.bin'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################################
done
Bytes transferred = 7418880 (713400 hex)
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   POWERPC OpenWrt Linux-4.14.63
   Created:      2018-08-16   7:51:15 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    2658586 Bytes =  2.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
=> 

Here's the output of printenv

=> printenv
bootdelay=1
baudrate=115200
loads_echo=
preboot=echo;echo Set serverpath and run meraki_netboot to netboot;echo
nload=${netloadmethod} 200000 ${serverpath}u-boot-nand.bin
nupdate=nand erase 0 0x00200000 ;nand write 200000 0 0x00100000
nupd=run nload nupdate
kernel_addr=fc000000
fdt_addr=fc1e0000
ramdisk_addr=fc200000
pciconfighost=1
pcie_mode=RP:RP
netdev=eth0
ethact=ppc_4xx_eth0
ethaddr=00:01:73:01:23:41
boardtype=pcie
mtd_addr_r=0x4000000
kernel_size=0x400000
fdt_size=0x25000
meraki_bootargs=setenv bootargs root=/dev/ram console=ttyS0,${baudrate} ubi.mtd=ubi MERAKI_BOARD=buck mtdoops.mtddev=oops ${extra_bootargs}
meraki_bootfile=buck.bin
meraki_bootlinux=bootm ${meraki_loadaddr_kernel} ${meraki_loadaddr_ramdisk} ${meraki_loadaddr_fdt}
meraki_boot=run meraki_ubi meraki_bootargs ; run meraki_load1 meraki_checkpart meraki_bootlinux; run meraki_load2 meraki_bootlinux
meraki_checkpart=meraki checkpart ${meraki_loadaddr}
meraki_netboot=run meraki_load_net meraki_bootargs meraki_bootlinux
meraki_loadaddr=800000
meraki_loadaddr_kernel=810000
meraki_loadaddr_fdt=800400
meraki_loadaddr_ramdisk=a00000
meraki_load1=ubi read ${meraki_loadaddr} part1
meraki_load2=ubi read ${meraki_loadaddr} part2
meraki_load_net=${netloadmethod} ${meraki_loadaddr} ${serverpath}${meraki_bootfile}
meraki_ubi=ubi part ubi
meraki_ubifile=buck-ubi.bin
meraki_ubi_loadfile=${netloadmethod} 200000 ${serverpath}${meraki_ubifile}
meraki_ubi_update_nand=nand erase 0x00240000 0x3fdc0000 ; nand write 200000 0x00240000 ${filesize}
meraki_ubi_update=run meraki_ubi_loadfile meraki_ubi_update_nand
meraki_update_part1=run meraki_ubi meraki_load_net meraki_write1
meraki_update_part2=run meraki_ubi meraki_load_net meraki_write2
meraki_write1=ubi write ${meraki_loadaddr} part1 ${filesize}
meraki_write2=ubi write ${meraki_loadaddr} part2 ${filesize}
mtdids=nand0=nand0
mtdparts=mtdparts=nand0:0x00200000@0(firmware),0x00040000@0x00200000(panic),0x3fdc0000@0x00240000(ubi)
factory_cmdline=setenv bootargs root=/dev/ram ramdisk_size=${factory_ramdisk_size} rw ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 console=ttyS1,${baudrate}
factory_ramdisk_file=uRamdisk
factory_bootfile=uImage
factory_fdt_file=bluestone.dtb
factory_kernel_addr_r=0x400000
factory_fdt_addr_r=0x800000
factory_mtd_addr_r=0x4000000
factory_ramdisk_size=0x200000
factory_boot_bak=run meraki_ubi;run owrt_bootargs;run owrt_recovery
factory_boot=run meraki_ubi;run owrt_bootargs;run owrt_recovery
lede_load1=ubi read ${meraki_loadaddr} kernel
lede_load2=ubi read ${meraki_loadaddr} recovery
lede_bootkernel=bootm ${meraki_loadaddr_kernel} - ${meraki_loadaddr_fdt}
lede_bootargs=setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops
lede_boot=run meraki_ubi lede_bootargs; run lede_load1 meraki_checkpart lede_bootkernel; run lede_load2 meraki_checkpart meraki_bootlinux
bootcmd=run lede_boot
netloadmethod=tftpboot
filesize=713400
fileaddr=800000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.1
serverip=192.168.1.101
owrt_load=ubi read 800000 kernel
owrt_bootkernel=bootm 810000 - 800400
owrt_bootargs=setenv bootargs console=ttyS0,115200 rootfstype=squashfs mtdoops.mtddev=oops
owrt_recovery=ubi read 800000 recovery
owrt_boot=run meraki_ubi owrt_bootargs;run owrt_load meraki_checkpart owrt_bootkernel;run owrt_recovery
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 2009.08-dirty Meraki MX60 (Jun 08 2011 - 14:59:24)
partition=nand0,0
mtddevnum=0
mtddevname=firmware
bootargs=console=ttyS0,115200 rootfstype=squashfs mtdoops.mtddev=oops
   
Environment size: 3575/131067 bytes
=> 

Try the MX60 17.01.5 image. (I apologize, it was the MX60W image that didn't work).

If you are still having issues, I'll try to reproduce them with my router later this evening.

I tried the `7.0.1.5 image. Same result.

Bytes transferred = 4257792 (40f800 hex)
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   POWERPC LEDE Linux-4.4.140
   Created:      2018-07-13  19:25:14 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    2063444 Bytes =  2 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

I'm not able to reproduce these results.

  • What TFTP software are you using?

Can you try one of these:

This is not the full command.

This is:

setenv serverpath; setenv netloadmethod tftpboot; setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops; run meraki_load_net meraki_checkpart meraki_bootlinux

I'm using CentOS Linux running the tftpd server from the standard repos.

/usr/sbin/in.tftpd --version
tftp-hpa 5.2, with remap, with tcpwrappers

It is rock solid, I've used it to switch several Meraki MR24s to LEDE/OpenWRT without issue.

As to the wrong boot command, something got cut off from my cut and paste from the terminal output. Here is the boot command I'm using.

=> setenv serverpath; setenv netloadmethod tftpboot; setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops; run meraki_load_net meraki_checkpart meraki_bootlinux

Out of desperation, I built a new Linux machine with a fresh install of Fedora 28, setup a tftpd server on it and tried to boot using that machine. I get the exact same error:

Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

I'm looking at the output when the mx60 first boots. Does this look right?

   
U-Boot 2009.08-dirty Meraki MX60 (Jun 08 2011 - 14:59:24)
   
CPU:   AMCC PowerPC  UNKNOWN (PVR=12c41c82) at 800 MHz (PLB=200, OPB=100, EBC=10
0 MHz)
       Bootstrap Option D - Boot ROM Location NAND wo/ECC 2k page (8 bits), boot
ing from NAND
       32 kB I-Cache 32 kB D-Cache
Board: Buckminster - Meraki Buckminster Cloud Managed Router
============================
BoardID: 1 0
Reset Button Status: 1
============================
SDR0_PERCLK=0x40000300
I2C:   ready
DRAM:  512 MB
NAND:  1024 MiB
I2c read: failed 4
I2c read: failed 4
I2c read: failed 4
Net:   ppc_4xx_eth0
Initializing Bluestone Ethernet Port ...
Disabling port 1 (reg 0x66c)
Disabling port 2 (reg 0x678)
Disabling port 3 (reg 0x684)
Disabling port 4 (reg 0x690)
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
*** ERROR: ping address not given
RESET is un-pushed
   
Set serverpath and run meraki_netboot to netboot
   
Hit any key to stop autoboot:  0
Creating 1 MTD partitions on "nand0":
0x000000240000-0x000040000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=2"
UBI: MTD device size:            1021 MiB
UBI: number of good PEBs:        8170
UBI: number of bad PEBs:         4
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     4
UBI: available PEBs:             3400
UBI: total number of reserved PEBs: 4770
UBI: number of PEBs reserved for bad PEB handling: 81
UBI: max/mean erase counter: 2/1
kernel volume not found
recovery volume not found
=> 

I ran the ubi mtest command and let it run for a few hundred cycles and no errors were thrown.

Any other ideas?

I'm starting to think so too...I'm really curious how Meraki became erased from the device.

I'll have to verify that I see this too....this is the area that holds: board-config, kernel, recovery and rootfs. This likely means your board-config IMG (containing the MAC and Serial number) is missing too!!!

  • You may have to simply alter the boot command...but I'm not that versed in U-Boot.
  • I'd advise REMOVING THIS: meraki_checkpart Why?? because that appears to check the partition that doesn't exist...it may be why you're receiving the "invalid" message.
setenv serverpath; setenv netloadmethod tftpboot; setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops; run meraki_load_net meraki_bootlinux
1 Like

Dropping the meraki_checkpart didn't make any difference.

This concerns me as well: U-Boot 2009.08-dirty. All the examples I've seen of a boot are using a build of U-Boot that looks like a daily build. This 'dirty' version doesn't give me much confidence.

Hummm...if you mean that it appears Meraki updated U-Boot from time-to-time, I tend to agree. This old date is odd. No Meraki I've seen to date - has had such an old bootloader, either.

  • This router could have been "Zapped" as "lost stolen..."???
  • BTW, the MX60 was approved by the FCC on: 13 April 2012, so the 2009 firmware is very odd

Maybe, but the problem is somewhere else.

If you take a look at the ramdisk boot commands

setenv serverpath; setenv netloadmethod tftpboot; setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops; run meraki_load_net meraki_checkpart meraki_bootlinux

and then look at the printenv

meraki_bootlinux=bootm ${meraki_loadaddr_kernel} ${meraki_loadaddr_ramdisk} ${meraki_loadaddr_fdt}
meraki_loadaddr=800000
meraki_loadaddr_kernel=810000
meraki_loadaddr_fdt=800400
meraki_loadaddr_ramdisk=a00000

you see that something isn't quite right.

The whole apm821xx-nand-meraki_mx60-initramfs-kernel.bin gets placed starting from 0x800000.
the DTB/FDT has to be located at 0x800400 - 0x80ffff (64,512 Bytes)
The kernel has to be located at 0x810000 - 0x9fffff (1984 KiB)
and the ramdisk should be from 0xa00000.

However, if you look at any of the openwrt/lede releases you'll notice that this can't be right. The kernel is much bigger than the 1984 KiB and as result, the ramdisk addr points to "something" inside the gzipped kernel and as a result u-boot complains about it:

Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

now, how to fix this: There are several options. It's possible that the MX60(w) u-boot supports mult-image in this case the whole MX60 could be converted to something that the MR24 already does for it's initramfs image. But this will require the device in order to develop and test this.

As for a in-place quick fix: you could edit the ramdisk address (meraki_loadaddr_ramdisk) and move it to the proper location. If I'm not totally off, you should have a chance with:

setenv  meraki_loadaddr_ramdisk 0xbffc00
setenv serverpath
setenv netloadmethod tftpboot;
setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops;
run meraki_load_net meraki_checkpart meraki_bootlinux

As for "meraki_checkpart " yeaah, that serves no real purpose and can be removed at some point.

2 Likes

Good catch!!!

1 Like

Oh yeah! Changing the ramdisk address location was the trick.

Thanks chunkeey and lleachii!

BusyBox v1.28.3 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  [   39.257790] random: fast init done
|_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 18.06.1, r7258-5eb055306f
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# 

Now to finish the install and see if this this will move some packets!

1 Like

Just a note: The initramfs install method in 18.06.2 was changed (and fixed) by commit:

Please follow the instructions from the commit or the wiki.