I am currently using 32 GB flash disk to use Ubuntu using live boot. I made it bootable using YUMI and set the file system to NTFS and persistent size 8GB. But now, I am running low in space and want to increase persistent disk size.

So, how to do it without losing my data?

  • YUMI casper-rw file is different than most other USB boot programs. It uses grub4dos to create a virtual casper-rw partition of "unlimited" size. A large casper-rw file made using dd does not seem to work with YUMI. You should be able to create a new larger casper-rw file using YUMI, mount it and copy/rsync the old data to it . Will confirm and report back. – C.S.Cameron Oct 10 at 3:06
  • If the Duplicate Post Police try to bust you for "Duplicate" post, change the title by adding YUMI. I am sure your post is unique. – C.S.Cameron Oct 10 at 10:48

Increasing casper-rw size of a YUMI Persistent install.

  • Assumed existing flash drive with YUMI persistent install with 8GB casper-rw file.

  • Use YUMI to make a second Persistent install of desired persistence size, do not boot it.

  • Mount old flash drives using:

    sudo mkdir /media/casper1

    sudo mount -o loop /media//MULTIBOOT/multiboot/ubuntu-18.04.1/casper-rw /media/casper1/

  • Mount second flash drives using:

    sudo mkdir /media/casper2

    sudo mount -o loop /media//MULTIBOOT/multiboot/ubuntu-18.04.1/casper-rw /media/casper2/

  • Use rsync or Grsync to copy Upper and Work to the new flash drive.

enter image description here

enter image description here

  • Use the new drive as your portable OS, recycle the old flash drive, there is nothing of much use on it except the old persistence file, (which can be used as backup).

Copying casper-rw from one version of Ubuntu to the next does not work, but copying the home directory from upper does.

With YUMI the persistence file is NTFS and must be contiguous to satisfy grub4dos. You may manage to fit the new install on the same flash drive as the old, if it will fit without fragmentation.

  • Thanks for your solution but before I read your answer, I tried 'TopoResize' tool from here "pendrivelinux.com/how-to-resize-casper-rw-images" and got persistent size increased but on the cost of losing all of my data :( – G.Suyash Oct 12 at 2:36
  • My answer worked for me without any data loss. Rsync is a well tested tool often used for syncing, copying, backing up, and relocating home directories without any data loss. Thanks for the warning about 'TopoResize'. – C.S.Cameron Oct 12 at 2:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.