JetBot: sudo command missing

Hello,

Following the instructions here:

I downloaded jetbot-042_nano-4gb-jp441.zip, and used Etcher to flash the image to my SD card. Everything went fine. But the resulting system does not seem to have command “sudo”. I checked /usr/bin, it’s not there.

I found it rather strange, but google didn’t result anything helpful. Did I forget something obvious?

Thank you very much for your kind help, much appreciated.

sandpoint

P.S. JetBot worked alright, so far. But I could only shut it down by pulling the battery plug, because there was no sudo command.

I don’t know about SD card images, but sudo should always be there unless something bad happened (e.g., malware). You could clone, examine the clone from the PC, and if it can be saved, then fix the clone and flash it back in. Otherwise I’ll say you should flash again and make sure you have a good password if anything from the outside world can see it.

Thank you for your help!

The image jetbot-042_nano-4gb-jp441.zip was downloaded from the JetBot official site. After flashing it to the SD card, I checked /usr/bin right away, the sudo was not there. I somehow doubt it’s the malware. The only thing I could think of is that I used a Windows 10 machine to flash the image, I’ll find a Linux machine to try it again, and report back.

I did a few new tests, and here is the issue.

(The JetBot image is jetbot-042_nano-4gb-jp441.zip.)

If login from a terminal as a standalone Nano machine, sudo is in /usr/bin.

But if login using Jupyter from a web browser, sudo is not in /usr/bin. The system environment looks different.

I am new to JupyterLab. This doesn’t make much sense. Without sudo, one can’t even shutdown the jetbot properly.

So, anyone knows what happened? Did I forget something obvious? Please help!

Hi sandpoint,

Thanks for reaching out!

Apologies for the confusion , the recent JetBot images actually run the Jupyter Lab server from within a Docker container. This means the terminal launched inside Jupyter Lab resides in the container, and does not contain sudo.

If you need to access the host os from within Jupyter, you could ssh from the Jupyter terminal into the host.

apt update
apt install ssh
ssh jetbot@0.0.0.0

We’ve received a few comments expressing difficulty with this new docker approach, and I believe your issue amplifies this. The feedback is helpful. The easiest way to avoid the docker based approach, may be to use one of the older JetBot images with Jetson Nano 4GB. Those targeting < JetPack 4.3 may work. Please note, this would use older software.

Please let me know if this helps or you run into any issues.

Best,
John

1 Like

Hi John,

We tried 4.3, and it solved problem.

Thanks for your kind help!

JetBot is a great piece of work!!

sandpoint

Glad to hear, thanks for the letting me know! Please let us know if you run into any other issues :)

Best,
John

But is it safe to just pull the power plug on jetson/jetbot? In all of the Unix type systems I have worked with, the #1 rule was never, ever power off without closing all the doors (files) first. It was described to us as diving a submarine with the hatches open.

You are correct that it is never safe to simply yank power with open files or things not written. This is complicated by some writes not actually being written and merely being a buffer marked for write. If the filesystem were flushed and remounted read-only, then this is safe so far as software goes (you would still have possible hardware issues if there isn’t surge protection).

The OverlayFS is one example of a kind of “cheat”. The original eMMC filesystem is mounted read-only, and all “edits” are merely in RAM. Yanking power would lose all of the in-RAM content, but the base underlying filesystem would be original at every boot. Useful in a kiosk, not so useful for many real world applications, e.g., as a workstation.

It’s normal for docker images to not have any suid binaries like sudo. sudo is not in the ubuntu base image. You won’t hear any complaints from me. I’m glad sudo is gone and l4t-base is now build from ubuntu:bionic. Please don’t “fix” it.

1 Like