Installing OpenWrt on KD20 via SSH & command line?

Hello.

OpenWrt newbie here! So please be patient. (I know my way around Linux and git but not OpenWrt)

I am asking for help as I have read https://openwrt.org/toh/shuttle/kd20 as well as most posts on the forum pertaining to KD20 as well as most of Daniel's literature on the topic. But I could not find one that addresses my specific context.

My KD20 is not bricked but it is almost there. It was working fine for many years and I have decided to swap for bigger HDDs so I restarted the installation process. Sadly the process hangs at step 5, building the disks. It complains my disks are invalid and reboots. After a reboot it goes straight to step 5 and gives me a spinning wheel and I cannot do anything. Rebooting gets me back there again, and again...

So I was hoping I can install OpenWrt to help me get out of that mess.

As you gathered, the Web interface is not an option. So there is no way for me to install OpenWrt as per this page https://openwrt.org/toh/shuttle/kd20.

However, SSH is an option. I can SSH into the KD20 so my question is: has anyone done an installation via SSH? Can you share the steps to do this?

Anybody? Even a smallest hint would help! Thanks!

Sorry, based on the wiki page, which step (they aren't numbered) is 5, precisely ?

1 Like

If the user is doing this - that could be the problem.

  1. Optional - under System / Software Updates tab, update the listed packages:

I see "update the listed packages" as Step 5. See this warning:

True, but it wouldn't end with an error about invalid disks, imho.

1 Like

As I mentioned above, step 5 is when it is building my disks.
To be clear, this is step 5 of the original firmware. Not OpenWrt.
That step failed miserably and got me in an infinite loop. Which is why I now want to install OpenWrt to recover and get out of that loop

Not in our wiki, point to the instruction you're following.

1 Like

Of course it is not in your wiki. As I said above: To be clear, this is step 5 of the original firmware. Not OpenWrt.

Ok, then you're asking the wrong people.

Try dd:ing the boot and OS partions from the old drive, to the new.

GParted or clonezilla might help here, instead of dd.

1 Like

Can you point me to the right forum to ask this? Considering that my question is "how to install OpenWrt using SSH and command line"

I am afraid that is no longer possible as I already wiped the old disks and overwritten it with new data

Are you at ssh and command line?

Yes, that is where I am.

Direct us to the guide you're using, so we can see what you've done so far.

I don't see how this is relevant but here it is: https://www.manualslib.com/manual/928972/Shuttle-Omninas-Kd20.html

We won't know until we've read it.

I'd put some small disk into the NAS, to get the stock fw up and running, and install openwrt.
Seems the disks aren't used for storing the firmware.

There are probably other ways, but they might require serial console, etc.

They might have some additional ideas over at doozans forum.

Been there,done that. Tried with 8 different HDD. Unable to get out of the infinite loop

Bummer, serial it is then.

Unless there's some other way to force it to boot other than default.

The firmware is likely stored in some persistent memory outside of the HDDs. And it is executing from there. And there seems to be a flaw in the PHP code that fails to exit my particular scenario. Which makes the UI interface unusable but SSH is working fine, hence the question to install using SSH and command line

It depends on the options you've got available in cli.

Can you for instance manipulate the uboot env?

You could also try to figure out why web ui fails, via cli.

How do I check this?