Make a Casper Persistent File from Windows

Use the Linux persistent USB file creator to make a casper rw persistent file or writable persistence loop file for Ubuntu based distributions. Written for use from within Windows, this tool enables you to quickly create a loopback filesystem image to use for saving and restoring Ubuntu changes while booted from a live USB.

About Casper rw persistence

Casper-rw is a term associated with Ubuntu based live USB drives. It refers to a special loop file or partition that acts as a virtual block device. Also known as a persistent overlay images, these casper-rw block files work as a companion to your Ubuntu live bootable USB, allowing you to save your custom changes, settings, and stored files between sessions.

Whilst running from a live USB version of Ubuntu or one of its derivatives, this unique feature enables a Live system to act similar to a full installation. Albeit with some exceptions like not being able to perform some system and kernel updates, as those types of changes are stored outside of the overlay image.

  • What is a Live USB Drive? A Live USB drive is a portable storage device (usually a USB flash drive) that contain bootable operating system(s). Users can plug these drives into a computer and boot from them, enabling them to run the operating system without installing it on the computer's hard drive.
  • What is Persistence? By default, when you boot from a live USB, any changes you make to the operating system, such as installing new software, modifying settings, or saving files, are lost when you shut down or reboot the computer. This is because the live USB loads the operating system into RAM, and RAM is volatile memory.
  • What is Casper? In Ubuntu based live USBs, the "casper" or "writable" component is responsible for this live session functionality. It allows the operating system to run entirely from the USB drive and creates a temporary file system in RAM. However, casper itself does not provide persistence.
  • What is Casper-rw? To enable persistence and allow users to save changes, a casper-rw file or partition is added to the live USB drive. This storage area acts as a writable overlay on top of the read only live system. It's essentially a place where changes and data can be stored and retrieved between sessions. The "rw" in "casper-rw" stands for "read-write," signifying its role in providing a writable space.
  • Casper-rw use case: Casper-rw is especially useful for users who want to create a portable, customizable Ubuntu environment on a USB drive. For example, you can install additional software, customize the desktop, and save files to the persistent storage space, and these changes will persist across reboots.
  • Casper-rw file size considerations: The size of the casper-rw space can vary depending on how much space you allocate during its creation. When using a loop file for persistent storage, you'll also need to consider any file size limitations on the type of filesystem format being used; for example the 4GB file size limit on Fat32 filesystems. It's important to choose an appropriate size based on your use case and needs, as it ultimately determines how much data you can save.

Casper-rw allows users to save some changes, settings, and files while booted and running from Ubuntu based live USB drives. It provides persistence by offering a writable overlay on top of the booted read only live environment, making the following a valuable tool for creating persistent portable Ubuntu installations.

Casper-rw Persistent File Creator

Make a Casper Persistent File - Pen Drive Linux
Source Code SHA-256: 69116a284e1d56b8a06730902bc0a5d440463a78d1620df4df1d500066d0dceb
Important: Some Ubuntu based distributions starting from 20.04 onward started to require both the volume label and file to be named writable. Whereas, 19.10 and lower used casper-rw for the volume label and file name.

How to Make a Casper Persistent Block File

Proceed to create a persistent file using the following easy steps:

  1. Download Persistence File Creator and run the executable.
  2. First, select your USB Flash Drive from the drop down.
  3. Then choose which filename to create; casper-rw or writable
  4. Using the slider, set the size of the file.
  5. Click the Create button.

Note: The persistent block file or overlay image will be stored at the root of the drive you choose. However, you can move it around later to fit your needs.

Booting and using a Casper Persistent Overlay Image

Booting Ubuntu with Persistence enabled

Depending on how you created your Ubuntu, Xubuntu, Kubuntu or other Bootable USB flash drive, you may need to append the persistent boot parameter to your boot menu. To do this, at the Boot Menu, press F6. Then press ESC and add the word persistent to the boot string. Finally, press Enter to boot.

Persistent overlay usage

Persistent overlay images work well for saving and restoring most things. I.E. personalized settings, application settings, customizations, and saved files. However, an overlay does not serve to completely replace a full USB installation.

When using a persistent overlay you will need to avoid complete system upgrades. Parts of the system including the kernel, remain compressed and outside of the image. If you try to upgrade, the compressed kernel cannot be modified, and this could result in an unbootable system.

This concludes How to make Casper Persistent Files from within Windows 11, 10, 8, 7. I hope that you found this software utility useful.

Here is a link to Ubuntu's Casper Manual page for reference.