Flashing Ubuntu on Ampere System

The Ubuntu OS is only for evaluation purposes(Internal use). If it is for commercial use, you need to get a license from Canonical. Canonical’s IP policy can be found here: https://ubuntu.com/embedding/faqs.

  • In this guide, we used Ubuntu 22.04 LTS as a host machine(Laptop or computer) to prepare our Ampere system, which will be called a target device here.

  • This guide teaches you how to install Ubuntu server 20.04 LTS, 22.04 LTS, and 24.04 LTS on our Ampere system.

[!IMPORTANT]

The EDKII firmware must be 2.09.100.00 or a later version. Otherwise, you cannot flash the Kernel 6.x operating systems(Ubuntu 22.04 LTS and Ubuntu 24.04 LTS).

The EDKII firmware 2.09.100.00 flashing guide can be found here.

1. Prepare the USB stick with a bootable Ubuntu OS

  • Download the Ubuntu 22.04 Server OS of the ARM64 architecture system on the host machine.

  • As shown below, format an empty USB stick in your host machine.

  • Format the USB stick and flash the image in it.

    $ lsblk
    $ sudo umount /dev/sdX1 (replace the 'X1' with the you mounted drive)
    $ sudo mkfs.vfat -F 32 -n ubuntu_drive /dev/sdX (replace the 'X' with the you mounted drive)
  • Flash the image onto the USB stick. It might take a couple of minutes.

    $ sudo dd if=(path_of_the_image_file) of=/dev/sdX status=progress && sync

2. Prepare the Ampere system

[!CAUTION]

Please do not use the VGA output port to install the Ubuntu OS. As it is a server machine, it’s just using an AST2500 graphics driver, which may get crashed during the installation. We suggest using the VGA_COM0 port to complete the installation of Ubuntu OS and NVIDIA graphics driver, as mentioned in this guide.

  • Take the USB to the DB9 console debug connector.

  • Connect the DB9 end to the target system’s VGA_COM0 port and the USB end to the host system.

  • Install the Minicom tool in the host system to read/write the target device.

    $ sudo apt install minicom
  • Check the device name of the cable. It could be the /dev/ttyUSB0. Then, launch the minicom tool in the terminal.

    $ sudo minicom -D /dev/ttyUSB0 -b 115200 -F off
  • Now, the setup is ready to flash the Ubuntu OS.

3. Flash the Ubuntu OS

  • Take the Ubuntu OS bootable USB stick. Connect it to the target system.

  • Ensure you connect the ethernet cable and graphics card to the monitor.

  • The entire installation procedure will be done in the host device through the target device console.

  • Power on the target device. You could see the console log in the host device minicom terminal.

  • Keep pressing the ‘ESC’ to get the BIOS menu in the target device.

  • Go to the Boot manager.

  • Choose the bootable USB stick.

  • Complete all the installation procedures by following them.

4. Making Network Interfaces Optional for Boot in Ubuntu with Netplan

[!IMPORTANT]

When you boot Ubuntu 22.04 or 24.04 without Internet, if you do not apply this change, the boot time will rise to 10 to 15 minutes.

  • Add optional:true under the specific network interface in the Netplan configuration file to indicate that the network interface is not required for booting.

  • Open the Netplan configuration file for editing:

    sudo nano /etc/netplan/50-cloud-init.yaml
  • Locate your network interface configuration. It should look something like this. Add optional: true under the specific interface:

    network:
    version: 2
    ethernets:
    eth0:
    dhcp4: true
    optional: true
  • Save and exit the file. In Nano, you can do this by pressing CTRL + o, pressing Enter, and then CTRL + x.

  • Apply the Netplan configuration:

    sudo netplan apply

[!TIP]

We recommend to use the graphics card if you want to enjoy the full-desktop features. The graphics card installation procedure can be found here.