The disk of my computer is corrupted. I plan to use Ubuntu to recover data on the disk.
I went to my friend's home and made a Ubuntu USB stick. I don't think the Ubuntu USB stick has a persistent storage portion.
My computer successfully boots from the Ubuntu USB stick, but my recovery requires additional software.
$ sudo apt-get install testdisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package testdisk
$ sudo apt-get update
...
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]
Fetched 3,789 kB in 12s (297 kB/s)
** (appstreamcli:4232): CRITICAL **: Error while moving old database out of the way.
AppStream cache update failed.
Reading package lists... Done
apt-get reports error, I guess it's because the USB stick is kind of read-only mode?
I don't want to bother my friend again to make a persistent USB stick.
What is the easiest way to run additional software on Ubuntu Live?
Installing testdisk for single use
You do not need persistence to (hopefully) run testdisk just once.
Add universe repository
Update
Install testdisk
Run testdisk
Above works for me on balenaEtcher Live USB using Ubuntu 16.04.5 running on 4GB USB2 thumbdrive.