Create a Casper-RW Partition Larger than 4GB on Your USB Drive. This tutorial will guide you through the process of creating a writable casper-rw partition larger than 4GB on your USB flash drive.
The benefit of using a casper-rw partition, instead of the casper-rw block file, is the ability to expand your persistent storage beyond the 4GB limitation. This is particularly useful if you have a large flash drive and want to maximize the amount of space available for persistent storage.
Note: The main limitation is that Windows will not recognize the second partition. Thus, in Windows, your USB drive will appear to be smaller than its actual capacity, due to the hidden casper-rw partition.
This tutorial assumes you have already created a single bootable USB Flash Drive with an Ubuntu based Live Distro (such as Ubuntu, Xubuntu, Kubuntu, or Linux Mint). This method is not for Multiboot drives created with tools like Ventoy, YUMI, UUI. Additionally, make sure you delete any existing casper-rw or writable files on the drive to free up all available space before starting the process.
Steps to Create a Casper-RW Partition Larger than 4GB
Follow these steps to create a casper-rw partition larger than 4GB, expanding your persistent storage for Ubuntu or any Ubuntu-based Live Distro. Ensure you back up your data beforehand as resizing partitions can lead to data loss if done incorrectly.
Step 1: Boot from Your Live USB
Start by restarting your computer and booting from your Ubuntu based Live USB. This will load the Live environment where you’ll be able to configure the partitions.
Step 2: Launch GParted
Once in the Live environment, open GParted from the list of applications. GParted is a powerful partition editor that allows you to resize and manage your disk partitions.
If GParted is not installed on your system, you can easily install it by opening a terminal and entering the following command:
sudo apt-get install gparted
Once installation is complete, run the program by typing:
gparted
After launching GParted, you should see a graphical interface where you can manage your disk partitions.
Step 3: Select Your USB Device
In GParted, select your USB drive from the device dropdown menu. It's crucial to ensure you are working with the correct device to avoid accidental data loss.
Step 4: Resize the First Partition
Before we create the new casper-rw partition, we need to resize the existing partition that contains your Live OS. Follow these steps:
- Unplug your USB drive and plug it back in to refresh the system.
- Right-click on the partition (the green box) that contains your Live OS and select Resize/Move.
- Now, drag the size slider left to reduce the size of the existing partition, leaving enough space for the new casper-rw partition. The exact amount of space you leave will depend on how large you want your persistent storage to be. For example, leave at least 8GB if you want a sizable casper-rw partition.
- Once you have adjusted the size, click the Resize/Move button to apply the changes.
Step 5: Create the New Casper-RW Partition
Next, we need to create the new partition that will be used for the casper-rw storage:
- Locate the unallocated space on the drive and right-click on it.
- Select New to create a new partition in the unallocated space.
- In the window that appears, set the following options:
- If you are using Ubuntu/Mint ISO version 20+ (or later), use writable for the partition label.
- If you are using an earlier version, use casper-rw as the partition label.
- Choose ext2, ext3, or ext4 as the filesystem type. We recommend ext4 for modern systems, as it provides better performance and reliability.
- Once you have configured the partition, click Add.
Step 6: Apply the Changes
Now, it's time to apply all the changes:
- Click the green checkmark in the toolbar to apply all operations. GParted will now make the changes to your USB drive, including resizing the original partition and adding the new casper-rw partition.
- Wait for the operations to complete. This may take a few minutes depending on the size of the changes.
Step 7: Reboot and Verify the Changes
Once GParted has completed the operation, simply close the program and reboot your system. Boot from your USB drive again and check if everything is working correctly.
If all went well, you should now be running your Ubuntu or Ubuntu-based Live Distro from your USB drive, with a second partition used for persistent storage (instead of using a casper-rw file). The system will now be able to store changes across reboots, and you'll have more space for your personal files and configurations.
Step 8: Enable Persistence on Boot
In order to ensure that the operating system boots with persistence enabled, you need to use the persistent boot parameter. When booting from the USB, make sure to add the following boot code:
persistent
This will tell the Live system to load with persistence, using the larger casper-rw partition for storing your changes.
Final Thoughts
By following this tutorial, you've successfully created a casper-rw partition on your USB drive. This gives you the benefit of extended persistent storage for your Ubuntu-based Live Distro, without the limitations of a file-based casper-rw. Now, you can enjoy a more flexible and scalable persistent storage solution for your Live USB.
Reminder: Since Windows does not recognize the second partition, your USB drive may show up as having less available space when plugged into a Windows system. However, this will not affect the usability of the persistent storage on Linux-based systems.
This concludes the guide on creating a writable casper-rw partition larger than 4GB. You can now store your changes, configurations, and files with more flexibility than before. Enjoy your enhanced Ubuntu Live USB experience!