NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] MyRIO-1950 - New fireware upgrade & opkg weird things

Hi everyone,

I was updating my firmware for my MyRIO-1950 recently and I wanted to have everything clean. So I formatted the drive and started installing the new firmware (3.0.0.f0) on the myrio, that went without troubles.

The funny things started when I tried to update opkg

opkg upgrade

opkg update

After the upgrade, (I had to do it several time), the admin account on the myRIO has been deleted, simply.

After restart the myRIO DNS went from NI-myrio-1950-*something*.local to linux.local. I attached a screenshot from MAX.

root@localhost:~# passwd admin

passwd: user 'admin' does not exist

So basically, admin account has been deleted, all other account are here, and I lost my DNS.

Some actions on myRIO require "admin" to be a thing (like formatting for example).

For more fun, the web API is actually recognising the account "admin" with its password (the one that doesn't exist) and refusing the "root" account whilst ssh is not accepting (access denied) "admin" but do accept "root"

I don't know yet what will not work anymore, but does someone have an idea of what is happenning ?

EDIT:

I also have a second device, I didn't changed the password for the root before restarting, and now it is impossible to connect to it, reformat or do anything. Admin is gone, and no other account works... If someone has an idea how to hard reset a myRIO that would be great. (see attached image)

Thanks

Download All
0 Kudos
Message 1 of 3
(3,858 Views)

Interesting.

Let's first check what environment you were in when you did this and make sure we can get you operational again:

In current (through 2015) versions of the software, the "firmware" update corresponds to safe mode, and any changes you make in safe mode can be cleared by a reboot. If you just did a format followed by a firmware update and nothing else, you're in safe mode.  Doing an opkg upgrade in safe mode is not supported and will probably break things for that boot, but should have no persistent effect, and rebooting should restore the system. I just tried that and reproduced your issue and rebooting fixed it.

Assuming your format-and-install process included installing software using the Add/Remove Software wizard in MAX, you were probably in run mode, where the opkg changes would persist, and fixing the issue would require reformatting (if MAX isn't letting you do that because of the bad state, you can force safe mode by holding the reset button for 5 seconds and then MAX should work). However, in run mode, this shouldn't have happened, but we have a bug in the feed that causes your symptom.

Some details:

"opkg update" updates the opkg database from our repository (as configured in /etc/opkg/*.conf). It doesn't actually change anything about the installed or running software, it just updates your local package database. Doing "opkg upgrade" before "opkg update" normally doesn't make sense, because it would upgrade all your packages to the version in your local database already, which typically would be the versions you already have installed.

So, if you did "opkg upgrade" then "opkg update", all you'd done at that point was (probably) the opkg update. Doing another "opkg upgrade" after that (you mentioned doing this "several times") would have an effect, though.

In run mode, the version of software in the local database is supposed to match what's in our feeds, out of the box. Only packages with critical updates between annual releases -- very few -- should have later versions. But because of a bug (which we're going to fix, issue 546481 in our internal tracker), opkg thinks the version in the feed is different, even though it's not, and ends up upgrading a lot more packages than appropriate.

Unfortunately NI Linux RT (not the only Linux distro with this problem, not that that makes it okay) requires certain pieces to be installed in a certain order, and the massive unintentional system-wide impact of opkg upgrade circumvents this process, leaving things in a bad state. (We're going to fix that too, but later. Look for a fix for upgrade upgrading too much stuff soon, though.)

It should still be safe to install specific packages. Just be careful about the system-wide upgrade.

TL;DR: don't do a system-wide "opkg upgrade" right now; if you did in safe mode, reboot; if you did in run mode, reformat.

0 Kudos
Message 2 of 3
(3,175 Views)

Hi Scot,

Thank you for your fast reponse.

I just rebooted in safe mode using the reset button and I was able to reformat the target.

Thanks for the infos, I just inverted by mistake in my original post opkg update & upgrade,the weird thing was the opkg update then upgrade wasn't working first time you actually had to do it twice.

Anyway, I'll keep myself away from "pushing that button" for the moment

0 Kudos
Message 3 of 3
(3,175 Views)