B. Use the Startup Disk Creator alias usb-creator-gtk
Install Ubuntu from the file
into partition 1 of a pendrive with at least 16 GB.
C. Boot from the pendrive in UEFI mode and install Ubuntu
Install Ubuntu into partition 5 of the same pendrive. Install the
bootloader into partition 5 (not into the head of the drive).
Tweak the boot configuration files
according to the files that you find after installing with mkusb from
to a pendrive.
D. The pendrive uses the boot system of the Ubuntu installer
Notice that this system is not like an ordinary installed system. It has an MSDOS partition table (not a GPT). It uses the boot system of the Ubuntu installer instead of what is normally created by installing in UEFI mode.
This method seems stable when used in a USB pendrive. It is tested in two different laptops, a Toshiba Satellite and an HP Elitebook. The previous installed UEFI and BIOS pendrive system did not survive such adventures.
It is also tested in an eSATA SSD drive, where it also works when installed according to the description above. But it might not work to flash the pendrive image directly to the SSD drive.
2. Tweak the system
A. Decrease wear for a pendrive
Add the mount option noatime in /etc/fstab
# / was on /dev/sdb3 during installation
UUID=4c518694-d97c-4910-bb7b-eeb6a6b73874 / ext4 noatime,errors=remount-ro 0 1
Do not copy this line. Add 'noatime' to your own line.
It is also possible to remove the swap partition and the swap entry in /etc/fstab in order to avoid wear due to swapping.
B. Move swap and grow root partition
Move the swap partition and grow the root partition to use the whole drive. See this link
C. Login and password for the system to download
The system that is installed from the compressed image file
has the following user and password