Install Ubuntu 20.04 on Jetson Nano - Q-engineering (2023)

Install Ubuntu 20.04 on Jetson Nano - Q-engineering

×

  • Machine learning

  • Computer vision

  • Embedded vision

  • Deep learning

  • Math

  • Optics

  • Shop

  • Contact

Q-engineering

Q-engineering

×

  • Machine learning

  • Computer vision

  • Embedded vision

  • Deep learning

  • Math

  • Optics

  • Shop

    (Video) Install Ubuntu 20 & ROS2 on the Jetson Nano

  • Contact

Go to content

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (1)

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (2)

Last updated: January 30, 2022

Introduction.

The Jetson Nano comes with an Ubuntu 18.04 version. In some situations, you need Ubuntu 20.04. Especially when Python 3.8 is required, as is the case with the popular ROS2 software. This guide discusses the upgrade to Ubuntu 20.04 on the Jetson Nano. We are going to use the standard upgrade mechanism of Ubuntu operating systems.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (3)

Please, find a complete Jetson Nano with a pre-installed Ubuntu 20.04, OpenCV, TensorFlow and PyTorch image on our GitHub page. Download the zip file, unzip and flash the image on a 32 GB SD-card, and enjoy!

Preparations.

First of all, make sure you have enough space on your SD card to perform the upgrade. You need at least 16 GB of free space.

The following action is to remove any software packages you don't need right away, such as LibreOffice. It slows down the whole procedure and you can easily reinstall them if needed.

Chromium should also be removed as it will interfere with Snap installs. You can do this by using the software updater or by command line.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (4)

Once removed, update, upgrade and clean your system.

# remove Chromium and OpenCV

$ sudo apt-get remove --purge chromium-browser chromium-browser-l10n

# refresh your system

$ sudo apt-get update

# need nano for editing some files

$ sudo apt-get install nano

$ sudo apt-get upgrade

$ sudo apt-get autoremove

Next, you need to enable distribution upgrades in the update manager by settting prompt=normal in the /etc/update-manager/release-upgrades file.

As usual, close with <Ctrl>+<X>, <Y> and <Enter>.

$ sudo nano /etc/update-manager/release-upgrades

(Video) Ubuntu Package Lists - NVIDIA Jetson

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (5)

With the update manager set, we need to refresh the software database again. Once done, you can reboot.

# refresh your system again

$ sudo apt-get update

$ sudo apt-get dist-upgrade

$ sudo reboot

Upgrade to Ubuntu 20.04.

With all preparations made, it's time for the upgrade to Ubuntu 20.04. It will take several hours. Unfortunately, some input is required throughout the procedure as there are questions to be answered. Check your screen now and then. Answer all questions with the suggested default value.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (6)

After entering <y>, the transformation will take place. As mentioned, some questions are asked during the process. Always confirm the default value. There may also be a notification that a new Ubuntu version is available, the Hirsute Hippo 21.04 version. Please cancel that notification, as we won't be installing that version for a while.

When Ubuntu 20.04 is installed, all obsolete files can be removed from your drive, as the screen shows.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (7)

Now that the packages have been removed, Ubuntu will ask for a restart. Don't reboot now! That's really important.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (8)

You need to check some files and make some changes before Ubuntu can reboot. If you forget this, you will get a warning every time Ubuntu starts. So do it right away.

First, check that WaylandEnable=false is uncommented in the /etc/gdm3/custom.conf file.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (9)

Uncomment (remove the hash before the line) Driver "nividia" in the file /etc/X11/xorg.conf.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (10)

Finally, reset the upgrade manager to never.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (11)

Now you can safely reboot the system.

# check and editing some files

$ sudo nano /etc/gdm3/custom.conf

$ sudo nano /etc/X11/xorg.conf

(Video) NVIDIA Jetson SDK Manager - JetPack 4.2

$ sudo nano /etc/update-manager/release-upgrades

$ sudo reboot

Starting Ubuntu 20.04 on your Nano.

A few preparations are needed before you can fully enjoy Ubuntu 20.04 on your Jetson Nano.

Start with the well-known update, upgrade and autoremove cycle. You will get probably no upgrades as Ubuntu is just installed. However, autoremove will free a lot of memory by deleting obsolete files.

Next, delete the directory /usr/share/vulkan/icd.d to prevent lavapipe warnings when using Jtop. It looks the folder is removed in the latest Jetpack as well.

See the issue posted on Raffaello Bonghi's GitHub page and the solution given by SkrilaxCZ.

# remove icd.d

$ sudo rm -rf /usr/share/vulkan/icd.d

Remove also an annoying circular symbolic link in /usr/share/applications that makes the same app appear 86 times in your software overview.

# prepare your system

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get autoremove

# remove circular symlink

$ sudo rm /usr/share/applications/vpi1_demos

# remove distorted nvidia logo in top bar

