I'm installing multiple operating systems on a usb drive I recently purchased for this purpose and was wondering how to create a usb drive with multiple persistent OS's that will be linux based and have a capacity > 4gb of the casper-rw file and was wondering 1. if this was possible (I have read from 1 source that it wasnt but it was not one that was overly trustworthy), and 2. how to go about doing it (answers should be aimed at ubuntu being the system I create the drive on)

  • If you're talking casper then you're not really talking about multiple OSes - just Debian initramfs and different roots. Still, the simplest approach would target a UEFI-only system on which you would just need a kernel and (optional if the kernel's initial root is compiled in) initramfs image for each. The casper file-system you're talking about is a squashfs compressed mountable root filesystem - and that's how most live-systems do it because the squashfs driver offers native kernel VFS mounting of a highly compressed fs. Anyway, with grub and similar it gets much more difficult. – mikeserv May 10 '15 at 14:52
  • well i had heard that you could swap the casper rw file with a partition for greater storage volume and was wondering if it could be done with multiple installs of different linux based os's and how to go about doing it – Lolorz12 May 10 '15 at 15:01
  • The casper system works by mounting two disks - filesystem layers - the first is the squashfs file (on your live disk somewhere called bla.sfs, likely) and it is read-only. The second is writable filesystem mounted atop it - I forget how Debian does it but I think it can be selected in /etc/fstab. Basically anything in the second overshadows the first - usually using whitelists - and so the user sees a joined version of the two. You can use the same sfs file and overlay it with different rw layers for entirely different results. aufs, overlayfs, are terrible performers, though. – mikeserv May 10 '15 at 15:09

You may want to check Easy2Boot. It's the most versatile and probably also best-documented tool for multiboot things. Specifically, it supports in particular

Boot multiple linux ISOs each with separate persistence files

[in addition, the author is also pretty helpful and really responsive even for in-depth questions] You could misuse that to reference the same casper-rw file for each of the systems.

For more details also see http://www.easy2boot.com/add-payload-files/linux-isos/linux-with-persistence/ and http://www.easy2boot.com/add-payload-files/persistence/

For similar topics, you might want to check the following links:

  • it looks like 4gb persistence is the max sadly on fat32 according to some documentation on their site, something not mentioned on the other tools i had read about however, this is a great tool! too bad it sounds like ntfs has issues with other os's compatibility wise as mac can only read without help and not all distros have support for ntfs it sounds like – Lolorz12 May 11 '15 at 1:00
  • Which distro does not have support for NTFS? Read support has been in the kernel for ages, and read-write support provided by ntfs-3g, which is in all current distros. Apart from that it should be possible to not use a file for persistence, but a whole partition on the multiboot drive. See askubuntu.com/questions/138356/… or e.g. pendrivelinux.com/create-a-larger-than-4gb-casper-partition – doktor5000 May 11 '15 at 1:25
  • oh cool, I'd been perusing a few articles and some other sources of info after reading up on easy2boot should have checked the actual kernel support doh! so much misleading info out there even though support was added in what, 2006? saw a few saying there were issues creating new files or something even from some source dated at 2 years ago – Lolorz12 May 11 '15 at 1:42

An NTFS Easy2boot drive will boot multiple linux ISOs with persistence even if the linux being used does not support NTFS. You can even boot from an exFAT E2B drive to a linux distro that does not support exFAT. E2B creates a 4th partition on the E2B USB drive and 'maps' the ISO to that partition. When the ISO boots, it sees the 4th partition as having a CDFS filesystem and mounts it. It then gets the .sqfs file (or whatever it needs) from that CDFS partition. The same for the persistence file - it maps the persistence file to partition 3 of the E2B USB drive before booting to the ISO. Pretty much all linux ISOs should work with E2B. It also supports UEFI-booting (by converting each linux ISO to a .imgPTN partition image file and 'switching in' that partition.)


You can specify the persistence volume label in the boot parameters:

persistence persistence-label=volumelabel

As far as I know, this works with Debian. More info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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