DD-WRT to LEDE using ie SSH

Hi!

Can anyone suggest some ideas or a way to flash a dd-wrt router, including bootloader, with a lede version and a bootloader using SSH? The router can only be accessed remotely. I'm thinking of creating a backup of my lede router (complete flash) and restore it to the dd-wrt router. Maybe by mtd or dd? I am trying to do my best not to destroy the dd-wrt router :wink: The hardware is 100% the same.

mtd of dd-wrt router:

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00050000 00010000 "RedBoot"
mtd1: 00790000 00010000 "linux"
mtd2: 0065b000 00010000 "rootfs"
mtd3: 00030000 00010000 "ddwrt"
mtd4: 00010000 00010000 "nvram"
mtd5: 00010000 00010000 "board_config"
mtd6: 00800000 00010000 "fullflash"
mtd7: 00050000 00010000 "fullboot"
mtd8: 00010000 00010000 "uboot-env"

mtd lede router:

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00630000 00010000 "rootfs"
mtd3: 001d0000 00010000 "rootfs_data"
mtd4: 00160000 00010000 "kernel"
mtd5: 00010000 00010000 "nvram"
mtd6: 00010000 00010000 "art"
mtd7: 00790000 00010000 "firmware"

Thanks in advance.

Yes, but very risky (as you'll have to compile a custom firmware with the SSH open on WAN with a password already set by default)...

First:

  • Is your router model compatible with OpenWRT/LEDE (see: https://lede-project.org/toh/start)?
  • If so, would you be comfortable compiling a custom firmware?
  • Do you have second (test) device to confirm that your custom firmware flash was successful?
  • Is your router model compatible with OpenWRT/LEDE (see: https://lede-project.org/toh/start)?
    Yes, it is.

  • If so, would you be comfortable compiling a custom firmware?
    No problem.

  • Do you have second (test) device to confirm that your custom firmware flash was successful?
    Yes, I have.

OK, cool:

  • then you'll need to flash the test device with the pre-compiled version avalable at downloads.lede-project.org
  • you'll have to setup the WAN static/DHCP, password, SSH and firewall so that you can access from the LAN
  • you'll then take those configs and compile them into your custom version of the firmware
  • you can then SSH to the device and use the command line, or make a SSH tunnel to http://127.0.0.1 and use the GUI to flash it

See: https://lede-project.org/docs/guide-developer/embedding-files-in-image

What exact model of router? Why was the bootloader replaced? Most OpenWrt and dd-wrt installs run from the factory bootloader.

1 Like

And what are your ideas to replace the bootloader?

It's a custom model, an AR91xx SoC. I don't know why dd-wrt runs on a different bootloader. Out of my league (don't have enough knowlegde about bootloaders, mtd etc).

I think like: if I can make a full copy of the flash (with OpenWRT/LEdE) and can store this on the other router, I have an exact copy. After that I can solve some issues and update the router with Luci.