$ cd /usr/share/nvpmodel_indicator

$ sudo mv nv_logo.svg no_logo.svg

The last action is to re-enable the original NVIDIA repositories, which were disabled during the upgrade. In the folder /etc/apt/sources.list.d/ you will find the five files that needed to be changed. Open each file with $ sudo nano and remove the hash in front of the line to activate the repository.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (12)

gcc-8.

Ubuntu 20.04 comes with gcc version 9.3.0.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (13)

Some software packages, especially the CUDA software, requires a gcc version 8. We shall install this version besides the already available version 9. With a simple command, you can now switch between the two versions. The gcc compiler is always accompanied by the corresponding g++ compiler. The latter will also be installed.

# install gcc and g++ version 8

(Video) Native Boot from SSD on Jetson Xavier (AGX and NX) - No SD Card Needed!

$ sudo apt-get install gcc-8 g++-8

# setup the gcc selector

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8

# setup the g++ selector

$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9

$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8

# if you want to make a selection use these commands

$ sudo update-alternatives --config gcc

$ sudo update-alternatives --config g++

Always select the two corresponding versions at the same time. Otherwise, very obscure errors may occur during compilation. As mentioned, if you want to compile software that requires CUDA or cuDNN, such as OpenCV, choose version 8.

Your choice is saved and applied system-wide. Even after a reboot, the selected pair is still active. The only way to change the versions is to resubmit the command.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (14)

The same goes for the clang compilers. In this case, the CUDA and cuDNN need version 8, while Ubuntu installs default version 10. You can either install version 8 right away with $ sudo apt-get install clang-8 or install more versions and create an sudo update-alternatives --config just like above.

Warnings.

  • Do not install Chromium as it will interfere with the Snap installation. Use the preinstalled Morzilla Firefox.

Upgrading.

You may run into problems upgrading Ubuntu 20.04 on your Jetson Nano after a while. The Software Updater cannot install all the packages listed. When you run $ sudo apt-get upgrade you will see the following screen.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (15)

The problem is the wrong version of the nvidia-l4t-init file. Since many other packages depend on this file, the entire upgrade process terminates.

You must first install the correct version before any further upgrade can succeed.

The command $ sudo apt --fix-broken install gives you the following information.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (16)

It seems that /etc/systemd/sleep.conf is blocking the upgrade. The easiest solution is to force the upgrade with the command $ sudo dpkg -i --force-overwrite. Note, the location of the nvidia-l4t-init file is given in the output of the previous fix-broken command.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (17)

As you can see, the sleep.conf is overwritten, and nvidia-l4t-init is installed successfully.

Now you can upgrade your Ubuntu 20.04 with the usual command $ sudo apt-get upgrade.

Final remarks.

Ubuntu 20.04 is now fully functional on your Jetson Nano. You can customize the installation further to your own needs.

We were surprised by how long it takes for some assignments to complete. When we set up the dphys swap mechanism for the OpenCV installation, it took five nerve-wracking minutes for the reboot to complete. We stare at a blank screen all the time. So be patient is the advice in such cases.

We also had to disable the power-saving blank screen option in the settings as it gives unstable results when rebooting from sleep mode.

Install Ubuntu 20.04 on Jetson Nano - Q-engineering (18)

There are reasons why Nvidia doesn't ship Ubuntu 20.04 with its JetPacks. It certainly has to do with the little added value compared to version 18.04. But there will also be other reasons. Therefore, see this Ubuntu 20.04 version as an experiment. That's why it comes without any warranty, and we cannot provide (technical) support in any way.

We would like to thank Bob Davis for his contribution to this page. Without his input, this page would not be published.

(Video) HEADLESS SETUP - Jetson Nano

FAQs

Can we install Ubuntu on Jetson Nano? ›

Ubuntu 20.04 is now fully functional on your Jetson Nano. You can customize the installation further to your own needs.

What are the first 3/4 things you need to do after completing installation of Ubuntu Server? ›

So to recap, after you have installed Ubuntu, you should:
  1. Check and install any Ubuntu package updates.
  2. Set up Ubuntu Livepatch.
  3. Install the Ubuntu Snap Store.
  4. If you don't like Firefox, install Chrome on Ubuntu.
  5. Install graphics drivers if you use an Nvidia GPU.
  6. Install VLC on Ubuntu.
  7. Install GNOME Tweaks.
16 Mar 2022

Can I install TensorFlow on Jetson Nano? ›

You can execute TensorFlow on a Jetson Nano, but don't expect miracles. It can run your models, if not too complex, but it will not be able to train new models. Nor can it perform the so-called transfer learning.

Does PyTorch work on Jetson Nano? ›

NVIDIA Jetson Nano, part of the Jetson family of products or Jetson modules, is a small yet powerful Linux (Ubuntu) based embedded computer with 2/4GB GPU. With it, you can run many PyTorch models efficiently.

What OS can I run on Jetson Nano? ›

