Live Ubuntu USB with Auto-mounting Partitions

So, I wanted to create a live Ubuntu USB but with the ability to save some files. However, I don't like the idea of persistence as it saves all 'changes'. Instead, here is what I wanted:

A USB with 3 partitions

- the first partition contains the live Ubuntu system
- the second partition will auto-mount on boot at the 'Desktop' directory of the live system
- the third partition will auto-mount at the 'Downloads' directory

In this way, I'd like to be able to save any downloads during the live run as well as any files created in the Desktop. Also, if the auto-mounting part is doable, can it be done in such a way that my live environment Desktop boots up to show all my files from the second partition, ie it would look like I have enabled some form of persistence?

The thing is, I had initially wanted a USB with a "Full install" of Ubuntu on it so I can carry around my entire workstation in my pocket. But that didn't quite work out due to the speed limitations of the USB(I think) and I figured this would be the next best thing. As for applications that I normally use everyday, I've decided to customize the Ubuntu ISO with 'Cubic' and pre-installed all the apps that I'd need.

UPDATE (output of lsblk -f after installing through mkusb):


I don't know how to get exactly what you want, It may be possible but difficult. But I can discuss alternatives and suggest something similar, that is easy to make and might be good enough for you.

  • I would use a 'normal' persistent live system for this task (made with mkusb version 12 alias mkusb-dus). It can do what you want to do, and if you are cautious, you can avoid storing unnesseary files and avoid unwanted settings.

  • A simple alternative would be to create a live drive with a data partition with mkusb-plug.

  • An intermediate alternative would be to create a live system with persistent home (but not a persistent root, so that new application programs and system tweaks will not be persistent). Only what is stored in the home directory will be stored, user specific tweaks, the content of Desktop, Documents, Downloads, etc.

    This is done by modifying a 'normal' persistent live system:

    • removing the content (directories and files, if any) of the partition for persistence with the label writable, and
    • changing the label of this partition to home-rw

If you wish, you can boot a [partially] persistent live system without the boot option persistent (that is boot it live-only) and delete unwanted data from the partition for persistence. The next time you boot persistent live, those files and/or corresponding settings will be gone. This way you can keep only the content of 'Desktop' and 'Downloads'.


More on mkusb

Try using a Persistent USB made using mkusb.

It has a read only ISO9660 OS partition, a Persistent "writable" partition and a NTFS Data partition. A Persistent home-rw partition is easy to add.

It also has a toram option so the Live OS will run in RAM, (which is many times faster than SSD). Xubuntu is a good choice for fast OS, it loves to run in RAM, so maybe try that.

A persistent USB made using mkusb can be reset by formatting the persistent partitions, or by deleting files in them.

The contents in a Persistent partition are not hidden away like the data in a Persistent file and there is no 4GB size limit.