You can easily put the writable filesystem (in the casper-rw file)
for a live media onto a hard disk. The limitation is that the
casper-rw file must go on a FAT partition. Newer machines (UEFI)
all have a FAT EFI partition, but that's typically too small to hold
a 1G-4G casper-rw file. On another big enough FAT partition, you can
make directories, each holding a casper-rw file for possibly different live medias.
Suppose sda11 is 10G and has a 10G FAT filesystem, mounted at /mnt/sda11,on which there are directories /A , /B , /C , /D , and /E. Assume we will use /A for our persistent media, putting a casper-rw there.
cd /mnt/sda11/A
dd if=/dev/zero of=casper-rw bs=1M count=4096
mkfs.ext4 -F -O^has_journal -L casper-rw casper-rw
Take your live media created with persistence, and edit the /boot/grub/grub.cfg file and the /syslinux/txt.cfg file, adding after the word "persistent"
"persistent-path=/A"
/boot/grub/grub.cfg
...
menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --- cdrom-detect/try-usb=true noprompt persistent persistent-path=/A
initrd /casper/initrd.lz
}
/syslinux/txt.cfg
default live
label live
menu label ^Try Ubuntu without installing
kernel /casper/vmlinuz.efi
append noprompt cdrom-detect/try-usb=true persistent persistent-path=/A file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash ---
label live-install
...
That's it. You don't even need to rename/remove the casper-rw file on the USB media.
If there's room on the USB media, you can even copy the hard disk's casper-rw back to the USB, and take your changes with you.
The persistent-path does not allow any explicit disk reference, so should be unique across all FAT partitions. Tested with 1 or 2 FAT partitions (one being the EFI partition). Will not work on an ext2 or ntfs filesystem instead of FAT. If you also add the "toram" word on the same line as "persistent", your compressed filesystem on the slow USB will be copied into ram and give much better performance, however,
there seems to be a shutdown issue, with the FAT partition not being cleanly unmounted (which does not seem to cause any problems but...)
Best Answer
A cross-platform application for this is Netbootin
I found that there are a a lot of tools very simple to use in Windows (it is possible that someone who wants a new Linux installation does not have a Linux OS installed yet) One that I have tested is Live USB Install (also cross-platform). In my opinion it is the best in creating the "persistence".
And there are others, like LinuxLiveUSB.