The official operating system for the Jetson Nano is the Linux4Tegra, based on Ubuntu 18.04. This is available via the included SD card image, which is designed to run NVIDIA hardware.

Is Jetson Nano 64-bit or 32 bit? ›

NVIDIA Jetson Nano is an embedded system-on-module (SoM) and developer kit from the NVIDIA Jetson family, including an integrated 128-core Maxwell GPU, quad-core ARM A57 64-bit CPU, 4GB LPDDR4 memory, along with support for MIPI CSI-2 and PCIe Gen2 high-speed I/O.

What are the 4 Minimum system requirements Installing Ubuntu? ›

Ubuntu Desktop Edition
  • 2 GHz dual core processor.
  • 4 GiB RAM (system memory)
  • 25 GB (8.6 GB for minimal) of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)
  • VGA capable of 1024x768 screen resolution.
  • Either a CD/DVD drive or a USB port for the installer media.
7 Mar 2022

Do I need to partition before installing Ubuntu? ›

There is no need to pre-partition the disk before installing Ubuntu. Ubuntu's installer has a step which lets you partition/organize/format your disk. All it needs is to have unallocated space on the disk, meaning space that is not part of any existing partition.

What is needed to install Ubuntu? ›

What do you need in order to install Ubuntu:
  1. A USB of at least 4 GB in size. ...
  2. Internet connection (for downloading Ubuntu and live-USB making tool, not required for installing Ubuntu)
  3. Optionally, you may need an external USB disk for making a backup of your important data (if any) present on the current system.

Which is better Raspberry Pi or Jetson Nano? ›

The Raspberry Pi 4 GPU is weaker compared to the Jetson Nano. In the case of CPU, the Raspberry uses the latest and best CPU, the Quad-core ARM cortex-A72 64-bit @ 1.5 GHz. This CPU offers higher performance and faster clocking speed. But for deep learning and AI, it might not provide enough performance benefits.

Is Jetson Nano good for gaming? ›

NVIDIA's Jetson Nano has excellent GPU capabilities, making it a popular choice for Machine Learning (ML) and often used for gaming and CUDA-based computations.

Is Jetson Nano good for deep learning? ›

Jetson Nano is a GPU-enabled edge computing platform for AI and deep learning applications. The GPU-powered platform is capable of training models and deploying online learning models but is most suited for deploying pre-trained AI models for real-time high-performance inference.

Is Jetson Nano discontinued? ›

Hi @VictorB, sorry about that - Jetson Nano isn't discontinued. Due to supply chain constrains, production capacity is going to the modules right now.

Can I run Raspbian on Jetson Nano? ›

Raspbian is a variant of Debian Linux that is customized for the VideoCore of the Raspberry Pi system. It will not work on any other hardware, and will not work on Jetson anything.

Can we use Jetson Nano for production? ›

No. Jetson developer kits are not for production use. The developer kit is used to develop and test software in a pre-production environment.

Can I run Raspbian on Jetson Nano? ›

Raspbian is a variant of Debian Linux that is customized for the VideoCore of the Raspberry Pi system. It will not work on any other hardware, and will not work on Jetson anything.

Can Nvidia Jetson run Linux? ›

NVIDIA® Jetson™ Linux Driver Package is the board support package for Jetson. It includes Linux Kernel, UEFI bootloader, NVIDIA drivers, flashing utilities, sample filesystem based on Ubuntu, and more for the Jetson platform.

Can Jetson Nano be used as desktop? ›

Really though, Nano was meant for more than just being your desktop PC. All those GPU cores are meant for fairly specific processes, after all. Jupyter seems to work, as do other popular machine learning platforms, like TensorFlow and TensorRT. So you can certainly use a Nano as a static number crunching machine.

Which is better Raspberry Pi or Jetson Nano? ›

The Raspberry Pi 4 GPU is weaker compared to the Jetson Nano. In the case of CPU, the Raspberry uses the latest and best CPU, the Quad-core ARM cortex-A72 64-bit @ 1.5 GHz. This CPU offers higher performance and faster clocking speed. But for deep learning and AI, it might not provide enough performance benefits.

Videos

1. Waveshare Jetbot Build - Software Install and Basic Motion Test!
(JetsonHacks)
2. Getting Started with NVIDIA Jetson Nano Part 1: Setup | Digi-Key Electronics
(Digi-Key)
3. Лекция 12 Opencv+cuda Jetson
(Studying Matlab & ROS)
4. #3 Installing OpenCV, PyTorch & TorchVision on Jetson Nano | 2022
(Augmented Startups)
5. AI Jetson Nano Lesson 8 : Install Upgrade OpenCV 4.5 plus Aktivasi CUDA
(Elektro Project)
6. Format SDcard on Linux, Install Ubuntu on Odroid-N2
(Francesco Piscani)
Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated: 19/04/2023

Views: 5956

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.