Update and Restore Your AWS DeepRacer Device
Update your AWS DeepRacer device to the latest software stack including Ubuntu 20.04 Focal Fossa,
Intel® OpenVINO™ toolkit 2021.1.110, ROS2 Foxy Fitzroy, and Python 3.8. This update is required to run AWS DeepRacer open-source projects but is otherwise optional.
Updating to the new AWS DeepRacer software stack will wipe all data on your AWS DeepRacer device.
Check Which Software Version Your AWS DeepRacer Device is Currently Running
To check which software version your AWS DeepRacer device is currently running
-
Log in to the AWS DeepRacer device console. To learn how, follow the steps in Launch AWS DeepRacer Vehicle's
Device Console.
-
Choose Settings on the navigation pane.
-
Check the About section to verify which software version your AWS DeepRacer Vehicle is currently running.
Prepare to Update Your AWS DeepRacer Device to the Ubuntu 20.04 Software Stack
This topic walks you through the process to create the AWS DeepRacer Ubuntu instalation media. Preparing the bootable USB drive requires additional hardware.
Prerequisites
Before you get started, make sure you have the following items ready:
-
An AWS DeepRacer device
-
A USB flash drive (32 GB or larger)
-
A custom AWS DeepRacer
Ubuntu ISO image
.
-
The latest AWS DeepRacer
software update package
.
-
A copy of UNetbootin compatible with your operating system.
-
A computer running Ubuntu, Windows, or macOS to prepare the USB instalation media.
You can also use the compute module on your AWS DeepRacer device as a Linux computer by connecting a mouse, keyboard, and monitor with an HDMI type A cable.
Preparation
To prepare the AWS DeepRacer update media, you will perform the following tasks:
Prepare a bootable USB drive
Follow these instructions to prepare your AWS DeepRacer update media on Ubuntu (Linux), Windows, or macOS.
Depending on the computer you use, specific tasks may differ from one operating system to another.
Choose the tab corresponding to your operating system.
-
Ubuntu
-
Follow the instructions here to use an Ubuntu computer, including your AWS DeepRacer device's compute module, to prepare the update media for your AWS DeepRacer device. If you are using a different Linux distribution, replace the apt-get *
commands with those compatible with your operating system’s package manager.
To erase and partition the USB drive
-
Run the following commands to install and launch GParted.
sudo apt-get update; sudo apt-get install gparted
sudo gparted
-
To erase your USB drive, you will need its device path. To find it on the GParted console and erase the USB drive, do the following:
-
On the menu bar, choose View, then choose Device Information. A sidebar showing the selected disk's Model, Size, and Path will appear.
-
Select your USB drive by going to GParted on the menu bar, then Devices, finally, select your USB drive from the list. Match the Size and Model shown in the Device Description with your USB drive.
-
Once you are sure that you've selected the correct disk, delete all its existing partitions.
If the partitions are locked, open the context (right-click) menu and choose unmount.
-
To create the FAT32 boot partition with a 4 GB capacity, select the file icon on the top-left,
set the following parameters, and choose Add.
Free space preceding:
1
New size:
4096
Free space following:
<remaining size>
Align to:
MiB
Create as:
Primary Partition
Partition name:
File system:
fat32
Label:
BOOT
-
To create the NTFS data partition with a minimum 18 GB capacity, select the file icon,
set the following parameters, and choose Add.
Free space preceding:
0
New size:
<remaining size>
Free space following:
0
Align to:
MiB
Create as:
Primary Partition
Partition name:
File system:
nfts
Label:
Data
-
On the menu bar, choose Edit, then Apply All Operations. A warning prompt will appear asking if you want to apply the changes. Choose Apply.
-
After the FAT32 and NTFS partitions are created, the USB drive's partition information
will appear in the GParted console. Make note of the BOOT
partition's drive path, you will need it to complete the next step.
To make the USB drive bootable from the FAT32 partition
-
Make sure you downloaded the
custom Ubuntu ISO image from the pre-requisites section.
-
If you're using Ubuntu 20.04, you need to run UNetbootin using its binary file. To do this:
-
Download the latest UNetbootin binary file to your Downloads folder. In our example, we use unetbootin-linux64-702.bin
.
-
Press Ctrl+Alt+T to open a new terminal window. Alternatively, choose Activities on the menu bar, enter terminal
in the search bar, then select the Terminal icon.
-
Use the following commands to navigate to the binary file location, give the file execute permission, and run UNetbootin. Make sure to adjust the file name in the commands if the version doesn't match the one on your downloaded binary file.
cd Downloads
sudo chmod +x ./unetbootin-linux64-702.bin
sudo ./unetbootin-linux64-702.bin
If you're using an older version of Ubuntu, install UNetbootin from its repository by running the following commands:
sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update; sudo apt-get install unetbootin
sudo unetbootin
-
On the UNetbootin console, do the following:
-
Select the Disk image radio button.
-
For the disk image type, choose ISO from the drop-down list.
-
Open the file selector and choose the
Ubuntu ISO provided in the pre-requisites section.
-
For Type, choose USB Drive.
-
For Drive, choose the drive path for your BOOT
partition, in our case /dev/sda1
.
-
Choose OK.
If you get a /dev/sda1 not mounted alert message, choose OK to close the
message, unplug the USB drive, plug in the drive again, and then follow the preceding steps to create the Ubuntu
ISO image.
To extract the AWS DeepRacer update files to the NTFS partition
-
Unzip the
software update package you downloaded from the prerequisites section.
-
Extract the contents of the update package to the root of your USB drive's Data (NTFS) partition.
-
Windows
-
Follow the instructions here to use a Windows computer to prepare the update media for your AWS DeepRacer device.
To erase the USB drive
-
Open the Windows command prompt, enter diskpart
, and choose OK to launch Windows DiskPart.
-
Once the terminal for Microsoft DiskPart opens, list the available disks to find the USB drive you want to clean by entering
list disk
after the DISKPART> prompt.
-
Select the disk corresponding to your USB drive. For example, we entered select Disk 2
after the
DISKPART> prompt. Read the output carefully to verify that you have chosen the disk you
want to clean because the next step is irreversible.
-
Once you are sure that you've selected the correct disk, enter Clean
after the
DISKPART> prompt.
-
Enter list disk
after the DISKPART> prompt again. Find the disk you cleaned
on the table and compare the disk size to the free disk space. If the two values match, the cleaning was successful.
-
Exit the Windows DiskPart console by entering Exit
after the
DISKPART> prompt.
To partition the USB drive
-
Open the Windows command prompt, enter diskmgmt.msc
, and choose OK
to launch the Disk Management console.
-
From the Disk Management console, select your USB drive.
-
To create the FAT32 partition with a 4 GB capacity, open the context (right-click) menu on your USB drive's Unallocated space and choose New Simple Volume.
The New Simple Volume Wizard will appear.
-
Once the New Simple Volume Wizard appears, do the following:
-
On the Specify Volume Size page, set the following parameter and then choose Next.
Simple volume size in MB:
4096
-
On the Assign Drive Letter or Path page, check the Assign the following drive letter: radio button and select a drive letter from the drop down list, then choose Next. Make note of the assigned drive letter, you will need it later to make the FAT32 partition bootable.
-
On the Format Partition page,
check the Format this volume with the following settings radio button and set the following parameters, then choose Next.
File system:
FAT32
Allocation unit size:
Default
Volume label:
BOOT
Leave Perform a quick format checked.
-
To create the NTFS partition with the remaining disk capacity, open the context (right-click) menu on your USB drive's remaining Unallocated space and choose New Simple Volume. The New Simple Volume Wizard will appear.
-
Once the New Simple Volume Wizard appears, do the following:
-
On the Specify Volume Size page, set the Simple volume size in MB to match the Maximum disk space in MB, then choose Next.
-
On the Assign Drive Letter or Path page, check the Assign the following drive letter: radio button and select a drive letter from the drop down list, then choose Next.
-
On the Format Partition page,
check the Format this volume with the following settings radio button and set the following parameters, then choose Next.
File system:
NTFS
Allocation unit size:
Default
Volume label:
Data
Leave Perform a quick format checked.
To make the USB drive bootable from the FAT32 partition
-
Make sure you've downloaded the
customized Ubuntu ISO image from the prerequisites section.
-
After downloading UNetbootin, start the UNetbootin console.
-
On the UNetbootin console, do the following:
-
Check the Disk image radio button.
-
For disk image, choose ISO from the drop-down list.
-
Open the file picker and choose the custom Ubuntu ISO file.
-
For Type, choose USB Drive.
-
For Drive, choose the drive letter corresponding to the FAT32 partition you created.
In our case, it's E:\
.
-
Choose OK.
To extract the AWS DeepRacer update files to the NTFS partition
-
Unzip the
software update package you downloaded from the prerequisites section.
If your favorite tool can't unzip the file successfully, try using the PowerShell
Expand-Archive command.
-
Extract the contents of the update package to the root of your USB drive's Data (NTFS) partition.
- macOS
-
Follow the instructions here to use a Mac to prepare the update media for your AWS DeepRacer device.
To erase and partition the USB drive
-
Plug in the USB drive to your Mac.
-
Press Command+Space bar to open the Spotlight search field,
then enter Disk Utility
.
Alternatively, you can choose Finder > Applications > Utilities > Disk Utility to open Disk Utility.
-
On the menu bar, choose View, then Show All Devices.
-
In the sidebar, under External, select the USB drive that you want to format and then choose Erase.
-
A new window will ask you to confirm that you want to erase your USB drive and will allow you to change its Name, Format, and Partition Scheme.
You don't need to change the name yet, for Format and Scheme, select the following options and choose Erase.
Once the erase process is complete, choose Done on the dialog window.
-
On the main Disk Utility window, select your USB drive from the sidebar, choose
Partition from the toolbar on the top. A window titled Partition device "YOUR-USB-DRIVE
"? will pop up. Select the add (+)
button to create a new partition.
-
Once you create the new partition, under Partition Information, choose and enter the following:
-
Name: BOOT
-
Format: MS-DOS (FAT)
-
Size: 4
GB
If the Size input box is grayed out after choosing MS-DOS (FAT) as the format, you can drag the resize control on the partition graph until
the BOOT
partition is 4 GB.
Do not choose Apply yet.
-
Select the other Untitled partition, choose and enter the following options under Partition Information:
Choose Apply.
-
A new window will pop up and show you the changes that will be made to the USB Drive. Verify that these changes are correct. To confirm and begin the creation of the new partitions, choose Partition.
-
On the Disk Utility console, choose the BOOT partition from the Sidebar,
then select Info from the Toolbar. Make note of the BSD device node value, it might be different from the one used in this tutorial.
In our case, the value assigned is disk4s2
. You need to supply this path when making the USB drive bootable from the
FAT32 partition.
To make the USB drive bootable from the FAT32 partition
-
Make sure you've downloaded the
customized Ubuntu ISO image from the prerequisites section.
-
After downloading UNetbootin, select open from the context (right-click) menu. A security prompt will appear asking if you want to open the application, select open
to start the UNetbootin console.
If you are using a Mac with Apple Silicon, and the UNetbootin console does not show after selecting open, make sure that Rosetta 2 is installed by following these steps:
-
Open a terminal window by choosing Finder > Applications > Utilities > Terminal.
-
Enter the following command to install Rosetta 2:
softwareupdate --install-rosetta
-
Retry opening UNetbootin.
-
On the UNetbootin console, do the following:
-
Check the Disk image radio button.
-
For disk image, choose ISO from the drop-down list.
-
Open the file picker and choose the custom Ubuntu ISO file.
-
For Type, choose USB Drive.
-
For Drive, choose the BSD device node for your BOOT partition, in our case, /dev/disk4s2
.
-
Choose OK.
If you get a /dev/disk4s2 not mounted alert message, choose OK to close
the message, unplug the USB drive, replug the drive, and then follow the steps above create the Ubuntu ISO image.
To extract the AWS DeepRacer update files to the ExFAT partition
-
Unzip the
software update package you downloaded from the prerequisites section.
-
Extract the contents of the update package to the root of your USB drive's Data (ExFAT) partition.
Update your AWS DeepRacer Device to the Ubuntu 20.04 software stack
Once you create the USB update media as described in the previous steps, you can update your AWS DeepRacer device to the latest software stack including Ubuntu 20.04 Focal Fossa,
Intel® OpenVINO™ toolkit 2021.1.110, ROS2 Foxy Fitzroy, and Python 3.8.
Updating to the new AWS DeepRacer software stack will wipe all data on your AWS DeepRacer device.
To update your AWS DeepRacer device software to the Ubuntu 20.04 stack
-
Connect your AWS DeepRacer device to a monitor. You'll need an HDMI-to-HDMI, HDMI-to-DVI, or similar
cable. Insert the HDMI end of the cable into the compute module's HDMI port and
plug the other end into a compatible port on the monitor.
-
Connect a USB keyboard and mouse. The AWS DeepRacer device's compute module has three USB ports in the front of the vehicle,
on either side of and including the port into which the camera is plugged. A fourth USB port is found at the back
of the vehicle, in the space between the compute battery and the LED tail light.
-
Insert the USB update media into an available USB port on your compute module. Turn on the power or reset your AWS DeepRacer device and repeatedly press
the ESC key to enter the BIOS.
-
From the BIOS window, choose Boot From File, then select the option with your boot partition's name, in our case it's named BOOT
, then select <EFI>, then <BOOT>, and finally BOOTx64.EFI.
-
After the compute module has booted, a terminal window will appear on the desktop to display the progress. The AWS DeepRacer device will automatically begin the update process after ten seconds.
You don't need to provide any input at this stage.
If an error occurs and the update fails, restart the procedure from Step 1. For detailed error
messages, see the result.log
file generated on the USB drive's data partition.
-
Wait for the update to complete. When the factory reset is complete the terminal window will close automatically.
-
After the device software is updated, disconnect the USB drive from the
compute module. You can now reboot or shut down your AWS DeepRacer device.
-
The AWS DeepRacer device defaults to the following user credentials after update. You will be prompted to change your password on your first login.
User: Deepracer
Password: deepracer