2

In the past I've run Kubuntu from a USB stick. Use it to download and stream movies/sports from pirate sites that would otherwise plague my windows OS with spyware, and can take it anywhere to use on any machine. Problem is, any time I do this, I need to configure the Kubuntu OS with desired settings and add-ons to maximize the experience, which is time consuming.

Is it possible to configure Kubuntu to my liking, then generate a bootable USB stick with these settings in place, so that when I book from the stick, all of my favorite settings/software/add-ons are all set to go without any configuring?

muru
  • 207,228

2 Answers2

1

Persistent USB with easy to reset writable partition

The only thing that changes on a mkusb persistent USB is the persistence partition, casper-rw (nowadays labeled writable) and the NTFS usbdata partition.

enter image description here

With mkusb the system partition is read only and can't be corrupted. Mkusb comes with an option for making backups of your home folder, the most likely item to get corrupted.

enter image description here

It is also possible to make a backup image of your writable partition using the included Gnome-Disks and then store the image in mkusb's usbdata partition, so that the persistence partition can be reset, (overwritten), as needed. Just boot using mkusb's toram mode when overwriting partitions.

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125
0

Ventoy can create a bootable USB (even with multiple Linux distributions) with persistence, so your changes are saved on the stick across reboots.

Download Ventoy from here, install it on an USB stick using:

sudo ./Ventoy2Disk.sh -i /dev/sdX

Where "sdX" is the USB drive. This formats the drive!

Now any ISO copied to the USB stick will be bootable. With multiple ISOs, you'll get a menu when booting from the USB stick.

For persistence support, you'll need to create the persistence file using (e.g. for 4 GB):

sudo ./CreatePersistentImg.sh -s 4096

The created image file is called persistence.dat, and it should be available in the Ventoy folder (next to the CreatePersistentImg.sh script). Plug-in the USB stick on which you've installed Ventoy, and copy this persistence.dat file to the USB drive.

On the USB drive on which you've installed Ventoy, create a folder called ventoy. Inside this folder create a file called ventoy.json, and open this file with a text editor.

Inside the file, paste this:

{ 
 "persistence" : [
    { 
       "image": "/ISO-file-name.iso",  
        "backend": "/persistence.dat" 
     }
   ] 
 }

Replace ISO-file-name.iso with the ISO filename (and path if it's not in the root of the USB), and persistence.dat with the persistence image filename and path (in case you've changed the name and didn't place it in the root of the USB).

Guide from here.

Logix
  • 2,340